A method and device for obtaining compatibility between an operating system and an application program
By obtaining and improving the dynamic link library and interface collection of operating systems and applications, the compatibility problem between the operating system and applications is solved, and efficient application installation is achieved.
Patent Information
- Application Number
- CN202210903829.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-28
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2042-07-28
AI Technical Summary
The existing technology is difficult to effectively solve the compatibility problem between the operating system and the application, resulting in the failure of application installation, which is time-consuming and labor-intensive, and occupies a large amount of memory space.
By obtaining the dynamic link library collection, interface collection and version information of the operating system, it is written to the database; obtaining the dynamic link library collection and interface collection of first-level dependencies of the application, and indexing the database based on the version information, detecting and improving the database to ensure compatibility.
It realizes high compatibility between the operating system and the application, reduces the failure of application installation, saves installation time, and improves installation efficiency.
Smart Images

Figure CN115167882B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer management technology, and in particular to a method, device, electronic device and computer-readable storage medium for obtaining compatibility between an operating system and an application program. Background Art
[0002] When installing and running an application, the operating system not only calls the packages that come with the packaged application, but also calls some packages or libraries of the operating system. If these packages or libraries cannot be provided when the program is called, the application cannot continue to be installed and run, which means that the application and the operating system are incompatible.
[0003] This situation is very common. For example, based on the open source of the Linux kernel, there are many Linux operating system distributions, such as Ubuntu, Centos, Fedora, etc., and the shared libraries contained in them are also very large. Therefore, unlike Windows, a single Linux operating system distribution does not package the shared libraries of each version into an image for retrieval, but uses a package manager and software source to manage these dependent libraries. In some environments, if the Internet cannot be connected or the specified software source does not have dependent files, compatibility issues will occur when installing applications, resulting in installation failure, time-consuming and labor-intensive, and occupying a large amount of memory space.
[0004] However, when solving such problems, the existing technology cannot obtain all dependent dynamic link libraries and interface information of the application to be detected, and cannot record the dependency information, and cannot solve the compatibility problem from the root. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a method, device, electronic device and computer-readable storage medium for obtaining the compatibility between an operating system and an application, so as to effectively solve the compatibility problem between the operating system and the application, reduce the number of application installation failures, save installation time and improve efficiency.
[0006] In a first aspect, an embodiment of the present application provides a method for obtaining compatibility between an operating system and an application program, the method comprising:
[0007] Acquire a dynamic link library set, an interface set, and version information of the operating system, and write the dynamic link library set and the interface set of the operating system into a first database;
[0008] Acquire a set of dynamic link libraries and a set of interfaces that are primary dependencies of the application, and write the set of dynamic link libraries and the set of interfaces that are primary dependencies of the application into the first database;
[0009] Indexing the second database according to the version information, and detecting whether a set of dynamic link libraries and a set of interfaces that are primary dependencies of the application program exist in the second database;
[0010] If yes, obtain the complete dynamic link library set and interface set of the application;
[0011] If not, perfecting the second database and the dynamic link library set and interface set of the operating system to obtain a perfected second database and a perfected dynamic link library set and interface set of the operating system;
[0012] The dynamic link library set and interface set of the improved operating system and the complete dynamic link library set and interface set of the application are compared to obtain the compatibility of the operating system.
[0013] In the above implementation process, by improving the dynamic link library set and interface set of the operating system and the second database, the application can quickly obtain dependencies during installation, making the resulting compatibility higher, effectively solving the compatibility issues between the operating system and the application, reducing the number of application installation failures, saving installation time, and improving efficiency.
[0014] Furthermore, after the step of obtaining the complete dynamic link library set and interface set of the application, the method further includes:
[0015] The complete dynamic link library set and interface set of the application are written into the second database.
[0016] In the above implementation process, the complete dynamic link library set and interface set of the application are written into the second database, making the second database more complete and improving data support for the installation of the application.
[0017] Furthermore, the step of obtaining a complete set of dynamic link libraries and a set of interfaces of the application program includes:
[0018] Scanning the dynamic link library set and interface set of the primary dependency of the application to obtain the dynamic link library set and interface set of the secondary dependency of the application;
[0019] The complete dynamic link library set and interface set of the application are obtained according to the dynamic link library set and interface set of the primary dependency of the application and the dynamic link library set and interface set of the secondary dependency of the application.
[0020] In the above implementation process, the dynamic link library set and interface set of the secondary dependency of the application are obtained according to the dynamic link library set and interface set of the primary dependency of the application, thereby improving the compatibility with the operating system.
[0021] Furthermore, the step of obtaining a complete set of dynamic link libraries and a set of interfaces of the application further includes:
[0022] Obtaining primary dependency information corresponding to a set of dynamic link libraries and a set of interfaces of primary dependency of the application program;
[0023] Obtain secondary dependency information corresponding to a dynamic link library set and an interface set of secondary dependencies of the application program;
[0024] The primary dependency information and the secondary dependency information are written into the first database.
[0025] In the above implementation process, the primary dependency information and secondary dependency information of the application are written into the first database to facilitate subsequent searches, save time, and improve data support for the installation of the application.
[0026] Furthermore, the step of improving the second database and the dynamic link library set and interface set of the operating system to obtain the improved second database and the improved dynamic link library set and interface set of the operating system includes:
[0027] Determine whether the dynamic link library set and interface set of the primary dependency of the application program are in the dynamic link library set and interface set of the operating system;
[0028] If not, obtaining the dynamic link library corresponding to the version information, and adding the dynamic link library corresponding to the version information to the second database and the dynamic link library set and interface set of the operating system, to obtain the improved second database and the improved dynamic link library set and interface set of the operating system;
[0029] If so, the dynamic link library set and interface set of the primary dependency of the application are added to the second database.
[0030] In the above implementation process, the dynamic link library set and interface set of the operating system and the second database are improved to ensure that there will be no missing dependencies when installing the application, further ensuring the smooth installation of the application.
[0031] Furthermore, the step of obtaining a set of dynamic link libraries and a set of interfaces of the primary dependency of the application program includes:
[0032] Scanning the application to be detected in the operating system to obtain an ELF file of the application;
[0033] The ELF file is parsed to obtain a set of dynamic link libraries and a set of interfaces of the primary dependency of the application.
[0034] In the above implementation process, the ELF file is obtained based on the scanning of the operating system, and the dependency of the application is obtained based on the ELF file, so that the dependency between the operating system and the application is more accurate, thereby improving the compatibility of the operating system and the application.
[0035] In a second aspect, an embodiment of the present application further provides a device for obtaining compatibility between an operating system and an application program, the device comprising:
[0036] an acquisition module, used to acquire the dynamic link library set, interface set and version information of the operating system, and write the dynamic link library set and interface set of the operating system into the first database; and also used to acquire the dynamic link library set and interface set of the primary dependency of the application, and write the dynamic link library set and interface set of the primary dependency of the application into the first database;
[0037] a detection module, configured to index the second database according to the version information, and detect whether the dynamic link library set and interface set of the primary dependency of the application program exists in the second database; if so, obtain the complete dynamic link library set and interface set of the application program; if not, improve the second database and the dynamic link library set and interface set of the operating system, and obtain the improved second database and the improved dynamic link library set and interface set of the operating system;
[0038] The comparison module is used to compare the dynamic link library set and interface set of the improved operating system with the complete dynamic link library set and interface set of the application program to obtain the compatibility of the operating system.
[0039] In the above implementation process, by improving the dynamic link library set and interface set of the operating system and the second database, the application can quickly obtain dependencies during installation, making the resulting compatibility higher, effectively solving the compatibility issues between the operating system and the application, reducing the number of application installation failures, saving installation time, and improving efficiency.
[0040] Furthermore, the device also includes a writing module, which is used to:
[0041] The complete dynamic link library set and interface set of the application are written into the second database.
[0042] In the above implementation process, the complete dynamic link library set and interface set of the application are written into the second database, making the second database more complete and improving data support for the installation of the application.
[0043] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in any one of the first aspects when executing the computer program.
[0044] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which instructions are stored. When the instructions are executed on a computer, the computer executes the method as described in any one of the first aspects.
[0045] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when running on a computer, enables the computer to execute the method as described in any one of the first aspects.
[0046] Other features and advantages of the present disclosure will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present disclosure.
[0047] And it can be implemented according to the contents of the specification. The following is a detailed description of the preferred embodiments of the present application with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0049] Figure 1 A flowchart of a method for obtaining compatibility between an operating system and an application program provided in an embodiment of the present application;
[0050] Figure 2 A schematic diagram of the structure of a device for obtaining compatibility between an operating system and an application program provided in an embodiment of the present application;
[0051] Figure 3 A schematic diagram of the structural composition of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0052] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0053] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0054] The specific implementation methods of the present application are further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present application but are not intended to limit the scope of the present application.
[0055] Embodiment 1
[0056] Figure 1 is a flow chart of a method for obtaining compatibility between an operating system and an application program provided in an embodiment of the present application, such as Figure 1 As shown, the method includes:
[0057] S1, obtaining a dynamic link library set, an interface set and version information of an operating system, and writing the dynamic link library set and the interface set of the operating system into a first database;
[0058] S2, obtaining a set of dynamic link libraries and a set of interfaces that are first-level dependencies of the application, and writing the set of dynamic link libraries and the set of interfaces that are first-level dependencies of the application into a first database;
[0059] S3, indexing the second database according to the version information, detecting whether there is a set of dynamic link libraries and a set of interfaces that are first-level dependencies of the application in the second database, if yes, executing S4, if no, executing S5;
[0060] S4, obtaining a complete set of dynamic link libraries and interface sets of the application;
[0061] S5, improving the second database and the dynamic link library set and the interface set of the operating system to obtain the improved second database and the improved dynamic link library set and the interface set of the operating system;
[0062] S6, comparing the improved dynamic link library set and interface set of the operating system with the complete dynamic link library set and interface set of the application program to obtain the compatibility of the operating system.
[0063] In the above implementation process, by improving the dynamic link library set and interface set of the operating system and the second database, the application can quickly obtain dependencies during installation, making the resulting compatibility higher, effectively solving the compatibility issues between the operating system and the application, reducing the number of application installation failures, saving installation time, and improving efficiency.
[0064] The embodiment of the present application provides a method for obtaining the compatibility between an operating system and an application, which can realize the automatic installation of dependent dynamic link libraries. By cyclically scanning and comparing the differences in dependent dynamic link libraries, the dependent dynamic link libraries can be automatically downloaded to solve the problem of missing dynamic link libraries during the application installation process.
[0065] In S1, the operating system is scanned to obtain the dynamic link library set L and interface set I of the operating system, which are written into the first database. In the embodiment of the present application, the first database is the MySQL database B, and the system version information Z is recorded.
[0066] Furthermore, after the step of obtaining a complete set of dynamic link libraries and a set of interfaces of the application, the method further includes:
[0067] The complete dynamic link library set and interface set of the application are written into the second database.
[0068] In the above implementation process, the complete dynamic link library set and interface set of the application are written into the second database, making the second database more complete and improving data support for the installation of the application.
[0069] Furthermore, S2 includes:
[0070] Scan the application to be detected in the operating system to obtain the ELF file of the application;
[0071] Parse the ELF file to obtain the first-level dependent dynamic link library set and interface set of the application.
[0072] In the above implementation process, the ELF file is obtained based on the scanning of the operating system, and the dependency of the application is obtained based on the ELF file, so that the dependency between the operating system and the application is more accurate, thereby improving the compatibility of the operating system and the application.
[0073] The application to be detected is scanned to obtain an ELF file, and the ELF file is parsed to obtain a first-level dependent dynamic link library set and an interface set of the application to be detected. Optionally, the first-level dependent dynamic link library set and the interface set can be a dynamic link library set X and an interface set Y that are directly dependent on the outside, and are written into a MySQL database B.
[0074] In S3, the data query function of the MySQL database is used to compare whether the dynamic link library set X and the interface set Y that the application depends on are in the second database. Optionally, the second database may be the original database A.
[0075] Furthermore, S4 includes:
[0076] Scan the dynamic link library set and interface set of the first-level dependency of the application to obtain the dynamic link library set and interface set of the second-level dependency of the application;
[0077] The complete dynamic link library set and interface set of the application are obtained according to the dynamic link library set and interface set of the primary dependency of the application and the dynamic link library set and interface set of the secondary dependency of the application.
[0078] In the above implementation process, the dynamic link library set and interface set of the secondary dependency of the application are obtained according to the dynamic link library set and interface set of the primary dependency of the application, thereby improving the compatibility with the operating system.
[0079] Furthermore, S4 also includes:
[0080] Obtaining the primary dependency information corresponding to the dynamic link library set and interface set of the primary dependency of the application;
[0081] Obtain secondary dependency information corresponding to the dynamic link library set and interface set of the secondary dependency of the application;
[0082] The primary dependency information and the secondary dependency information are written into the first database.
[0083] In the above implementation process, the primary dependency information and secondary dependency information of the application are written into the first database to facilitate subsequent searches, save time, and improve data support for the installation of the application.
[0084] If it is detected that the dynamic link library set X and interface set Y of the application exist in the second database, the first-level dependency information is recorded in the dynamic link library set X and the interface set Y, and written into database B, and the dynamic link library set X and the interface set Y of the application are continuously scanned and parsed to obtain the dynamic link library set and the interface set of the second-level dependency of the application to be detected, and the second-level dependency information is recorded in MySQL database B.
[0085] Furthermore, S5 includes:
[0086] Determine whether the dynamic link library set and interface set of the primary dependency of the application program are in the dynamic link library set and interface set of the operating system;
[0087] If not, obtain the dynamic link library corresponding to the version information, and add the dynamic link library corresponding to the version information to the second database and the dynamic link library set and interface set of the operating system to obtain the improved second database and the improved dynamic link library set and interface set of the operating system;
[0088] If so, the dynamic link library set and interface set of the first-level dependency of the application are added to the second database.
[0089] In the above implementation process, the dynamic link library set and interface set of the operating system and the second database are improved to ensure that there will be no missing dependencies when installing the application, further ensuring the smooth installation of the application.
[0090] If it is detected that the dynamic link library set X and the interface set Y of the application do not exist in the second database, the data query function of the MySQL database is used to compare whether the dynamic link library set X and the interface set Y of the application are in the dynamic link library set L and the interface set I of the operating system.
[0091] If it does not exist, access the official website of this version according to the version information, search and download the dynamic link library a to the operating system, add the dynamic link library a to the dynamic link library set X and the interface set Y and the second database, and add a download mark to a.
[0092] In an embodiment of the present application, the existence of the dynamic link library set that the application depends on will be repeatedly determined, and the addition will be performed in a loop until the complete dynamic link library set NL and the interface set NI exist in the operating system. The complete dynamic link library set NL and the interface set NI of the application will be written into the MySQL database A. At this time, all the dynamic link libraries that the application needs to depend on already exist, and system compatibility can be achieved.
[0093] Based on the data query function of MySQL database, the compatibility of the application in the operating system version Z can be obtained by comparing the dynamic link library set L and interface set I of the operating system with the complete dynamic link library set NL and interface set NI of the application.
[0094] By recording the correspondence between the operating system version Z and the dynamic link library dependency chain, the second database can be gradually improved, which can provide certain data support when re-detecting the dynamic link library situation of the application and the operating system. The dependency information can be obtained only by querying the database, saving the time of scanning and parsing ELF files.
[0095] Embodiment 2
[0096] In order to execute the method corresponding to the above embodiment 1 to achieve the corresponding functions and technical effects, a device for obtaining the compatibility between an operating system and an application is provided below, such as Figure 2 As shown, the device comprises:
[0097] Acquisition module 1, used to acquire the dynamic link library set, interface set and version information of the operating system, and write the dynamic link library set and interface set of the operating system into the first database; also used to acquire the dynamic link library set and interface set of the primary dependency of the application, and write the dynamic link library set and interface set of the primary dependency of the application into the first database;
[0098] Detection module 2 is used to index the second database according to the version information, and detect whether there is a dynamic link library set and an interface set of the first-level dependency of the application in the second database; if so, obtain the complete dynamic link library set and interface set of the application; if not, improve the second database and the dynamic link library set and interface set of the operating system to obtain the improved second database and the improved dynamic link library set and interface set of the operating system;
[0099] The comparison module 3 is used to compare the improved dynamic link library set and interface set of the operating system with the complete dynamic link library set and interface set of the application program to obtain the compatibility of the operating system.
[0100] In the above implementation process, by improving the dynamic link library set and interface set of the operating system and the second database, the application can quickly obtain dependencies during installation, making the resulting compatibility higher, effectively solving the compatibility issues between the operating system and the application, reducing the number of application installation failures, saving installation time, and improving efficiency.
[0101] Furthermore, the device also includes a writing module, which is used to:
[0102] The complete dynamic link library set and interface set of the application are written into the second database.
[0103] In the above implementation process, the complete dynamic link library set and interface set of the application are written into the second database, making the second database more complete and improving data support for the installation of the application.
[0104] Furthermore, the detection module 2 is also used for:
[0105] Scan the dynamic link library set and interface set of the first-level dependency of the application to obtain the dynamic link library set and interface set of the second-level dependency of the application;
[0106] The complete dynamic link library set and interface set of the application are obtained according to the dynamic link library set and interface set of the primary dependency of the application and the dynamic link library set and interface set of the secondary dependency of the application.
[0107] In the above implementation process, the dynamic link library set and interface set of the secondary dependency of the application are obtained according to the dynamic link library set and interface set of the primary dependency of the application, thereby improving the compatibility with the operating system.
[0108] Furthermore, the detection module 2 is also used for:
[0109] Obtaining the primary dependency information corresponding to the dynamic link library set and interface set of the primary dependency of the application;
[0110] Obtain secondary dependency information corresponding to the dynamic link library set and interface set of the secondary dependency of the application;
[0111] The primary dependency information and the secondary dependency information are written into the first database.
[0112] In the above implementation process, the primary dependency information and secondary dependency information of the application are written into the first database to facilitate subsequent searches, save time, and improve data support for the installation of the application.
[0113] Furthermore, the detection module 2 is also used for:
[0114] Determine whether the dynamic link library set and interface set of the primary dependency of the application program are in the dynamic link library set and interface set of the operating system;
[0115] If not, obtain the dynamic link library corresponding to the version information, and add the dynamic link library corresponding to the version information to the second database and the dynamic link library set and interface set of the operating system to obtain the improved second database and the improved dynamic link library set and interface set of the operating system;
[0116] If so, the dynamic link library set and interface set of the first-level dependency of the application are added to the second database.
[0117] In the above implementation process, the dynamic link library set and interface set of the operating system and the second database are improved to ensure that there will be no missing dependencies when installing the application, further ensuring the smooth installation of the application.
[0118] Furthermore, the acquisition module 1 is also used for:
[0119] Scan the application to be detected in the operating system to obtain the ELF file of the application;
[0120] Parse the ELF file to obtain the first-level dependent dynamic link library set and interface set of the application.
[0121] In the above implementation process, the ELF file is obtained based on the scanning of the operating system, and the dependency of the application is obtained based on the ELF file, so that the dependency between the operating system and the application is more accurate, thereby improving the compatibility of the operating system and the application.
[0122] The above-mentioned device for obtaining the compatibility between the operating system and the application program can implement the method of the above-mentioned embodiment 1. The options in the above-mentioned embodiment 1 are also applicable to this embodiment and will not be described in detail here.
[0123] The rest of the contents of the embodiments of the present application can refer to the contents of the above-mentioned embodiment 1, and will not be repeated in this embodiment.
[0124] Embodiment 3
[0125] An embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the method for obtaining compatibility between an operating system and an application program of embodiment 1.
[0126] Optionally, the above-mentioned electronic device may be a server.
[0127] See also Figure 3 , Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include a processor 31, a communication interface 32, a memory 33 and at least one communication bus 34. The communication bus 34 is used to realize direct connection and communication between these components. The communication interface 32 of the device in the embodiment of the present application is used to communicate signaling or data with other node devices. The processor 31 may be an integrated circuit chip with signal processing capabilities.
[0128] The processor 31 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor 31 can also be any conventional processor, etc.
[0129] The memory 33 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc. The memory 33 stores computer-readable instructions. When the computer-readable instructions are executed by the processor 31, the device can execute the above-mentioned Figure 1 The method embodiment involves various steps.
[0130] Optionally, the electronic device may further include a storage controller and an input / output unit. The memory 33, the storage controller, the processor 31, the peripheral interface, and the input / output unit are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components may be electrically connected to each other via one or more communication buses 34. The processor 31 is used to execute executable modules stored in the memory 33, such as software function modules or computer programs included in the device.
[0131] The input and output unit is used to provide users with the task creation and to create an optional time period or preset execution time for the task to enable interaction between the user and the server. The input and output unit can be, but is not limited to, a mouse and a keyboard.
[0132] Understandably, Figure 3 The structure shown is for illustration only. The electronic device may also include Figure 3 More or fewer components as shown, or with Figure 3 Different configurations are shown. Figure 3 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0133] In addition, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method for obtaining the compatibility between the operating system and the application program of the first embodiment.
[0134] The embodiment of the present application also provides a computer program product, which, when running on a computer, enables the computer to execute the method described in the method embodiment.
[0135] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of boxes in the block diagram and / or the flowchart, can be implemented with a dedicated hardware-based device that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0136] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0137] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0138] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0139] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0140] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
Claims
1. A method for obtaining compatibility between an operating system and an application program, It is characterized in that The method comprises: Acquire a dynamic link library set, an interface set, and version information of the operating system, and write the dynamic link library set and the interface set of the operating system into a first database; Acquire a set of dynamic link libraries and a set of interfaces that are primary dependencies of the application, and write the set of dynamic link libraries and the set of interfaces that are primary dependencies of the application into the first database; Indexing the second database according to the version information, and detecting whether a set of dynamic link libraries and a set of interfaces that are primary dependencies of the application program exist in the second database; If yes, obtain the complete dynamic link library set and interface set of the application; If not, perfecting the second database and the dynamic link library set and interface set of the operating system to obtain a perfected second database and a perfected dynamic link library set and interface set of the operating system; The dynamic link library set and interface set of the improved operating system and the complete dynamic link library set and interface set of the application are compared to obtain the compatibility of the operating system.
2. The method for obtaining compatibility between an operating system and an application according to claim 1, It is characterized in that After the step of obtaining a complete set of dynamic link libraries and a set of interfaces of the application, the method further comprises: The complete dynamic link library set and interface set of the application are written into the second database.
3. The method for obtaining compatibility between an operating system and an application according to claim 1, It is characterized in that The step of obtaining a complete set of dynamic link libraries and a set of interfaces of the application program comprises: Scanning the dynamic link library set and interface set of the primary dependency of the application to obtain the dynamic link library set and interface set of the secondary dependency of the application; The complete dynamic link library set and interface set of the application are obtained according to the dynamic link library set and interface set of the primary dependency of the application and the dynamic link library set and interface set of the secondary dependency of the application.
4. The method for obtaining compatibility between an operating system and an application program according to claim 3, It is characterized in that The step of obtaining a complete set of dynamic link libraries and a set of interfaces of the application program further includes: Obtaining primary dependency information corresponding to a set of dynamic link libraries and a set of interfaces of primary dependency of the application program; Obtain secondary dependency information corresponding to a dynamic link library set and an interface set of secondary dependencies of the application program; The primary dependency information and the secondary dependency information are written into the first database.
5. The method for obtaining compatibility between an operating system and an application program according to claim 1, It is characterized in that The step of improving the second database and the dynamic link library set and interface set of the operating system to obtain the improved second database and the improved dynamic link library set and interface set of the operating system includes: Determine whether the dynamic link library set and interface set of the primary dependency of the application program are in the dynamic link library set and interface set of the operating system; If not, obtaining the dynamic link library corresponding to the version information, and adding the dynamic link library corresponding to the version information to the second database and the dynamic link library set and interface set of the operating system, to obtain the improved second database and the improved dynamic link library set and interface set of the operating system; If so, the dynamic link library set and interface set of the primary dependency of the application are added to the second database.
6. The method for obtaining compatibility between an operating system and an application program according to claim 1, It is characterized in that The step of obtaining the dynamic link library set and interface set of the primary dependency of the application program includes: Scanning the application to be detected in the operating system to obtain an ELF file of the application; The ELF file is parsed to obtain a set of dynamic link libraries and a set of interfaces of the primary dependency of the application.
7. A device for obtaining compatibility between an operating system and an application program, It is characterized in that The device comprises: an acquisition module, used to acquire the dynamic link library set, interface set and version information of the operating system, and write the dynamic link library set and interface set of the operating system into the first database; and also used to acquire the dynamic link library set and interface set of the primary dependency of the application, and write the dynamic link library set and interface set of the primary dependency of the application into the first database; a detection module, configured to index the second database according to the version information, and detect whether the dynamic link library set and interface set of the primary dependency of the application program exists in the second database; if so, obtain the complete dynamic link library set and interface set of the application program; if not, improve the second database and the dynamic link library set and interface set of the operating system, and obtain the improved second database and the improved dynamic link library set and interface set of the operating system; The comparison module is used to compare the dynamic link library set and interface set of the improved operating system with the complete dynamic link library set and interface set of the application program to obtain the compatibility of the operating system.
8. The device for obtaining compatibility between an operating system and an application program according to claim 7, It is characterized in that The device also includes a writing module, which is used for: The complete dynamic link library set and interface set of the application are written into the second database.
9. An electronic device, It is characterized in that The electronic device comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the method for obtaining the compatibility between an operating system and an application program according to any one of claims 1 to 6.
10. A computer-readable storage medium, It is characterized in that The device stores a computer program, which, when executed by a processor, implements the method for obtaining the compatibility between an operating system and an application program as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Management system and method to support interworking with third party products while allowing addition and deletion of function modules
US20230315434A1