Application adaptation method and device in a compatibility layer environment, equipment and medium
By obtaining the identifier, version number, and system hardware and software information of the application to be adapted, and using the application and model data table to find dependent resources, the problem of time-consuming and laborious installation of dependent libraries in the compatibility layer environment is solved, thus improving the adaptation efficiency.
Patent Information
- Application Number
- CN202411387184.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2044-06-18
AI Technical Summary
In a compatibility layer environment, the existing technology involves time-consuming and labor-intensive processes of trying to install various dependency libraries and conducting repeated tests, which increases manpower and time costs and affects the efficiency of application adaptation.
By obtaining the identifier, version number, system hardware and software environment information, and dynamic link library name of the application to be adapted, the target dependency resource list is found using the application data table and model data table. The dependency resources are determined based on the successful adaptation scheme, reducing redundant testing.
It saves manpower and time costs associated with trying to install various dependency libraries and conducting repeated tests, and improves application adaptation efficiency in the compatibility layer environment.
Smart Images

Figure CN119396522B_ABST
Abstract
Description
[0001] This divisional application is a divisional application based on the Chinese invention patent application with application number 202410782709.5, application date June 18, 2024, and invention name “Application adaptation method, device, equipment and medium in a compatibility layer environment”. Technical Field
[0002] The embodiments of the present application relate to the field of application transplantation technology, and in particular to an application adaptation method, apparatus, device, and medium in a compatibility layer environment. Background Art
[0003] Wine (Wine Is Not an Emulator) is a compatibility layer that allows applications from a second operating system to be ported to a first operating system. Because Wine translates Windows API (Application Program Interface) calls into dynamic POSIX (Portable Operating System Interface) calls, it allows Windows applications to run on operating systems other than Windows.
[0004] Compatibility with Windows applications in compatibility layers like Wine is uncertain. For example, Windows application A may function normally in a compatibility layer environment, but errors may occur during the installation, launch, or use of Windows application B in that environment. Application adaptation in a compatibility layer environment allows applications from a second operating system to be processed within the first operating system's compatibility layer environment.
[0005] One purpose of application adaptation within a compatibility layer environment is to determine an adaptation solution for the second operating system's application. Current adaptation solutions can include the dependent resources corresponding to the second operating system's application; examples of these resources include libraries, packages, or the registry. In related art, application adaptation within a compatibility layer environment typically involves users experimenting with installing various libraries based on their own experience, and ultimately finding a viable application adaptation solution through repeated testing.
[0006] In actual applications, trying to install various dependent libraries and repeatedly testing is time-consuming and labor-intensive, which not only increases the manpower and time costs of application adaptation, but also affects the efficiency of application adaptation. Summary of the Invention
[0007] The embodiment of the present application provides an application adaptation method in a compatibility layer environment, which can save the manpower and time costs of attempting to install various dependent libraries and repeated testing, and can improve the application adaptation efficiency in the compatibility layer environment.
[0008] Correspondingly, the embodiments of the present application also provide an application adaptation device in a compatibility layer environment, an electronic device, and a machine-readable medium to ensure the implementation and application of the above method.
[0009] To solve the above problems, an embodiment of the present application discloses an application adaptation method in a compatibility layer environment, wherein the compatibility layer environment is provided by compatibility layer software running on a first operating system. The method includes:
[0010] Obtaining a first application identifier, a first application version number, first system hardware and software environment information, and N first dynamic link library names corresponding to the application to be adapted; the N first dynamic link library names are derived from the executable file of the application to be adapted, and the executable file of the application to be adapted meets the requirements of the second operating system; N is a positive integer;
[0011] Based on the first application identifier, the first application version number, and the first system hardware and software environment information, a search is performed in the application data table to obtain a target dependent resource list corresponding to the application to be adapted; the fields of the application data table include: a second application identifier, a second application version number, the second system hardware and software environment information, and a dependent resource list; based on a successful adaptation solution corresponding to a successfully adapted application, a data record of the application data table is determined; the successful adaptation solution includes: dependent resources used by the successfully adapted application;
[0012] In a case where a target dependent resource list corresponding to the application to be adapted does not exist in the application data table, a search is performed in the model data table based on the first application identifier, the first system hardware and software environment information and the i-th first dynamic link library name to obtain the target dependent resource information corresponding to the i-th first dynamic link library name; the fields of the model data table include: a third application identifier, a third system hardware and software environment information, a second dynamic link library name and dependent resource information; according to a successful adaptation solution corresponding to a successfully adapted application, a data record of the model data table is determined; i is a positive integer not greater than N.
[0013] The present application also discloses an application adaptation device in a compatibility layer environment, wherein the compatibility layer environment is provided by compatibility layer software running on a first operating system, and the device includes:
[0014] an acquisition module, configured to acquire a first application identifier, a first application version number, first system hardware and software environment information, and N first dynamic link library names corresponding to the application to be adapted; the N first dynamic link library names are derived from an executable file of the application to be adapted, and the executable file of the application to be adapted meets the requirements of the second operating system; N is a positive integer;
[0015] An application data table search module is configured to search an application data table based on the first application identifier, the first application version number, and the first system hardware and software environment information to obtain a target dependent resource list corresponding to the application to be adapted; the fields of the application data table include: a second application identifier, a second application version number, the second system hardware and software environment information, and a dependent resource list; determine data records in the application data table based on a successful adaptation solution corresponding to a successfully adapted application; the successful adaptation solution includes: dependent resources used by the successfully adapted application;
[0016] A model data table search module is used to search in the model data table according to the first application identifier, the first system hardware and software environment information and the i-th first dynamic link library name when the target dependent resource list corresponding to the application to be adapted does not exist in the application data table, so as to obtain the target dependent resource information corresponding to the i-th first dynamic link library name; the fields of the model data table include: a third application identifier, a third system hardware and software environment information, a second dynamic link library name and dependent resource information; according to the successful adaptation solution corresponding to the successfully adapted application, the data record of the model data table is determined; i is a positive integer not greater than N.
[0017] Optionally, the fields of the model data table further include: associated link library information;
[0018] The model data table lookup module includes:
[0019] a first associated information determining module configured to determine, if a target dependent resource list corresponding to the application to be adapted does not exist in the application data table, first associated link library information corresponding to the i-th first dynamic link library name based on the N first dynamic link library names in the import table;
[0020] The first model data table search module is used to search in the model data table according to the first application identifier, the first system hardware and software environment information, the i-th first dynamic link library name, and the first associated link library information to obtain the target dependent resource information corresponding to the i-th first dynamic link library name.
[0021] Optionally, the fields of the model data table further include: associated link library information;
[0022] The model data table lookup module includes:
[0023] A second model data table search module is configured to search the model data table for candidate dependent resource information corresponding to the i-th first dynamic link library name based on the first application identifier, the first system hardware and software environment information, and the i-th first dynamic link library name, if the target dependent resource list corresponding to the application to be adapted does not exist in the application data table;
[0024] A second associated information determining module is configured to determine, when there are multiple candidate dependent resource information, first associated link library information corresponding to the i-th first dynamic link library name according to the N first dynamic link library names in the import table;
[0025] The first screening module is used to screen a plurality of candidate dependent resource information according to the first associated link library information to obtain target dependent resource information corresponding to the i-th first dynamic link library name.
[0026] Optionally, the fields of the model data table further include: application rating information;
[0027] The model data table lookup module includes:
[0028] A second model data table search module is configured to search the model data table for candidate dependent resource information corresponding to the i-th first dynamic link library name based on the first application identifier, the first system hardware and software environment information, and the i-th first dynamic link library name, if the target dependent resource list corresponding to the application to be adapted does not exist in the application data table;
[0029] The second screening module is used to screen the multiple candidate dependency resource information according to the application rating information corresponding to the candidate dependency resource information when there are multiple candidate dependency resource information to obtain the target dependency resource information corresponding to the i-th first dynamic link library name.
[0030] Optionally, the acquisition module is located at the server end, and is specifically configured to receive from the client a first application identifier, a first application version number, first system software and hardware environment information, and N first dynamic link library names corresponding to the application to be adapted;
[0031] The device further comprises:
[0032] A first solution returning module is configured to return the target dependent resource list corresponding to the application to be adapted as a recommended adaptation solution to the client if the target dependent resource list corresponding to the application to be adapted exists in the application data table;
[0033] The second solution returning module is used to return the target dependency resource information corresponding to the i-th first dynamic link library name as a recommended adaptation solution to the client when there is no target dependency resource list corresponding to the application to be adapted in the application data table and there is target dependency resource information corresponding to the i-th first dynamic link library name in the model data table.
[0034] Optionally, the device further comprises:
[0035] A successful adaptation solution acquisition module is used to obtain a successful adaptation solution corresponding to a successfully adapted application; the successful adaptation solution includes: dependent resources corresponding to the fourth dynamic link library name in the import table of the successfully adapted application;
[0036] A first generating module is configured to generate a first data record in the application data table according to the successful adaptation solution and characteristic information of the successfully adapted application; the fields of the first data record include: a second application identifier, a second application version number, second system software and hardware environment information, and a dependent resource list;
[0037] The second generation module is used to generate a second data record in the model data table based on the successful adaptation plan and the characteristic information of the successfully adapted application; the fields of the second data record include: a third application identifier, third system hardware and software environment information, a second dynamic link library name and dependent resource information.
[0038] Optionally, the first system software and hardware environment information includes: operating system information where the compatibility layer software is located, and hardware environment information of the electronic device where the compatibility layer software is located.
[0039] An embodiment of the present application further discloses an electronic device, comprising: a processor; and a memory on which executable code is stored. When the executable code is executed, the processor executes the method described in the embodiment of the present application.
[0040] The embodiment of the present application further discloses a machine-readable medium having executable code stored thereon. When the executable code is executed, the processor executes the method described in the embodiment of the present application.
[0041] The embodiments of the present application include the following advantages:
[0042] In the technical solution of the embodiment of the present application, the first application identifier, the first application version number, the first system hardware and software environment information and N first dynamic link library names corresponding to the application to be adapted are first obtained, and then, based on the above-mentioned first application identifier and the first system hardware and software environment information, a search is performed in the application data table to obtain a list of target dependent resources corresponding to the above-mentioned application to be adapted.
[0043] Since the data records of the above-mentioned application data table are obtained according to the successful adaptation scheme corresponding to the successfully adapted application, the fields of the above-mentioned application data table specifically include: the second application identifier, the second application version number, the second system hardware and software environment information and the dependency resource list, and the above-mentioned successful adaptation scheme may include: the dependency resources used by the successfully adapted application; in this way, the above-mentioned dependency resource list may also include: the dependency resources used by the successfully adapted application. On this basis, the target dependency resource list obtained by the embodiment of the present application according to the above-mentioned first application identifier, the first application version number and the first system hardware and software environment information can be matched with the application to be adapted. The embodiment of the present application utilizes the application data table to obtain the target dependency resource list for the application to be adapted, which can save the manpower and time costs of trying to install various dependency libraries and repeated testing, and can improve the application adaptation efficiency in the compatibility layer environment.
[0044] Furthermore, in an embodiment of the present application, when the target dependency resource list corresponding to the above-mentioned application to be adapted does not exist in the above-mentioned application data table, a search is performed in the model data table based on the first application identifier, the first system hardware and software environment information and the i-th first dynamic link library name to obtain the target dependency resource information corresponding to the i-th first dynamic link library name.
[0045] Since the data records of the above-mentioned model data table are obtained according to the successful adaptation scheme corresponding to the successfully adapted application, the fields of the above-mentioned model data table specifically include: the third application identifier, the third system software and hardware environment information, the second dynamic link library name and the dependent resource information, and the above-mentioned successful adaptation scheme may include: the dependent resources used by the successfully adapted application; in this way, the above-mentioned dependent resource information may also include: the dependent resources used by the successfully adapted application for the second dynamic link library name. On this basis, the target dependent resource list obtained by the embodiment of the present application according to the above-mentioned first application identifier, the first system software and hardware environment information and the i-th first dynamic link library name can match the i-th first dynamic link library name included in the application to be adapted. The embodiment of the present application utilizes the method of obtaining the target dependent resource information for the i-th first dynamic link library name included in the application to be adapted in the model data table, which can save the manpower cost and time cost of trying to install various dependent libraries and repeated testing, and can improve the application adaptation efficiency in the compatibility layer environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 This is a schematic diagram of an application environment of an application adaptation method in a compatibility layer environment according to an embodiment of the present application;
[0047] Figure 2 This is a flowchart of an application adaptation method in a compatibility layer environment according to an embodiment of the present application;
[0048] Figure 3 This is a flowchart of the steps of an application adaptation method in a compatibility layer environment according to an embodiment of the present application;
[0049] Figure 4 This is a flowchart of the steps of an application adaptation method in a compatibility layer environment according to an embodiment of the present application;
[0050] Figure 5 This is a flowchart of the steps of an application adaptation method in a compatibility layer environment according to an embodiment of the present application;
[0051] Figure 6 This is a schematic diagram of the structure of an application adaptation device in a compatibility layer environment according to an embodiment of the present application;
[0052] Figure 7 It is a structural diagram of a device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0053] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0054] The embodiments of the present application can be applied to the field of application transplantation technology. In the field of application transplantation technology, for example, a compatibility layer software such as Wine can be used to transplant an application program of a second operating system to a first operating system.
[0055] Examples of the first operating system may include Linux, macOS (Macintosh Operating System), and BSD (Berkeley Software Distribution). Examples of the second operating system may include Windows. It should be understood that the embodiments of the present application are not limited to the specific first operating system and second operating system.
[0056] In the embodiment of the present application, application adaptation in a compatibility layer environment can process an application program of a second operating system in a compatibility layer environment running on a first operating system.
[0057] In related technologies, application adaptation methods in a compatibility layer environment typically rely on users to install various dependency libraries based on their own experience, and then repeatedly test and find a viable application adaptation solution. In practice, installing various dependency libraries and repeated testing is time-consuming and labor-intensive, increasing both the human and time costs of application adaptation and affecting its efficiency.
[0058] To address the technical issues of high cost and low efficiency of application adaptation in a compatibility layer environment in related technologies, an embodiment of the present application provides an application adaptation method in a compatibility layer environment. The compatibility layer environment is provided by compatibility layer software running on a first operating system. The method specifically includes the following steps:
[0059] Obtaining a first application identifier, a first application version number, first system hardware and software environment information, and N first dynamic link library names corresponding to the application to be adapted; the N first dynamic link library names are derived from the executable file of the application to be adapted, and the executable file of the application to be adapted meets the requirements of the second operating system; N is a positive integer;
[0060] Based on the first application identifier, the first application version number, and the first system hardware and software environment information, a search is performed in the application data table to obtain a target dependent resource list corresponding to the application to be adapted; the fields of the application data table specifically include: a second application identifier, a second application version number, the second system hardware and software environment information, and a dependent resource list; based on a successful adaptation plan corresponding to a successfully adapted application, a data record of the application data table is determined; the successful adaptation plan includes: dependent resources used by the successfully adapted application;
[0061] When the target dependency resource list corresponding to the above-mentioned application to be adapted does not exist in the above-mentioned application data table, a search is performed in the model data table based on the first application identifier, the first system hardware and software environment information and the i-th first dynamic link library name to obtain the target dependency resource information corresponding to the i-th first dynamic link library name; the fields of the above-mentioned model data table specifically include: the third application identifier, the third system hardware and software environment information, the second dynamic link library name and the dependency resource information; the data records of the above-mentioned model data table are determined according to the successful adaptation plan corresponding to the successfully adapted application; i is a positive integer not greater than N.
[0062] The embodiment of the present application first obtains the first application identifier, the first application version number, the first system hardware and software environment information and N first dynamic link library names corresponding to the application to be adapted, and then searches in the application data table based on the above-mentioned first application identifier and the first system hardware and software environment information to obtain a list of target dependent resources corresponding to the above-mentioned application to be adapted.
[0063] Since the data records of the above-mentioned application data table are obtained according to the successful adaptation scheme corresponding to the successfully adapted application, the fields of the above-mentioned application data table specifically include: the second application identifier, the second application version number, the second system hardware and software environment information and the dependency resource list, and the above-mentioned successful adaptation scheme may include: the dependency resources used by the successfully adapted application; in this way, the above-mentioned dependency resource list may also include: the dependency resources used by the successfully adapted application. On this basis, the target dependency resource list obtained by the embodiment of the present application according to the above-mentioned first application identifier, the first application version number and the first system hardware and software environment information can be matched with the application to be adapted. The embodiment of the present application utilizes the application data table to obtain the target dependency resource list for the application to be adapted, which can save the manpower and time costs of trying to install various dependency libraries and repeated testing, and can improve the application adaptation efficiency in the compatibility layer environment.
[0064] Furthermore, in an embodiment of the present application, when the target dependency resource list corresponding to the above-mentioned application to be adapted does not exist in the above-mentioned application data table, a search is performed in the model data table based on the first application identifier, the first system hardware and software environment information and the i-th first dynamic link library name to obtain the target dependency resource information corresponding to the i-th first dynamic link library name.
[0065] Since the data records of the above-mentioned model data table are obtained according to the successful adaptation scheme corresponding to the successfully adapted application, the fields of the above-mentioned model data table specifically include: the third application identifier, the third system software and hardware environment information, the second dynamic link library name and the dependent resource information, and the above-mentioned successful adaptation scheme may include: the dependent resources used by the successfully adapted application; in this way, the above-mentioned dependent resource information may also include: the dependent resources used by the successfully adapted application for the second dynamic link library name. On this basis, the target dependent resource list obtained by the embodiment of the present application according to the above-mentioned first application identifier, the first system software and hardware environment information and the i-th first dynamic link library name can match the i-th first dynamic link library name included in the application to be adapted. The embodiment of the present application utilizes the method of obtaining the target dependent resource information for the i-th first dynamic link library name included in the application to be adapted in the model data table, which can save the manpower cost and time cost of trying to install various dependent libraries and repeated testing, and can improve the application adaptation efficiency in the compatibility layer environment.
[0066] Reference Figure 1 , shows a schematic diagram of an application environment of an application adaptation method in a compatibility layer environment of an embodiment of the present invention, wherein the client 101 and the server 102 can interact with data based on a wireless network or a wired network.
[0067] In actual applications, the client 101 may be a client application running under a first operating system. After opening the client 101, the user may select an application to be adapted. The client 101 may then automatically obtain a first application identifier, first system hardware and software environment information, and N first dynamic link library names corresponding to the application to be adapted, and send the first application identifier, first system hardware and software environment information, and N first dynamic link library names corresponding to the application to be adapted to the server 102.
[0068] Optionally, the client 101 may send a request to the server 102, where the request may include: a first application identifier corresponding to the application to be adapted, first system hardware and software environment information, and N first dynamic link library names.
[0069] Alternatively, the client 101 may be an application developed based on QT. QT is a cross-platform C++ graphical user interface application development framework developed by QT in 1991. It can be used to develop both GUI (Graphical User Interface) programs and non-GUI programs.
[0070] After receiving the request sent by the client 101 , the server 102 may process the request using the method of the embodiment of the present application to obtain a recommended adaptation solution corresponding to the application to be adapted, and return the recommended adaptation solution to the client 101 .
[0071] Wherein, if the target dependency resource list corresponding to the application to be adapted exists in the application data table, the recommended adaptation solution may include: the target dependency resource list corresponding to the application to be adapted. If the target dependency resource list corresponding to the application to be adapted does not exist in the application data table, the recommended adaptation solution may include: the target dependency resource information corresponding to the name of the i-th first dynamic link library.
[0072] It is understood that the method in which the server 102 returns the recommended adaptation solution to the client 101 is only an optional embodiment. In fact, the client 101 can also use the method of the embodiment of the present application to obtain the recommended adaptation solution corresponding to the application to be adapted and provide the recommended adaptation solution to the user.
[0073] Method Example 1
[0074] refer to Figure 2 , shows a schematic flow chart of the steps of an application adaptation method in a compatibility layer environment according to an embodiment of the present application. The compatibility layer environment is provided by compatibility layer software running on a first operating system. The method specifically includes the following steps:
[0075] Step 201: Obtain a first application identifier, a first application version number, first system hardware and software environment information, and N first dynamic link library names corresponding to the application to be adapted; the N first dynamic link library names are derived from the executable file of the application to be adapted, and the executable file of the application to be adapted meets the requirements of the second operating system; N is a positive integer;
[0076] Step 202: Based on the first application identifier, the first application version number, and the first system hardware and software environment information, a search is performed in the application data table to obtain a target dependent resource list corresponding to the application to be adapted; the fields of the application data table specifically include: a second application identifier, a second application version number, the second system hardware and software environment information, and a dependent resource list; based on the successful adaptation solution corresponding to the successfully adapted application, a data record in the application data table is determined; the successful adaptation solution includes: dependent resources used by the successfully adapted application;
[0077] Step 203: When there is no target dependency resource list corresponding to the application to be adapted in the application data table, a search is performed in the model data table according to the first application identifier, the first system hardware and software environment information and the i-th first dynamic link library name to obtain the target dependency resource information corresponding to the i-th first dynamic link library name; the fields of the above-mentioned model data table specifically include: a third application identifier, a third system hardware and software environment information, a second dynamic link library name and dependency resource information; according to the successful adaptation plan corresponding to the successfully adapted application, the data record of the above-mentioned model data table is determined; i is a positive integer not greater than N.
[0078] Figure 2 The illustrated method embodiment can obtain a target dependent resource list or target dependent resource information for the application to be adapted, thereby reducing the cost of obtaining dependent resources of the application to be adapted, thereby improving the application adaptation efficiency in the compatibility layer environment.
[0079] Figure 2 The steps included in the method embodiment shown can be executed by the client or the server. Figure 2 The specific execution subject of the illustrated method embodiment is not limited.
[0080] In actual applications, the client can run on a first operating system, and the first operating system can also run compatibility layer software. The compatibility layer software can be used to provide a compatibility layer environment.
[0081] Application adaptation in a compatibility layer environment allows applications running on a second operating system to be processed within the compatibility layer environment running on a first operating system. Applications running on the second operating system may include executable files of the adapted applications that meet the requirements of the second operating system. These executable files may include PE (Portable Executable) files.
[0082] Processing an application of the second operating system in a compatibility layer environment running on the first operating system specifically includes: installing the application to be adapted in the compatibility layer environment; after successful installation, launching the application to be adapted; and after successful launching, using the functions of the application to be adapted. The embodiments of the present application do not limit the specific type of the application to be adapted; for example, the type of the application to be adapted may include: document processing type, image processing type, etc.
[0083] The dependency resources of the embodiments of the present application can be used to install dependencies or use dependencies. Wherein, installation dependencies refer to installing other applications or libraries that are dependent on and need to be used on a computer in order to run or compile an application. The dependency resources corresponding to the installation dependency may include: an installation package of a third-party application (hereinafter referred to as the dependency package), or a dependent dynamic link library (hereinafter referred to as the dependency library).
[0084] Dependent usage scenarios can include boot-up scenarios or file opening scenarios, which require the use of registry resources. For example, registry resources can be used to configure the startup of the application to be adapted. In another example, registry resources can be used to configure the opening of files of preset types by the application to be adapted.
[0085] Before installing the application to be adapted, you need to determine the dependent resources corresponding to the application to be adapted. The types of dependent resources can include: dependent libraries, dependent packages, or dependent registry resources.
[0086] In step 201, after opening the client, the user can select an application to be adapted. In this case, the process of obtaining the first application identifier, first system hardware and software environment information, and N first dynamic link library names corresponding to the application to be adapted in step 201 specifically includes: the client obtains the first application identifier, first system hardware and software environment information, and N first dynamic link library names corresponding to the application to be adapted. The N first dynamic link library names can be derived from the import table of the executable file.
[0087] In an optional implementation, the client may send the first application identifier, the first system hardware and software environment information, and N first dynamic link library names corresponding to the application to be adapted to the server. For example, the client may send a request to the server, and the request may include: the first application identifier, the first system hardware and software environment information, and N first dynamic link library names corresponding to the application to be adapted. In this case, the process of obtaining the first application identifier, the first system hardware and software environment information, and N first dynamic link library names corresponding to the application to be adapted in step 201 specifically includes: the server receives the first application identifier, the first application version number, the first system hardware and software environment information, and N first dynamic link library names corresponding to the application to be adapted from the client.
[0088] The first application identifier may represent an identifier of the application to be adapted, which may be the name of the application to be adapted. The first application version number may represent a version number of the application to be adapted.
[0089] The first system software and hardware environment information may include: operating system information where the compatibility layer software is located, and hardware environment information of the electronic device where the compatibility layer software is located.
[0090] The operating system information may include at least one of the following information: the name of the operating system, the version of the operating system, and kernel information of the operating system.
[0091] In actual applications, operating system information can be obtained by calling the system or reading a specific file. An example of operating system information is "FandDe:5.0-S210 64bit Kernel:5.4.0-100-generic," where "FandDe:5.0-S210 64bit" indicates the operating system and version, and "Kernel:5.4.0-100-generic" indicates the operating system kernel information.
[0092] Hardware environment information may include but is not limited to: processor information, memory information, graphics card information, display information, etc.
[0093] The processor information may include information such as the manufacturer information of the processor, the model or architecture information of the processor, the frequency information of the processor, the number of bits of the processor, and the number of cores of the processor.
[0094] Memory information may include: total memory, available memory and other information.
[0095] Graphics card information: You can get graphics card information by calling related graphics library functions.
[0096] Display information: You can use X Window System related functions to obtain display information.
[0097] In the embodiment of the present application, the process of obtaining the first application identifier, the first application version number, the first system hardware and software environment information, and the names of N first dynamic link libraries corresponding to the application to be adapted in step 201 specifically includes:
[0098] Step A1: obtaining the location information of the PE file header from the DOS (Disk Operating System) file header of the executable file;
[0099] Step A2: Obtain the content of the PE file header according to the location information of the PE file header;
[0100] Step A3: Obtain the data directory structure and the relative virtual address of the import table contained in the data directory structure from the content of the PE file header;
[0101] Step A4: Obtain the content of the import table according to the relative virtual address of the import table;
[0102] Step A5: Obtain the dynamic link library name in the import table according to the relative virtual address of the dynamic link library name contained in the import descriptor in the content of the import table; one import descriptor corresponds to one dynamic link library name.
[0103] In actual applications, the import descriptors in the import table can be traversed to read the dynamic link library name in each import descriptor in turn. Examples of dynamic link library names in the import table include: "mscoree.dll, msvcr100.dll, d3d11.dll, OLEDB.dll".
[0104] In step 202, the process of searching the application data table based on the first application identifier, the first application version number, and the first system hardware and software environment information specifically includes: a first matching of the first application identifier with the second application identifier in the application data table, a second matching of the first application version number with the second application version number in the application data table, and a third matching of the first system hardware and software environment information with the second system hardware and software environment information in the application data table. If the first, second, and third matching results are all successful, the search is considered a hit, and a list of target dependent resources corresponding to the application to be adapted is obtained.
[0105] Table 1 shows an example of an application data table according to an embodiment of the present application. Specifically, the fields include: a second application identifier, a second application version number, operating system information, CPU architecture information, and a list of dependent resources. The operating system information and CPU architecture information are specific examples of the second system's hardware and software environment information.
[0106] Table 1
[0107] Second application identifier Second application version number Operating system information CPU architecture information Dependent resource list Application A 1.1 System A Architecture 1 List 1 Application A 1.2 System A Architecture 1 List 2 Application A 1.2 System A Architecture 2 List 3 ... ... ... ... ...
[0108] The data records of the above-mentioned application data table are obtained according to the successful adaptation scheme corresponding to the successfully adapted application. In the fields of the application data table, the second application identifier and the second application version number jointly determine the executable application of the successfully adapted application, and the second system hardware and software environment information determines the operating environment of the successfully adapted application. In this way, when the first matching result and the second matching result are both successful matches, it can be considered that the application to be adapted and the successfully adapted application correspond to the same application and the same executable file. When the third matching result is a successful match, it can be considered that the application to be adapted and the successfully adapted application correspond to the same operating environment. Therefore, the target dependent resource list obtained by the embodiment of the present application based on the above-mentioned first application identifier, the first application version number and the first system hardware and software environment information can match both the executable file of the application to be adapted and the operating environment of the application to be adapted. Therefore, the above-mentioned target dependent resource list can match the application to be adapted.
[0109] The embodiment of the present application can generate a data record in the application data table based on a successful adaptation plan. Accordingly, the above method may further include: obtaining a successful adaptation plan corresponding to the successfully adapted application; the above successful adaptation plan may include: dependent resources corresponding to the fourth dynamic link library name in the import table of the successfully adapted application; and generating a first data record in the application data table based on the successful adaptation plan and the characteristic information of the successfully adapted application.
[0110] The characteristic information of the successfully adapted application specifically includes: a fourth application identifier, a fourth application version number, fourth system hardware and software environment information, and M fourth dynamic link library names in the import table, where M can be a positive integer.
[0111] The process of generating the first data record in the application data table specifically includes: using the fourth application identifier as the second application identifier in the first data record, using the fourth application version number as the second application version number in the first data record, and using the fourth system hardware and software environment information as the second system hardware and software environment information in the first data record; summarizing the dependent resources corresponding to the M fourth dynamic link library names in the import table to obtain a list of dependent resources in the first data record.
[0112] The dependent resource corresponding to the fourth dynamic link library name may be: the fourth dynamic link library name and the version number of the fourth dynamic link library name, thereby locating the specific fourth dynamic link library. Alternatively, the dependent resource corresponding to the fourth dynamic link library name may be: the first dependent resource name and the version number of the first dependent resource name, thereby locating the specific first dependent resource. The dependent resource may be the dependent resource corresponding to the fourth dynamic link library. The type of the first dependent resource may include: a dynamic link library, an application installation package, or a registry resource, etc.
[0113] In practical applications, a fourth dynamic link library name may correspond to one or more first dependent resources. In this embodiment of the present application, all first dependent resources corresponding to the fourth dynamic link library names may be added to the dependent resource list, thereby generating the first data record.
[0114] Those skilled in the art may set other fields in the application data table based on actual application requirements. For example, the application data table may also include application rating information. Application rating information can represent the degree of adaptation between the application and the compatibility layer environment. For example, the application rating information may include: P levels, where P is a positive integer. The larger the value of P, the higher the degree of adaptation. For example, P can be 5. An application rating of level 1 may indicate that the application failed to install in the compatibility layer environment. An application rating of level 2 may indicate that the application successfully installed but failed to start in the compatibility layer environment. An application rating of level 3 may indicate that the application successfully installed and started in the compatibility layer environment, but S functions are unavailable. An application rating of level 4 may indicate that the application successfully installed and started in the compatibility layer environment, but T functions are unavailable. S and T can both be natural numbers, with S greater than T. An application rating of level 5 may indicate that the application successfully installed and started in the compatibility layer environment, and all functions are available.
[0115] When the client reports a successful adaptation solution to the server, it may also report the application rating information corresponding to the successfully adapted application to the server. The application rating information is usually: P level or P-1 level.
[0116] When there are multiple target dependent resource lists corresponding to the above-mentioned applications to be adapted in the application data table, the embodiment of the present application can filter the multiple target dependent resource lists according to the application rating information to select the one with the highest application rating information from the target dependent resource list as the recommended adaptation solution.
[0117] In an example of the present application, assuming that the characteristic information of the application A to be adapted specifically includes: application A+1.2 (application version number)+system A+architecture 1, the embodiment of the present application can be based on the search of the application data table shown in Table 1, and use List 2 in data record 2 (the second data record) in Table 1 as the target dependent resource list corresponding to the application A to be adapted.
[0118] In an example of the present application, it is assumed that the characteristic information of the application B to be adapted specifically includes: application A+1.3 (application version number)+system A+architecture 1. It is assumed that the embodiment of the present application is based on the search of the application data table, and the target dependent resource list corresponding to the application B to be adapted is not found in the application data table, then step 203 can be executed.
[0119] In step 203, if the target dependent resource list corresponding to the application to be adapted does not exist in the application data table, the model data table will be searched for the i-th first dynamic link library name to obtain the target dependent resource information corresponding to the i-th first dynamic link library name.
[0120] The process of searching the model data table based on the first application identifier, the first system hardware and software environment information, and the i-th first dynamic link library name specifically includes: performing a fourth match between the first application identifier and the third application identifier in the model data table, performing a fifth match between the first system hardware and software environment information and the third system hardware and software environment information in the model data table, and performing a sixth match between the first dynamic link library name and the second dynamic link library name in the model data table. If the fourth, fifth, and sixth match results are all successful matches, the search is considered a hit, and the target dependent resource information corresponding to the i-th first dynamic link library name can be obtained.
[0121] Table 2 shows an example of a model data table for one embodiment of the present application. Specifically, its fields include: a third application identifier, operating system information, CPU architecture information, a second dynamic link library name, and dependent resource information. The operating system information and CPU architecture information are specific examples of the third system hardware and software environment information.
[0122] Table 2
[0123] Third application identifier Operating system information CPU architecture information Second dynamic link library name Dependent resource information Application A System A Architecture 1 Link library name A Dependency Resource A+ Version 1 Application B System A Architecture 1 Link library name A Dependency Resource A+ Version 2 Application A System A Architecture 2 Link library name B Dependency Resources B+ Version 2 ... ... ... ... ...
[0124] The data records in the aforementioned model data table are obtained based on the successful adaptation solutions corresponding to the successfully adapted applications. Within the fields of the model data table, the third application identifier identifies the application set for the successfully adapted application, the third system hardware and software environment information identifies the operating environment for the application set, and the second dynamic link library name identifies the dynamic link library name contained in the import table for the application set. An application set can be defined as an application defined by a combination of the third application identifier and multiple application version numbers. For example, Application A + Version Number 1, Application A + Version Number 2, and so on, Application A + Version Number n are all part of the application set corresponding to the application identifier "Application A."
[0125] In this way, when the fourth matching result is a successful match, it can be considered that the application to be adapted and the successfully adapted application correspond to the same application identifier. When the fifth matching result is a successful match, it can be considered that the application to be adapted and the successfully adapted application correspond to the same operating environment. When the sixth matching result is a successful match, it can be considered that the i-th first dynamic link library name of the application to be adapted and the second link library name of the successfully adapted application correspond to the same link library name. Therefore, the target dependent resource information corresponding to the i-th first dynamic link library name obtained by the embodiment of the present application based on the first application identifier, the first system hardware and software environment information and the i-th first dynamic link library name can be matched with the first application identifier of the application to be adapted, can be matched with the operating environment of the application to be adapted, and can be matched with the i-th first dynamic link library name of the application to be adapted; therefore, the above-mentioned target dependent resource information can match the i-th first dynamic link library name.
[0126] In an example of the present application, it is assumed that the characteristic information of the application B to be adapted specifically includes: application A+1.3 (application version number)+system A+architecture 1. Assuming that the embodiment of the present application is based on the search of the application data table shown in Table 1, and the target dependent resource list corresponding to the application B to be adapted is not found in the application data table, then a search can be performed in the model data table shown in Table 2. Specifically, a search can be performed in the model data table shown in Table 2 for each first dynamic link library name contained in the import table of the application B to be adapted. For example, based on the search in Table 2, the first data record in Table 2 is hit: application A+system A+architecture 1+link library name A+dependent resource A+version 1. In this way, the target dependent resource determined for the link library name A contained in the import table of the application B to be adapted is specifically: dependent resource A+version 1.
[0127] By applying the technical solution of the embodiment of the present application, when the application corresponding to the first application identifier and the first application version number does not provide a successful adaptation solution, a model data table can still be constructed based on the successful adaptation solution provided by the first application identifier, and a recommendation service for the adaptation solution can be provided to the application to be adapted corresponding to the first application identifier and the first application version number based on the model data table.
[0128] In actual applications, the N first dynamic link library names in the import table can be traversed to obtain the target dependency resource information corresponding to the i-th first dynamic link library name. It should be noted that the search result corresponding to the i-th first dynamic link library name can be a search hit or a search miss, and accordingly, the target dependency resource information corresponding to the i-th first dynamic link library name may exist or not.
[0129] The embodiment of the present application can generate a data record in the model data table based on a successful adaptation plan. Accordingly, the above method may further include: obtaining a successful adaptation plan corresponding to the successfully adapted application; the above successful adaptation plan may include: dependent resources corresponding to the fourth dynamic link library name in the import table of the successfully adapted application; and generating a second data record in the model data table based on the successful adaptation plan and the characteristic information of the successfully adapted application.
[0130] The difference between the application data table and the model data table lies in the different fields and the different search results.
[0131] The fields of the first data record in the application data table specifically include: a second application identifier, a second application version number, second system hardware and software environment information, and a list of dependent resources. The fields of the second data record in the model data table include: a third application identifier, third system hardware and software environment information, a second dynamic link library name, and dependent resource information.
[0132] If a search in the application data table is successful, the target dependency resource list corresponding to the search result may include the dependency resources corresponding to the N first dynamic link library names. If a search in the model data table is successful, the target dependency resource information corresponding to the search result will be the dependency resource corresponding to one of the N first dynamic link library names. Therefore, N searches are required in the model data table to obtain the dependency resources corresponding to the N first dynamic link library names.
[0133] The characteristic information of the successfully adapted application specifically includes: a fourth application identifier, a fourth application version number, fourth system hardware and software environment information, and M fourth dynamic link library names in the import table, where M can be a positive integer.
[0134] The process of generating the second data record in the model data table specifically includes: using the fourth application identifier as the third application identifier in the second data record, using the fourth system hardware and software environment information as the third system hardware and software environment information in the second data record, using the dynamic link library name as the third system hardware and software environment information in the second data record, and using the dependent resources corresponding to the fourth dynamic link library name as the dependent resource information in the second data record.
[0135] In a specific implementation, the model data table may include: multiple target dependency resource information corresponding to the i-th first dynamic link library name. The following technical solution of the embodiment of the present application can directly obtain a type of target dependency resource information based on the search of the model data table, or can filter the multiple target dependency resource information obtained by the search.
[0136] Technical solution 1,
[0137] Technical Solution 1 can directly obtain target dependent resource information based on the search of the model data table.
[0138] In Technical Solution 1, the fields of the model data table may further include: associated link library information; when the target dependent resource list corresponding to the application to be adapted does not exist in the application data table, the process of searching in the model data table according to the first application identifier, the first system hardware and software environment information, and the i-th first dynamic link library name specifically includes:
[0139] Step B1: if the target dependent resource list corresponding to the application to be adapted does not exist in the application data table, determining the first associated link library information corresponding to the i-th first dynamic link library name according to the N first dynamic link library names in the import table;
[0140] Step B2: Search in the model data table according to the first application identifier, the first system hardware and software environment information, the i-th first dynamic link library name, and the first associated link library information to obtain the target dependent resource information corresponding to the i-th first dynamic link library name.
[0141] For the model data table, the second associated link library information may be the link library name that appears simultaneously with the fourth link library name in the import table of the successfully adapted application. In other words, the associated link library information may include the link library names in the import table of the successfully adapted application, excluding the fourth link library name. For example, if the import table of the successfully adapted application includes link library name 1 through link library name M, the second associated link library information corresponding to link library name 1 may include link library name 2 through link library name M.
[0142] Similarly, the first associated link library information corresponding to the i-th first dynamic link library name may include: (N-1) link library names in the import table of the application to be adapted except the i-th first dynamic link library name.
[0143] The process of searching the model data table in step B2 specifically includes: performing a fourth match between the first application identifier and the third application identifier in the model data table, performing a fifth match between the first system hardware and software environment information and the third system hardware and software environment information in the model data table, performing a sixth match between the first dynamic link library name and the second dynamic link library name in the model data table, and performing a seventh match between the first associated link library information and the second associated link library information in the model data table. If the fourth, fifth, sixth, and seventh match results are all successful matches, the search is considered a hit, and the target dependent resource information corresponding to the i-th first dynamic link library name is obtained.
[0144] Technical Solution 2,
[0145] Technical Solution 2 can filter the multiple target dependent resource information obtained through searching to obtain one type of target dependent resource information.
[0146] In Technical Solution 2, the fields of the model data table may further include: associated link library information; in the case where the target dependent resource list corresponding to the application to be adapted does not exist in the application data table, searching in the model data table according to the first application identifier, the first system hardware and software environment information, and the i-th first dynamic link library name includes:
[0147] Step C1: If the target dependent resource list corresponding to the application to be adapted does not exist in the application data table, searching in the model data table according to the first application identifier, the first system hardware and software environment information, and the name of the i-th first dynamic link library to obtain candidate dependent resource information corresponding to the i-th first dynamic link library name;
[0148] Step C2: when there are multiple candidate dependent resource information, determine the first associated link library information corresponding to the i-th first dynamic link library name according to the N first dynamic link library names in the import table;
[0149] Step C3: Filter multiple candidate dependent resource information according to the first associated link library information to obtain target dependent resource information corresponding to the i-th first dynamic link library name.
[0150] Among them, step C3 is the process of screening multiple alternative dependent resource information, specifically including: matching the first associated link library information with the second associated link library information corresponding to the multiple alternative dependent resource information in the model data table, and using the successfully matched alternative dependent resource information as the target dependent resource information corresponding to the i-th first dynamic link library name.
[0151] Technical solution 3,
[0152] Technical Solution 3 can filter the multiple target dependent resource information found to obtain one type of target dependent resource information.
[0153] In technical solution 3, the fields of the model data table may further include: application rating information;
[0154] In the case where the target dependent resource list corresponding to the application to be adapted does not exist in the application data table, the process of searching in the model data table according to the first application identifier, the first system hardware and software environment information, and the i-th first dynamic link library name specifically includes:
[0155] Step D1: If the target dependent resource list corresponding to the application to be adapted does not exist in the application data table, searching in the model data table according to the first application identifier, the first system hardware and software environment information, and the i-th first dynamic link library name to obtain candidate dependent resource information corresponding to the i-th first dynamic link library name;
[0156] Step D2: When there are multiple candidate dependent resource information, the multiple candidate dependent resource information are screened according to the application rating information corresponding to the candidate dependent resource information to obtain the target dependent resource information corresponding to the i-th first dynamic link library name.
[0157] The application rating information can characterize the degree of adaptation between the application and the compatibility layer environment, which can be obtained by the user based on the adaptation result of the application. For example, the application rating information may include: P levels, P is a positive integer, and the larger the value of P, the higher the degree of adaptation. For example, P can be 5. If the application rating information is level 4, it can be explained that: the application is successfully installed and started in the compatibility layer environment, but T functions cannot be used. S and T can both be natural numbers, and S is greater than T. If the application rating information is level 5, it can be explained that: the application is successfully installed and started in the compatibility layer environment, and all functions can be used normally. Optionally, in the model data table of the embodiment of the present application, data records of level 4 or above corresponding to the application rating information can be recorded, and data records of level 3 or below corresponding to the application rating information can be not recorded.
[0158] The process of screening multiple candidate dependency resource information in the embodiment of the present application specifically includes: selecting the one with the highest adaptability represented by the application rating information from the multiple candidate dependency resource information as the target dependency resource information corresponding to the i-th first dynamic link library name.
[0159] In one implementation of the present application, the process of obtaining the first application identifier, the first system hardware and software environment information, and the N first dynamic link library names corresponding to the application to be adapted specifically includes: the server receiving the first application identifier, the first application version number, the first system hardware and software environment information, and the N first dynamic link library names corresponding to the application to be adapted from the client;
[0160] The above method may also include: when there is a target dependency resource list corresponding to the application to be adapted in the application data table, returning the target dependency resource list as a recommended adaptation solution to the client; when there is no target dependency resource list corresponding to the application to be adapted in the application data table, and there is target dependency resource information corresponding to the i-th first dynamic link library name in the model data table, returning the target dependency resource information corresponding to the i-th first dynamic link library name as a recommended adaptation solution to the client.
[0161] It should be noted that the recommended adaptation solution may include: target dependency resource information corresponding to multiple items of the i-th first dynamic link library name in the import table. For example, if the import table contains N first dynamic link library names, the recommended adaptation solution may include: target dependency resource information for M first dynamic link library names, where M may be a positive integer not greater than N.
[0162] regardless Figure 2 In the first embodiment of the method, whether executed by the client or the server, the client can output a recommended adaptation solution to the user. The recommended adaptation solution specifically includes: a list of target dependent resources corresponding to the application to be adapted; or target dependent resource information corresponding to the name of the i-th first dynamic link library.
[0163] In summary, the application adaptation method in the compatibility layer environment of the embodiment of the present application first obtains the first application identifier, the first application version number, the first system software and hardware environment information and N first dynamic link library names corresponding to the application to be adapted, and then searches in the application data table according to the above-mentioned first application identifier and the first system software and hardware environment information to obtain the target dependent resource list corresponding to the above-mentioned application to be adapted.
[0164] Since the data records of the above-mentioned application data table are obtained according to the successful adaptation scheme corresponding to the successfully adapted application, the fields of the above-mentioned application data table specifically include: the second application identifier, the second application version number, the second system hardware and software environment information and the dependency resource list, and the above-mentioned successful adaptation scheme may include: the dependency resources used by the successfully adapted application; in this way, the above-mentioned dependency resource list may also include: the dependency resources used by the successfully adapted application. On this basis, the target dependency resource list obtained by the embodiment of the present application according to the above-mentioned first application identifier, the first application version number and the first system hardware and software environment information can be matched with the application to be adapted. The embodiment of the present application utilizes the application data table to obtain the target dependency resource list for the application to be adapted, which can save the manpower and time costs of trying to install various dependency libraries and repeated testing, and can improve the application adaptation efficiency in the compatibility layer environment.
[0165] Furthermore, in an embodiment of the present application, when the target dependency resource list corresponding to the above-mentioned application to be adapted does not exist in the above-mentioned application data table, a search is performed in the model data table based on the first application identifier, the first system hardware and software environment information and the i-th first dynamic link library name to obtain the target dependency resource information corresponding to the i-th first dynamic link library name.
[0166] Since the data records of the above-mentioned model data table are obtained according to the successful adaptation scheme corresponding to the successfully adapted application, the fields of the above-mentioned model data table specifically include: the third application identifier, the third system software and hardware environment information, the second dynamic link library name and the dependent resource information, and the above-mentioned successful adaptation scheme may include: the dependent resources used by the successfully adapted application; in this way, the above-mentioned dependent resource information may also include: the dependent resources used by the successfully adapted application for the second dynamic link library name. On this basis, the target dependent resource list obtained by the embodiment of the present application according to the above-mentioned first application identifier, the first system software and hardware environment information and the i-th first dynamic link library name can match the i-th first dynamic link library name included in the application to be adapted. The embodiment of the present application utilizes the method of obtaining the target dependent resource information for the i-th first dynamic link library name included in the application to be adapted in the model data table, which can save the manpower cost and time cost of trying to install various dependent libraries and repeated testing, and can improve the application adaptation efficiency in the compatibility layer environment.
[0167] Method Example 2
[0168] refer to Figure 3 , which shows a flowchart of the steps of an application adaptation method in a compatibility layer environment according to an embodiment of the present application. The compatibility layer environment may be provided by compatibility layer software running on a first operating system. The method may be applied to a server and may specifically include the following steps:
[0169] Step 301: The server receives from the client a first application identifier, a first application version number, first system hardware and software environment information, and N first dynamic link library names corresponding to the application to be adapted; the N first dynamic link library names are derived from the executable file of the application to be adapted, and the executable file of the application to be adapted meets the requirements of the second operating system; N is a positive integer;
[0170] Step 302: The server searches the application data table based on the first application identifier, the first application version number, and the first system hardware and software environment information to obtain a target dependent resource list corresponding to the application to be adapted; the fields of the application data table include: a second application identifier, a second application version number, the second system hardware and software environment information, and a dependent resource list; and determines a data record in the application data table based on a successful adaptation solution corresponding to the successfully adapted application; the successful adaptation solution includes: dependent resources used by the successfully adapted application;
[0171] Step 303: If the server has a target dependent resource list corresponding to the application to be adapted in the application data table, the server returns the target dependent resource list as a recommended adaptation solution to the client.
[0172] Step 304: If the server does not have a target dependent resource list corresponding to the application to be adapted in the application data table, the server searches the model data table based on the first application identifier, the first system hardware and software environment information, and the i-th first dynamic link library name to obtain target dependent resource information corresponding to the i-th first dynamic link library name; the fields of the model data table include: a third application identifier, the third system hardware and software environment information, the second dynamic link library name, and dependent resource information; and the server determines a data record in the model data table based on the successful adaptation solution corresponding to the successfully adapted application; i is a positive integer not greater than N.
[0173] Step 305: If the server does not have a target dependency resource list corresponding to the application to be adapted in the application data table, and the server has target dependency resource information corresponding to the i-th first dynamic link library name in the model data table, the server returns the target dependency resource information corresponding to the i-th first dynamic link library name as a recommended adaptation solution to the client.
[0174] The server of the embodiment of the present application can provide a service for recommending adaptation solutions to the client. In actual applications, the client can send the server a first application identifier, first application version number, first system hardware and software environment information, and N first dynamic link library names corresponding to the application to be adapted in the form of a request. The server can then process the request using the method of the embodiment of the present application to obtain a recommended adaptation solution corresponding to the request.
[0175] Since the server can provide recommended adaptation solutions to the client, the embodiment of the present application can save the client the manpower and time costs of trying to install various dependent libraries and repeated testing, and can improve the application adaptation efficiency in the compatibility layer environment.
[0176] Method Example 3
[0177] refer to Figure 4 , shows a schematic flow chart of the steps of an application adaptation method in a compatibility layer environment according to an embodiment of the present application. The compatibility layer environment may be provided by compatibility layer software running on a first operating system. The method may be applied to a client and may specifically include the following steps:
[0178] Step 401: The client sends a first application identifier, a first application version number, first system hardware and software environment information, and N first dynamic link library names corresponding to the application to be adapted to the server; the N first dynamic link library names are derived from the executable file of the application to be adapted, and the executable file of the application to be adapted meets the requirements of the second operating system; N is a positive integer;
[0179] Step 402: The client receives the recommended adaptation solution returned by the server;
[0180] The recommended adaptation solution specifically includes: a list of target dependent resources corresponding to the application to be adapted; or target dependent resource information corresponding to the name of the i-th first dynamic link library.
[0181] Among them, the server searches in the application data table according to the above-mentioned first application identifier, the first application version number, and the first system hardware and software environment information to obtain the target dependent resource list corresponding to the above-mentioned application to be adapted; the fields of the above-mentioned application data table include: the second application identifier, the second application version number, the second system hardware and software environment information and the dependent resource list; according to the successful adaptation plan corresponding to the successfully adapted application, the data record of the above-mentioned application data table is determined; the above-mentioned successful adaptation plan includes: the dependent resources used by the successfully adapted application; if the server has the target dependent resource list corresponding to the above-mentioned application to be adapted in the above-mentioned application data table, the server will return the above-mentioned target dependent resource list as a recommended adaptation plan to the client.
[0182] Furthermore, when the server does not have a target dependency resource list corresponding to the above-mentioned application to be adapted in the above-mentioned application data table, the server searches in the model data table according to the first application identifier, the first system software and hardware environment information and the i-th first dynamic link library name to obtain the target dependency resource information corresponding to the i-th first dynamic link library name; the fields of the above-mentioned model data table include: a third application identifier, the third system software and hardware environment information, the second dynamic link library name and the dependency resource information; according to the successful adaptation plan corresponding to the successfully adapted application, the data record of the above-mentioned model data table is determined; i is a positive integer not greater than N; when the server does not have a target dependency resource list corresponding to the above-mentioned application to be adapted in the above-mentioned application data table, and the target dependency resource information corresponding to the i-th first dynamic link library name exists in the above-mentioned model data table, the target dependency resource information corresponding to the i-th first dynamic link library name is returned to the client as a recommended adaptation plan.
[0183] The client can also report successful adaptation solutions to the server. In particular, if the successful adaptation solution differs from the recommended adaptation solution, the client can report the successful adaptation solution to the server, so that the server can update and modify the application data table or model data table based on the successful adaptation solution. It is understood that the more successful adaptation solutions the server collects, the more accurate the recommended adaptation solution provided by the server.
[0184] Updating the application data table or the model data table specifically includes: generating a first data record in the application data table based on the successful adaptation solution and the characteristic information of the successfully adapted application; or generating a second data record in the model data table based on the successful adaptation solution and the characteristic information of the successfully adapted application.
[0185] For example, after a user successfully adapts an application to be adapted, the application to be adapted will be converted to an unsuccessfully adapted application. The client can report the successful adaptation solution corresponding to the successfully adapted application to the server. Assuming that the successfully adapted application is application A, the example of the reported information is as follows:
[0186] Application A: mscoree.dll: DotNet46, ado.dll: art2kmin, mfc40u.dll: vcrun2010; operating system information; CPU architecture information.
[0187] The reporting information may include the following fields: application identification of the successfully adapted application, the name of the fourth dynamic link library in the import table of the successfully adapted application, and corresponding dependent resources, operating system information, hardware environment information, etc.
[0188] In the above example, the fourth dynamic link library name and its corresponding dependent resources can include three pairs of information. The first pair is: mscoree.dll:DotNet46, indicating that the dependent resource corresponding to the fourth dynamic link library name "mscoree.dll" is "DotNet46." The second pair is: ado.dll:art2kmin, indicating that the dependent resource corresponding to the fourth dynamic link library name "ado.dll" is "art2kmin." The third pair is: mfc40u.dll:vcrun2010, indicating that the dependent resource corresponding to the fourth dynamic link library name "mfc40u.dll" is "vcrun2010."
[0189] In the embodiment of the present application, a first data record may be generated in the application data table based on the reported information of the above example, wherein the dependent resource list of the first data record specifically includes dependent resources included in the reported information such as DotNet46, art2kmin, and vcrun2010.
[0190] The embodiment of the present application can also generate the following three second data records in Table 3 in the model data table based on the reported information of the above example.
[0191] Table 3
[0192] Third application identifier Operating system information CPU architecture information Second dynamic link library name Dependent resource information Application A xx xx mscoree.dll DotNet46 Application A xx xx ado.dll art2kmin Application A xx xx mfc40u.dll vcrun2010
[0193] In summary, since the server can provide recommended adaptation solutions to the client, the client of the embodiment of the present application can save the manpower and time costs of trying to install various dependent libraries and repeated testing, and can improve the application adaptation efficiency in the compatibility layer environment.
[0194] Method Example 4
[0195] refer to Figure 5 , shows a schematic flow chart of the steps of an application adaptation method in a compatibility layer environment according to an embodiment of the present application. The compatibility layer environment may be provided by compatibility layer software running on a first operating system. The method may specifically include the following steps:
[0196] Step 501: The client sends a first application identifier, a first application version number, first system hardware and software environment information, and N first dynamic link library names corresponding to the application to be adapted to the server; the N first dynamic link library names are derived from the executable file of the application to be adapted, and the executable file of the application to be adapted meets the requirements of the second operating system; N is a positive integer;
[0197] Step 502: The server searches the application data table based on the first application identifier, the first application version number, and the first system hardware and software environment information to obtain a target dependent resource list corresponding to the application to be adapted; the fields of the application data table include: a second application identifier, a second application version number, the second system hardware and software environment information, and a dependent resource list; and the server determines a data record in the application data table based on a successful adaptation solution corresponding to the successfully adapted application; the successful adaptation solution includes: dependent resources used by the successfully adapted application;
[0198] Step 503: If the server has a target dependent resource list corresponding to the application to be adapted in the application data table, the server returns the target dependent resource list as a recommended adaptation solution to the client.
[0199] Step 504: If the server does not have a target dependent resource list corresponding to the application to be adapted in the application data table, the server searches the model data table based on the first application identifier, the first system hardware and software environment information, and the i-th first dynamic link library name to obtain target dependent resource information corresponding to the i-th first dynamic link library name; the fields of the model data table include: a third application identifier, the third system hardware and software environment information, the second dynamic link library name, and dependent resource information; and the server determines a data record in the model data table based on the successful adaptation solution corresponding to the successfully adapted application; i is a positive integer not greater than N.
[0200] Step 505: If the server does not have a target dependency resource list corresponding to the application to be adapted in the application data table, and the server has target dependency resource information corresponding to the i-th first dynamic link library name in the model data table, the server returns the target dependency resource information corresponding to the i-th first dynamic link library name as a recommended adaptation solution to the client.
[0201] In the embodiment of the present application, the server can take advantage of its abundant computing resources to quickly obtain a recommended adaptation solution and provide the recommended adaptation solution to at least one client.
[0202] It should be noted that for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the order of the actions described, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.
[0203] Based on the above embodiment, this embodiment further provides an application adaptation device in a compatibility layer environment, wherein the compatibility layer environment is provided by the compatibility layer software running on the first operating system. Figure 6 As shown in the structural diagram, the device specifically includes: an acquisition module 601, an application data table search module 602 and a model data table search module 603.
[0204] The acquisition module 601 is configured to acquire a first application identifier, a first application version number, first system hardware and software environment information, and N first dynamic link library names corresponding to the application to be adapted; the N first dynamic link library names are derived from the executable file of the application to be adapted, and the executable file of the application to be adapted meets the requirements of the second operating system; N is a positive integer;
[0205] The application data table search module 602 is configured to search the application data table based on the first application identifier, the first application version number, and the first system hardware and software environment information to obtain a target dependent resource list corresponding to the application to be adapted; the fields of the application data table include: a second application identifier, a second application version number, the second system hardware and software environment information, and a dependent resource list; determine the data record of the application data table based on the successful adaptation solution corresponding to the successfully adapted application; the successful adaptation solution includes: dependent resources used by the successfully adapted application;
[0206] The model data table search module 603 is used to search in the model data table according to the first application identifier, the first system hardware and software environment information and the i-th first dynamic link library name when the target dependency resource list corresponding to the application to be adapted does not exist in the application data table, so as to obtain the target dependency resource information corresponding to the i-th first dynamic link library name; the fields of the model data table include: the third application identifier, the third system hardware and software environment information, the second dynamic link library name and the dependency resource information; the data record of the model data table is determined according to the successful adaptation solution corresponding to the successfully adapted application; i is a positive integer not greater than N.
[0207] Optionally, the fields of the model data table may further include: associated link library information;
[0208] The model data table search module 603 includes:
[0209] a first associated information determining module configured to determine, if a target dependent resource list corresponding to the application to be adapted does not exist in the application data table, first associated link library information corresponding to the i-th first dynamic link library name based on the N first dynamic link library names in the import table;
[0210] The first model data table search module is used to search in the model data table according to the first application identifier, the first system hardware and software environment information, the i-th first dynamic link library name, and the first associated link library information to obtain the target dependent resource information corresponding to the i-th first dynamic link library name.
[0211] Optionally, the fields of the model data table may further include: associated link library information;
[0212] The model data table search module 603 includes:
[0213] A second model data table search module is configured to search the model data table for candidate dependent resource information corresponding to the i-th first dynamic link library name based on the first application identifier, the first system hardware and software environment information, and the i-th first dynamic link library name, if the target dependent resource list corresponding to the application to be adapted does not exist in the application data table;
[0214] a second associated information determining module, configured to determine, when there are multiple candidate dependent resource information, first associated link library information corresponding to the i-th first dynamic link library name according to the N first dynamic link library names in the import table;
[0215] The first screening module is used to screen a plurality of candidate dependent resource information according to the first associated link library information to obtain target dependent resource information corresponding to the i-th first dynamic link library name.
[0216] Optionally, the fields of the model data table may further include: application rating information;
[0217] The model data table search module 603 includes:
[0218] A second model data table search module is configured to search the model data table for candidate dependent resource information corresponding to the i-th first dynamic link library name based on the first application identifier, the first system hardware and software environment information, and the i-th first dynamic link library name, if the target dependent resource list corresponding to the application to be adapted does not exist in the application data table;
[0219] The second screening module is used to screen the multiple candidate dependency resource information according to the application rating information corresponding to the candidate dependency resource information when there are multiple candidate dependency resource information to obtain the target dependency resource information corresponding to the i-th first dynamic link library name.
[0220] Optionally, the acquisition module is located at the server end, and is specifically configured to receive from the client a first application identifier, a first application version number, first system software and hardware environment information, and N first dynamic link library names corresponding to the application to be adapted;
[0221] The device further comprises:
[0222] A first solution returning module is configured to return the target dependent resource list corresponding to the application to be adapted as a recommended adaptation solution to the client if the target dependent resource list corresponding to the application to be adapted exists in the application data table;
[0223] The second solution returning module is used to return the target dependency resource information corresponding to the i-th first dynamic link library name as a recommended adaptation solution to the client when there is no target dependency resource list corresponding to the application to be adapted in the application data table and there is target dependency resource information corresponding to the i-th first dynamic link library name in the model data table.
[0224] Optionally, the device further comprises:
[0225] A successful adaptation solution acquisition module is used to obtain a successful adaptation solution corresponding to a successfully adapted application; the successful adaptation solution includes: dependent resources corresponding to the fourth dynamic link library name in the import table of the successfully adapted application;
[0226] A first generating module is configured to generate a first data record in the application data table according to the successful adaptation solution and characteristic information of the successfully adapted application; the fields of the first data record include: a second application identifier, a second application version number, second system software and hardware environment information, and a dependent resource list;
[0227] The second generation module is used to generate a second data record in the model data table based on the successful adaptation plan and the characteristic information of the successfully adapted application; the fields of the second data record include: a third application identifier, third system hardware and software environment information, a second dynamic link library name and dependent resource information.
[0228] Optionally, the first system software and hardware environment information includes: operating system information where the compatibility layer software is located, and hardware environment information of the electronic device where the compatibility layer software is located.
[0229] In summary, the application adaptation device in the compatibility layer environment of the embodiment of the present application first obtains the first application identifier, the first application version number, the first system software and hardware environment information and N first dynamic link library names corresponding to the application to be adapted, and then searches in the application data table according to the above-mentioned first application identifier and the first system software and hardware environment information to obtain the target dependent resource list corresponding to the above-mentioned application to be adapted.
[0230] Since the data records of the above-mentioned application data table are obtained according to the successful adaptation scheme corresponding to the successfully adapted application, the fields of the above-mentioned application data table specifically include: the second application identifier, the second application version number, the second system hardware and software environment information and the dependency resource list, and the above-mentioned successful adaptation scheme may include: the dependency resources used by the successfully adapted application; in this way, the above-mentioned dependency resource list may also include: the dependency resources used by the successfully adapted application. On this basis, the target dependency resource list obtained by the embodiment of the present application according to the above-mentioned first application identifier, the first application version number and the first system hardware and software environment information can be matched with the application to be adapted. The embodiment of the present application utilizes the application data table to obtain the target dependency resource list for the application to be adapted, which can save the manpower and time costs of trying to install various dependency libraries and repeated testing, and can improve the application adaptation efficiency in the compatibility layer environment.
[0231] Furthermore, in an embodiment of the present application, when the target dependency resource list corresponding to the above-mentioned application to be adapted does not exist in the above-mentioned application data table, a search is performed in the model data table based on the first application identifier, the first system hardware and software environment information and the i-th first dynamic link library name to obtain the target dependency resource information corresponding to the i-th first dynamic link library name.
[0232] Since the data records of the above-mentioned model data table are obtained according to the successful adaptation scheme corresponding to the successfully adapted application, the fields of the above-mentioned model data table specifically include: the third application identifier, the third system software and hardware environment information, the second dynamic link library name and the dependent resource information, and the above-mentioned successful adaptation scheme may include: the dependent resources used by the successfully adapted application; in this way, the above-mentioned dependent resource information may also include: the dependent resources used by the successfully adapted application for the second dynamic link library name. On this basis, the target dependent resource list obtained by the embodiment of the present application according to the above-mentioned first application identifier, the first system software and hardware environment information and the i-th first dynamic link library name can match the i-th first dynamic link library name included in the application to be adapted. The embodiment of the present application utilizes the method of obtaining the target dependent resource information for the i-th first dynamic link library name included in the application to be adapted in the model data table, which can save the manpower cost and time cost of trying to install various dependent libraries and repeated testing, and can improve the application adaptation efficiency in the compatibility layer environment.
[0233] The present application also provides an application adaptation device in a compatibility layer environment. The compatibility layer environment may be provided by compatibility layer software running on a first operating system. The device may be applied to a server and may specifically include the following modules:
[0234] A receiving module, configured to receive from a client a first application identifier, a first application version number, first system hardware and software environment information, and N first dynamic link library names corresponding to the application to be adapted; the N first dynamic link library names are derived from the executable file of the application to be adapted, and the executable file of the application to be adapted meets the requirements of the second operating system; N is a positive integer;
[0235] An application data table search module is configured to search the application data table based on the first application identifier, the first application version number, and the first system hardware and software environment information to obtain a target dependent resource list corresponding to the application to be adapted; the fields of the application data table include: a second application identifier, a second application version number, the second system hardware and software environment information, and a dependent resource list; determine data records in the application data table based on a successful adaptation solution corresponding to a successfully adapted application; the successful adaptation solution includes: dependent resources used by the successfully adapted application;
[0236] A first solution returning module is configured to return the target dependent resource list corresponding to the application to be adapted as a recommended adaptation solution to the client if the target dependent resource list corresponding to the application to be adapted exists in the application data table;
[0237] A model data table search module is configured to search the model data table for target dependent resource information corresponding to the i-th first dynamic link library name, if the target dependent resource list corresponding to the application to be adapted does not exist in the application data table, based on the first application identifier, the first system hardware and software environment information, and the i-th first dynamic link library name, to obtain target dependent resource information corresponding to the i-th first dynamic link library name; the fields of the model data table include: a third application identifier, the third system hardware and software environment information, the second dynamic link library name, and dependent resource information; determine a data record in the model data table based on a successful adaptation solution corresponding to a successfully adapted application; i is a positive integer not greater than N;
[0238] The second solution returning module is used to return the target dependency resource information corresponding to the i-th first dynamic link library name as a recommended adaptation solution to the client when there is no target dependency resource list corresponding to the above-mentioned application to be adapted in the above-mentioned application data table and there is target dependency resource information corresponding to the i-th first dynamic link library name in the above-mentioned model data table.
[0239] The server of the embodiment of the present application can provide a service for recommending adaptation solutions to the client. In actual applications, the client can send the server a first application identifier, first application version number, first system hardware and software environment information, and N first dynamic link library names corresponding to the application to be adapted in the form of a request. The server can then process the request using the method of the embodiment of the present application to obtain a recommended adaptation solution corresponding to the request.
[0240] Since the server can provide recommended adaptation solutions to the client, the embodiment of the present application can save the client the manpower and time costs of trying to install various dependent libraries and repeated testing, and can improve the application adaptation efficiency in the compatibility layer environment.
[0241] The present application also provides an application adaptation device in a compatibility layer environment. The compatibility layer environment may be provided by compatibility layer software running on a first operating system. The device may be applied to a client and may specifically include the following modules:
[0242] a sending module, configured to send to the server a first application identifier, a first application version number, first system hardware and software environment information, and N first dynamic link library names corresponding to the application to be adapted; the N first dynamic link library names are derived from the executable file of the application to be adapted, and the executable file of the application to be adapted meets the requirements of the second operating system; N is a positive integer;
[0243] The receiving module is used to receive the recommended adaptation solution returned by the server. The client can also output the recommended adaptation solution so that the user can adapt the application in the compatibility layer environment according to the recommended adaptation solution. The above application adaptation specifically includes: installing, launching, and using the application to be adapted.
[0244] The recommended adaptation solution specifically includes: a list of target dependent resources corresponding to the application to be adapted; or target dependent resource information corresponding to the name of the i-th first dynamic link library.
[0245] Among them, the server searches in the application data table according to the above-mentioned first application identifier, the first application version number, and the first system hardware and software environment information to obtain the target dependent resource list corresponding to the above-mentioned application to be adapted; the fields of the above-mentioned application data table include: the second application identifier, the second application version number, the second system hardware and software environment information and the dependent resource list; according to the successful adaptation plan corresponding to the successfully adapted application, the data record of the above-mentioned application data table is determined; the above-mentioned successful adaptation plan includes: the dependent resources used by the successfully adapted application; if the server has the target dependent resource list corresponding to the above-mentioned application to be adapted in the above-mentioned application data table, the server will return the above-mentioned target dependent resource list as a recommended adaptation plan to the client.
[0246] Furthermore, when the server does not have a target dependency resource list corresponding to the above-mentioned application to be adapted in the above-mentioned application data table, the server searches in the model data table according to the first application identifier, the first system software and hardware environment information and the i-th first dynamic link library name to obtain the target dependency resource information corresponding to the i-th first dynamic link library name; the fields of the above-mentioned model data table include: a third application identifier, the third system software and hardware environment information, the second dynamic link library name and the dependency resource information; according to the successful adaptation plan corresponding to the successfully adapted application, the data record of the above-mentioned model data table is determined; i is a positive integer not greater than N; when the server does not have a target dependency resource list corresponding to the above-mentioned application to be adapted in the above-mentioned application data table, and the target dependency resource information corresponding to the i-th first dynamic link library name exists in the above-mentioned model data table, the target dependency resource information corresponding to the i-th first dynamic link library name is returned to the client as a recommended adaptation plan.
[0247] An embodiment of the present application further provides a non-volatile readable storage medium, which stores one or more modules (programs). When the one or more modules are applied to a device, the device can execute instructions (instructions) of each method step in the embodiment of the present application.
[0248] The present application provides one or more machine-readable media having instructions stored thereon, which, when executed by one or more processors, cause an electronic device to perform one or more of the methods described in the above embodiments. In the present application, the electronic device includes various types of devices such as terminal devices and servers (clusters).
[0249] The embodiments of the present disclosure may be implemented as a device configured as desired using any appropriate hardware, firmware, software, or any combination thereof, and the device may include: a terminal device, a server (cluster), and other electronic devices. Figure 7 An exemplary apparatus 1100 that can be used to implement various embodiments described in this application is schematically illustrated.
[0250] For one embodiment, Figure 7 An exemplary apparatus 1100 is shown having one or more processors 1102, a control module (chip set) 1104 coupled to at least one of the processor(s) 1102, a memory 1106 coupled to the control module 1104, a non-volatile memory / storage device 1108 coupled to the control module 1104, one or more input / output devices 1110 coupled to the control module 1104, and a network interface 1112 coupled to the control module 1104.
[0251] The processor 1102 may include one or more single-core or multi-core processors, and the processor 1102 may include any combination of general-purpose processors or dedicated processors (e.g., graphics processors, application processors, baseband processors, etc.). In some embodiments, the apparatus 1100 can serve as a terminal device, server (cluster), or other device described in the embodiments of the present application.
[0252] In some embodiments, the apparatus 1100 may include one or more computer-readable media (e.g., memory 1106 or non-volatile memory / storage 1108) having instructions 1114 and one or more processors 1102 configured, in combination with the one or more computer-readable media, to execute the instructions 1114 to implement a module to perform the actions described in the present disclosure.
[0253] For one embodiment, the control module 1104 may include any suitable interface controller to provide any suitable interface to at least one of the processor(s) 1102 and / or any suitable device or component in communication with the control module 1104 .
[0254] The control module 1104 may include a memory controller module to provide an interface to the memory 1106. The memory controller module may be a hardware module, a software module, and / or a firmware module.
[0255] The memory 1106 may be used, for example, to load and store data and / or instructions 1114 for the device 1100. For one embodiment, the memory 1106 may include any suitable volatile memory, such as a suitable DRAM (Dynamic Random Access Memory). In some embodiments, the memory 1106 may include a double data rate type four synchronous dynamic random access memory.
[0256] For one embodiment, the control module 1104 may include one or more input / output controllers to provide an interface to the non-volatile memory / storage device 1108 and the input / output device(s) 1110 .
[0257] For example, the non-volatile memory / storage device 1108 may be used to store data and / or instructions 1114. The non-volatile memory / storage device 1108 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable non-volatile storage device(s) (e.g., one or more hard disk drives, one or more optical disk drives, and / or one or more digital versatile optical disk drives).
[0258] The non-volatile memory / storage device 1108 may include storage resources that are physically part of the device on which the apparatus 1100 is installed, or it may be accessible to the device without being part of the device. For example, the non-volatile memory / storage device 1108 may be accessed via one or more input / output devices 1110 over a network.
[0259] (One or more) input / output devices 1110 may provide an interface for apparatus 1100 to communicate with any other appropriate devices. Input / output devices 1110 may include communication components, audio components, sensor components, etc. Network interface 1112 may provide an interface for apparatus 1100 to communicate via one or more networks. Apparatus 1100 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols, for example, accessing a wireless network based on a communication standard such as WiFi (Wireless Fidelity), 2G (2nd Generation Wireless Telephone Technology), 3G (3rd Generation Wireless Telephone Technology), 4G (4th Generation Wireless Telephone Technology), 5G (5th Generation Wireless Telephone Technology), etc., or a combination thereof for wireless communication.
[0260] For one embodiment, at least one of the processor(s) 1102 may be packaged together with the logic of one or more controllers (e.g., a memory controller module) of the control module 1104. For one embodiment, at least one of the processor(s) 1102 may be packaged together with the logic of one or more controllers of the control module 1104 to form a system-in-package. For one embodiment, at least one of the processor(s) 1102 may be integrated on the same die with the logic of one or more controllers of the control module 1104. For one embodiment, at least one of the processor(s) 1102 may be integrated on the same die with the logic of one or more controllers of the control module 1104 to form a system-on-chip.
[0261] In various embodiments, apparatus 1100 may be, but is not limited to, a terminal device such as a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a touchscreen device, a netbook, etc.). In various embodiments, apparatus 1100 may have more or fewer components and / or a different architecture. For example, in some embodiments, apparatus 1100 includes one or more cameras, a keyboard, an LCD screen (including a touchscreen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit, and a speaker.
[0262] Among them, the main control chip can be used as a processor or control module in the detection device, sensor data, location information, etc. are stored in a memory or non-volatile memory / storage device, the sensor group can be used as an input / output device, and the communication interface can include a network interface.
[0263] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0264] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0265] The present application embodiment is described with reference to the flow chart and / or block diagram of the method, terminal device (system), and computer program product according to the embodiment of the present application. It should be understood that each process and / or box in the flow chart and / or block diagram, and the combination of the process and / or box in the flow chart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device produce a device for implementing the function specified in one process or multiple processes in the flow chart and / or one box or multiple boxes in the block diagram.
[0266] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0267] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce computer-implemented processing, so that the instructions executed on the computer or other programmable terminal device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0268] Although preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the basic inventive concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0269] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that includes the element.
[0270] The above is a detailed introduction to the application adaptation method and device in a compatibility layer environment, an electronic device and a machine-readable medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present application, there will be changes in the specific implementation methods and application sets. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. An application adaptation method in a compatibility layer environment, characterized in that: The compatibility layer environment is provided by compatibility layer software running on the first operating system, and the method includes: Obtaining a first application identifier, a first application version number, first system hardware and software environment information, and N first dynamic link library names corresponding to the application to be adapted; the N first dynamic link library names are derived from the executable file of the application to be adapted, and the executable file of the application to be adapted meets the requirements of the second operating system; N is a positive integer; Based on the first application identifier, the first application version number, and the first system hardware and software environment information, a search is performed in the application data table to obtain a target dependent resource list corresponding to the application to be adapted; the fields of the application data table include: a second application identifier, a second application version number, the second system hardware and software environment information, and a dependent resource list; based on a successful adaptation solution corresponding to a successfully adapted application, a data record of the application data table is determined; the successful adaptation solution includes: dependent resources used by the successfully adapted application; In the case that the target dependent resource list corresponding to the application to be adapted does not exist in the application data table, a search is performed in the model data table according to the first application identifier, the first system software and hardware environment information and the i-th first dynamic link library name to obtain the target dependent resource information corresponding to the i-th first dynamic link library name; the fields of the model data table include: a third application identifier, a third system software and hardware environment information, a second dynamic link library name and dependent resource information; according to the successful adaptation scheme corresponding to the successfully adapted application, the data record of the model data table is determined; i is a positive integer not greater than N; the first application identifier is matched with the third application identifier in the model data table for the fourth time, the first system software and hardware environment information is matched with the third system software and hardware environment information in the model data table for the fifth time, and the i-th first dynamic link library name is matched with the second dynamic link library name in the model data table for the sixth time; when the fourth matching result, the fifth matching result and the sixth matching result are all successful matches, the target dependent resource information corresponding to the i-th first dynamic link library name is obtained; The fields of the model data table further include: associated link library information, or application rating information; In the case where the target dependent resource list corresponding to the application to be adapted does not exist in the application data table, searching in the model data table according to the first application identifier, the first system hardware and software environment information, and the i-th first dynamic link library name includes: If the target dependent resource list corresponding to the application to be adapted does not exist in the application data table, searching in the model data table according to the first application identifier, the first system hardware and software environment information, and the i-th first dynamic link library name to obtain the candidate dependent resource information corresponding to the i-th first dynamic link library name; In the case where there are multiple alternative dependent resource information, the multiple alternative dependent resource information are screened according to the first associated link library information or the application rating information corresponding to the alternative dependent resource information to obtain the target dependent resource information corresponding to the i-th first dynamic link library name; wherein, the first associated link library information corresponding to the i-th first dynamic link library name is determined according to the N first dynamic link library names in the import table.
2. The method according to claim 1, characterized in that The obtaining of the first application identifier, the first application version number, the first system hardware and software environment information, and the N first dynamic link library names corresponding to the application to be adapted includes: The server receives from the client a first application identifier, a first application version number, first system hardware and software environment information, and N first dynamic link library names corresponding to the application to be adapted; The method further comprises: If a target dependent resource list corresponding to the application to be adapted exists in the application data table, returning the target dependent resource list as a recommended adaptation solution to the client; When there is no target dependency resource list corresponding to the application to be adapted in the application data table, and there is target dependency resource information corresponding to the i-th first dynamic link library name in the model data table, the target dependency resource information corresponding to the i-th first dynamic link library name is returned to the client as a recommended adaptation solution.
3. The method according to claim 1, characterized in that The method further comprises: Obtaining a successful adaptation solution corresponding to a successfully adapted application; the successful adaptation solution includes: dependent resources corresponding to the fourth dynamic link library name in the import table of the successfully adapted application; Generating a first data record in the application data table according to the successful adaptation solution and characteristic information of the successfully adapted application; wherein the fields of the first data record include: a second application identifier, a second application version number, second system software and hardware environment information, and a dependent resource list; According to the successful adaptation plan and the characteristic information of the successfully adapted application, a second data record in the model data table is generated; the fields of the second data record include: a third application identifier, third system hardware and software environment information, a second dynamic link library name and dependent resource information.
4. The method according to claim 1, wherein The first system software and hardware environment information includes: operating system information where the compatibility layer software is located, and hardware environment information of the electronic device where the compatibility layer software is located.
5. An application adaptation device in a compatibility layer environment, characterized in that: The compatibility layer environment is provided by compatibility layer software running on the first operating system, and the device includes: an acquisition module, configured to acquire a first application identifier, a first application version number, first system hardware and software environment information, and N first dynamic link library names corresponding to the application to be adapted; the N first dynamic link library names are derived from an executable file of the application to be adapted, and the executable file of the application to be adapted meets the requirements of the second operating system; N is a positive integer; An application data table search module is configured to search an application data table based on the first application identifier, the first application version number, and the first system hardware and software environment information to obtain a target dependent resource list corresponding to the application to be adapted; the fields of the application data table include: a second application identifier, a second application version number, the second system hardware and software environment information, and a dependent resource list; determine data records in the application data table based on a successful adaptation solution corresponding to a successfully adapted application; the successful adaptation solution includes: dependent resources used by the successfully adapted application; A model data table search module is used to search in the model data table according to the first application identifier, the first system hardware and software environment information and the i-th first dynamic link library name when the target dependency resource list corresponding to the application to be adapted does not exist in the application data table, so as to obtain the target dependency resource information corresponding to the i-th first dynamic link library name; the fields of the model data table include: a third application identifier, a third system hardware and software environment information, a second dynamic link library name and dependency resource information; according to the successful adaptation scheme corresponding to the successfully adapted application, the data record of the model data table is determined; i is a positive integer not greater than N; the first application identifier is matched with the third application identifier in the model data table for the fourth time, the first system hardware and software environment information is matched with the third system hardware and software environment information in the model data table for the fifth time, and the i-th first dynamic link library name is matched with the second dynamic link library name in the model data table for the sixth time; when the fourth matching result, the fifth matching result and the sixth matching result are all successful matches, the target dependency resource information corresponding to the i-th first dynamic link library name is obtained; The fields of the model data table further include: associated link library information, or application rating information; The model data table lookup module includes: A second model data table search module is configured to search the model data table for candidate dependent resource information corresponding to the i-th first dynamic link library name based on the first application identifier, the first system hardware and software environment information, and the i-th first dynamic link library name, if the target dependent resource list corresponding to the application to be adapted does not exist in the application data table; A screening module is used to screen the multiple alternative dependent resource information based on the first associated link library information or the application rating information corresponding to the alternative dependent resource information when there are multiple alternative dependent resource information, so as to obtain the target dependent resource information corresponding to the i-th first dynamic link library name; wherein, the first associated link library information corresponding to the i-th first dynamic link library name is determined based on the N first dynamic link library names in the import table.
6. An electronic device, characterized in that: include: processor; and A memory having executable codes stored thereon, which, when executed, causes the processor to perform the method according to any one of claims 1 to 4.
7. A machine-readable medium having executable code stored thereon, which, when executed, causes a processor to perform the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Method and device for acquiring compatibility of operating system and application program
CN115167882A
Determining compatibility of an application with different versions of an operating system
US20130185708A1