Compatible database generation method and computing device

By analyzing the differential data between the target image file and the historical image file of the target system, and updating the historical compatible database to generate the target compatible database, it solves the problem of low efficiency in generating compatible databases during operating system upgrades, and achieves faster database generation time and efficiency.

CN118210781BActive Publication Date: 2025-04-18XFUSION DIGITAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410362235.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-27
Publication Date
2025-04-18
Estimated Expiration
2044-03-27

AI Technical Summary

Technical Problem

During the operating system upgrade, the prior art needs to regenerate compatible databases, resulting in less generation efficiency because repeated analysis of the same data in the target image file and the historical image file is required.

Method used

By analyzing the differential data between the target image file and the historical image file of the target system, update the historical compatible database to generate the target compatible database, and avoid repeated analysis of the same data.

Benefits of technology

Shorten the generation time of target compatible databases and improve the generation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118210781B_ABST
    Figure CN118210781B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a compatible database generation method and computing device, the method comprising: in response to the target system being upgraded to a target version, determining the historical version corresponding to the target version, the target system being the system after the source system is migrated; determining the historical compatible database corresponding to the historical version, the historical compatible database being used to be compatible with the source system and the target system of the historical version; determining differential data according to the target image file corresponding to the target system under the target version and the historical image file corresponding to the target system under the historical version, and updating the historical compatible database according to the differential data to obtain a target compatible database, the target compatible database being used to be compatible with the source system and the target system of the target version. The method avoids repeated analysis of the same data in the image file of the target system in the process of generating the target compatible database, shortens the generation time of the target compatible database, and improves the generation efficiency of the target compatible database.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of server technology, and in particular to a compatible database generation method and computing device. Background Art

[0002] Migration tools can be used to migrate the server's operating system. For example, migration tools can be used to migrate the server's operating system from a source system to a target system. In the process of using migration tools to migrate the operating system, it is necessary to replace, adapt or migrate the operating system and the application software or business system installed on it. Therefore, the migration tool needs to perform compatibility analysis on the source system and the target system.

[0003] In the related art, a compatible database can be pre-generated based on the image files of the source system and the target system of the server to ensure the real-time performance of the compatibility analysis. For example, a source database can be generated based on the image file of the source system, and a target database can be generated based on the image file of the target system; and a difference database can be generated based on the source database and the target database; the compatible database includes the source database, the target database and the difference database.

[0004] However, due to the fast upgrade and iteration speed of the operating system, when the image file of the operating system is updated, the compatibility database corresponding to the updated image file needs to be regenerated. The image file usually includes multiple software packages, which takes a long time to generate the compatibility database, resulting in low efficiency in generating the compatibility database. Summary of the invention

[0005] The embodiment of the present application provides a compatible database generation method and computing device, which can avoid repeated analysis of the same data in the target image file and the historical image file in the process of generating a target compatible database corresponding to the target version, thereby shortening the generation time of the target compatible database and improving the generation efficiency of the target compatible database.

[0006] In a first aspect, an embodiment of the present application provides a method for generating a compatible database, the method comprising:

[0007] In response to the target system being upgraded to a target version, determining a historical version corresponding to the target version, the target system being a system after the source system is migrated;

[0008] Determine the historical compatible database corresponding to the historical version. The historical compatible database is used to be compatible with the source system and the target system of the historical version;

[0009] According to the target image file corresponding to the target system under the target version and the historical image file corresponding to the target system under the historical version, the difference data is determined, and the historical compatibility database is updated according to the difference data to obtain the target compatibility database, which is used to be compatible with the source system and the target system of the target version.

[0010] In the above technical scheme, by analyzing the difference data between the target image file and the historical image file of the target system, and updating the historical compatible database based on the difference data to obtain the target compatible database, it is possible to avoid repeated analysis of the same data under the target image file and the historical image file in the process of generating the target compatible database corresponding to the target version, thereby shortening the generation time of the target compatible database and improving the generation efficiency of the target compatible database.

[0011] In a possible implementation, determining the difference data according to the target image file corresponding to the target system in the target version and the historical image file corresponding to the target system in the historical version includes:

[0012] Determine the change type of the software package in the target image file according to the historical image file and the target image file;

[0013] According to the change type of the software package, the target image file is updated to obtain differential data.

[0014] In the above technical scheme, the difference data between the target image file and the historical image file of the target system can be analyzed according to the types of each software package in the target image file and the historical image file. Based on the difference data, it is possible to avoid repeated analysis of the same data under the target image file and the historical image file in the process of generating the target compatible database corresponding to the target version, thereby shortening the generation time of the target compatible database and improving the generation efficiency of the target compatible database.

[0015] In a possible implementation, the target image file is updated according to the change type of the software package to obtain difference data, including:

[0016] If the change type of the software package is the unchanged type, the software package is deleted from the target image file. The unchanged type is used to indicate that the name and version number of the software package in the target image file and the historical image file are the same;

[0017] If the change type of the software package is a modification type, the change type of the software package is marked as a modification type, and the modification type is used to indicate that the name of the software package in the target image file and the historical image file is the same but the version number is different;

[0018] If the change type of the software package is a new type, the change type of the software package is marked as a new type, and the new type is used to indicate that the target image file includes the software package and the historical image file does not include the software package;

[0019] If the change type of the software package is a deletion type, the software package information of the software package is added to the target image file, and the change type of the software package is marked as a deletion type in the target image file. The deletion type is used to indicate that the target image file does not include the software package and the historical image file includes the software package.

[0020] In the above technical solution, the historical image file and the target image file can be compared to determine the change type of each software package in the target image file, and according to the different change types, each software package in the target image file can be flexibly updated to obtain difference data. Based on the difference data, the historical compatible database can be quickly updated to obtain the target compatible database, thereby improving the update efficiency of the target database.

[0021] In a possible implementation, the historical compatible database is updated according to the difference data to obtain the target compatible database, including:

[0022] Generate a target software package index library of the target system under the target version according to the target image file, the target software package index library is used to store software package information of each software package in the target image file;

[0023] According to the difference data and the target software package index library, the historical compatible database is updated to obtain the target compatible database.

[0024] In the above technical solution, the historical compatible database is updated based on the differential data to obtain the target compatible database, which can avoid repeated analysis of the same data under the target image file and the historical image file in the process of generating the target compatible database corresponding to the target version, thereby shortening the generation time of the target compatible database and improving the generation efficiency of the target compatible database.

[0025] In a possible implementation, the historical compatibility database includes a historical software package index library and a historical software package file library corresponding to the target system under the historical version, the historical software package index library is used to store the software package information of each software package in the historical image file, and the historical software package file library is used to store the historical files corresponding to each software package in the historical image file;

[0026] According to the difference data and the target software package index library, the historical compatibility database is updated to obtain the target compatibility database, including:

[0027] Update the historical package index library in the historical compatibility database to the target package index library;

[0028] Determine the type of change for each software package in the differential data;

[0029] According to the change type of each software package, the historical software package file library is updated to obtain the target compatible database.

[0030] In the above technical solution, the historical compatible database is updated based on the differential data to obtain the target compatible database, which can avoid repeated analysis of the same data under the target image file and the historical image file in the process of generating the target compatible database corresponding to the target version, thereby shortening the generation time of the target compatible database and improving the generation efficiency of the target compatible database.

[0031] In a possible implementation, for any software package in the differential data, the change type of the software package is a modification type; according to the change type of the software package, the historical software package file library is updated, including:

[0032] Decompress the software package to obtain the target file corresponding to the target version of the software package;

[0033] Determine the historical file corresponding to the software package in the historical software package file library;

[0034] Update the historical files in the historical package file library to the target files.

[0035] In the above technical solution, the files corresponding to the software packages involving the modified types in the historical compatible database can be updated separately without repeatedly analyzing the unchanged software packages, which shortens the generation time of the target compatible database and improves the generation efficiency of the target compatible database.

[0036] In a possible implementation, the historical compatibility database further includes a source software package file library corresponding to the source system and a historical difference database corresponding to the target system under the historical version, and the historical difference database is obtained by comparing the historical software package file library with the source software package file library;

[0037] After the historical package library is updated, it also includes:

[0038] Obtain source files corresponding to the software package in the source software package file library, and determine target difference information between the target file and the source file;

[0039] In the historical difference database, the historical difference information corresponding to the software package is updated as the target difference information, where the historical difference information is obtained by comparing the historical file with the source file.

[0040] In the above technical solution, after the historical software package file library of the modified software package is updated, the historical difference information of the modified software package can also be updated in the historical difference database. This solution can realize the separate update of the data of the modified software package in the historical compatible database, without the need to repeatedly analyze the unchanged software package, thus shortening the generation time of the target compatible database and improving the generation efficiency of the target compatible database.

[0041] In a possible implementation, for any software package in the differential data, the change type of the software package is a new addition type; according to the change type of the software package, the historical software package file library is updated, including:

[0042] Decompress the software package to obtain the target file corresponding to the target version of the software package;

[0043] Add the target file corresponding to the software package to the historical software package file library.

[0044] In the above technical solution, the data of the newly added software packages in the historical compatible database can be updated separately without repeatedly analyzing unchanged software packages, which shortens the generation time of the target compatible database and improves the generation efficiency of the target compatible database.

[0045] In a possible implementation, for any software package in the differential data, the change type of the software package is a deletion type, and the historical compatibility database further includes a source software package file library corresponding to the source system and a historical difference database corresponding to the target system under the historical version, and the historical difference database is obtained by comparing the historical software package file library with the source software package file library;

[0046] Update the historical software package library based on the type of software package changes, including:

[0047] In the difference data, obtain the identifier of the software package;

[0048] According to the identifier of the software package, determine the historical file corresponding to the software package in the historical software package file library, and delete the historical file;

[0049] According to the identifier of the software package, historical difference information corresponding to the software package is determined in the historical difference database, and the historical difference information is deleted.

[0050] In the above technical solution, the data of the deleted software packages in the historical compatible database can be updated separately without repeatedly analyzing unchanged software packages, which shortens the generation time of the target compatible database and improves the generation efficiency of the target compatible database.

[0051] In a possible implementation, determining the historical compatible database corresponding to the historical version includes:

[0052] Obtain the source image file of the source system and the historical image file corresponding to the target system under the historical version;

[0053] Generate a source software package index library and a source software package file library corresponding to the source system according to the source image file, and generate a historical software package index library and a historical software package file library corresponding to the target system under the historical version according to the historical image file;

[0054] Perform difference processing on the source software package file library and the historical software package file library to obtain the historical difference database corresponding to the target system under the historical version;

[0055] The historical compatibility database includes a source software package index library, a source software package file library, a historical software package index library, a historical software package file library and a historical difference database.

[0056] In the above technical scheme, a historical compatibility database corresponding to the historical version of the target system can be generated according to the source image file of the source system and the historical image file corresponding to the target system under the historical version, so that in the subsequent version upgrade process of the target system, the target compatibility database can be obtained based on the update of the historical compatibility database, which reduces the generation time of the target compatibility database and improves the generation efficiency of the target compatibility database.

[0057] In a second aspect, an embodiment of the present application provides a compatible database generating device, the device comprising:

[0058] A determination module, configured to determine a historical version corresponding to the target version in response to the target system being upgraded to the target version, the target system being the system after the source system is migrated;

[0059] The determination module is also used to determine a historical compatible database corresponding to the historical version, and the historical compatible database is used to be compatible with the source system and the target system of the historical version;

[0060] The determination module is further used to determine the difference data according to the target image file corresponding to the target system under the target version and the historical image file corresponding to the target system under the historical version;

[0061] The update module is used to update the historical compatible database according to the difference data to obtain the target compatible database, and the target compatible database is used to be compatible with the source system and the target system of the target version.

[0062] In a possible implementation, the determination module is specifically used for:

[0063] Determine the change type of the software package in the target image file according to the historical image file and the target image file;

[0064] According to the change type of the software package, the target image file is updated to obtain differential data.

[0065] In a possible implementation, the determination module is further configured to:

[0066] If the change type of the software package is the unchanged type, the software package is deleted from the target image file. The unchanged type is used to indicate that the name and version number of the software package in the target image file and the historical image file are the same;

[0067] If the change type of the software package is a modification type, the change type of the software package is marked as a modification type, and the modification type is used to indicate that the name of the software package in the target image file and the historical image file is the same but the version number is different;

[0068] If the change type of the software package is a new type, the change type of the software package is marked as a new type, and the new type is used to indicate that the target image file includes the software package and the historical image file does not include the software package;

[0069] If the change type of the software package is a deletion type, the software package information of the software package is added to the target image file, and the change type of the software package is marked as a deletion type in the target image file. The deletion type is used to indicate that the target image file does not include the software package and the historical image file includes the software package.

[0070] In a possible implementation, the update module is specifically used to:

[0071] Generate a target software package index library of the target system under the target version according to the target image file, the target software package index library is used to store software package information of each software package in the target image file;

[0072] According to the difference data and the target software package index library, the historical compatible database is updated to obtain the target compatible database.

[0073] In a possible implementation, the historical compatibility database includes a historical software package index library and a historical software package file library corresponding to the target system under the historical version, the historical software package index library is used to store the software package information of each software package in the historical image file, and the historical software package file library is used to store the historical files corresponding to each software package in the historical image file; the update module is further specifically used to:

[0074] Update the historical package index library in the historical compatibility database to the target package index library;

[0075] Determine the type of change for each software package in the differential data;

[0076] According to the change type of each software package, the historical software package file library is updated to obtain the target compatible database.

[0077] In a possible implementation, for any software package in the differential data, the change type of the software package is a modification type; and the update module is further configured to:

[0078] Decompress the software package to obtain the target file corresponding to the target version of the software package;

[0079] Determine the historical file corresponding to the software package in the historical software package file library;

[0080] Update the historical files in the historical package file library to the target files.

[0081] In a possible implementation, the historical compatibility database further includes a source software package file library corresponding to the source system and a historical difference database corresponding to the target system under the historical version, and the historical difference database is obtained by comparing the historical software package file library with the source software package file library; after the historical software file library is updated, the update module is specifically further used to:

[0082] Obtain source files corresponding to the software package in the source software package file library, and determine target difference information between the target file and the source file;

[0083] In the historical difference database, the historical difference information corresponding to the software package is updated as the target difference information, where the historical difference information is obtained by comparing the historical file with the source file.

[0084] In a possible implementation, for any software package in the differential data, the change type of the software package is a new addition type; and the update module is further configured to:

[0085] Decompress the software package to obtain the target file corresponding to the target version of the software package;

[0086] Add the target file corresponding to the software package to the historical software package file library.

[0087] In a possible implementation, for any software package in the differential data, the change type of the software package is a deletion type, the historical compatibility database further includes a source software package file library corresponding to the source system and a historical difference database corresponding to the target system under the historical version, and the historical difference database is obtained by comparing the historical software package file library with the source software package file library; the update module is further specifically used for:

[0088] In the difference data, obtain the identifier of the software package;

[0089] According to the identifier of the software package, determine the historical file corresponding to the software package in the historical software package file library, and delete the historical file;

[0090] According to the identifier of the software package, historical difference information corresponding to the software package is determined in the historical difference database, and the historical difference information is deleted.

[0091] In a possible implementation, the determination module is further configured to:

[0092] Obtain the source image file of the source system and the historical image file corresponding to the target system under the historical version;

[0093] Generate a source software package index library and a source software package file library corresponding to the source system according to the source image file, and generate a historical software package index library and a historical software package file library corresponding to the target system under the historical version according to the historical image file;

[0094] Perform difference processing on the source software package file library and the historical software package file library to obtain the historical difference database corresponding to the target system under the historical version;

[0095] The historical compatibility database includes a source software package index library, a source software package file library, a historical software package index library, a historical software package file library and a historical difference database.

[0096] In a third aspect, an embodiment of the present application provides a computing device, including: a processor and a memory; the processor and the memory are coupled;

[0097] The memory is used to store computer instructions;

[0098] The processor is configured to execute computer instructions stored in the memory to perform any method as described in the first aspect.

[0099] In a fourth aspect, an embodiment of the present application provides a chip, which is used to execute any method in the first aspect.

[0100] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, a method as described in any one of the first aspects is implemented.

[0101] In a sixth aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements any method in the first aspect when executed by a processor.

[0102] The compatible database generation method and computing device provided by the embodiment of the present application, in response to the target system being upgraded to the target version, the method determines the historical version corresponding to the target version, the target system being the system after the source system is migrated; determines the historical compatible database corresponding to the historical version, the historical compatible database being used to be compatible with the source system and the target system of the historical version; determines the difference data according to the target image file corresponding to the target system under the target version and the historical image file corresponding to the target system under the historical version, and updates the historical compatible database according to the difference data to obtain the target compatible database, the target compatible database being used to be compatible with the source system and the target system of the target version. The method can avoid repeated analysis of the same data under the target image file and the historical image file in the process of generating the target compatible database corresponding to the target version, shortens the generation time of the target compatible database, and improves the generation efficiency of the target compatible database. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0104] Figure 1 A schematic diagram of an application scenario provided in an embodiment of the present application;

[0105] Figure 2 A flowchart of a compatible database generation method provided in an embodiment of the present application;

[0106] Figure 3 A flowchart of a method for determining differential data provided in an embodiment of the present application;

[0107] Figure 4 A flowchart of a method for updating a historical compatible database provided in an embodiment of the present application;

[0108] Figure 5 A schematic diagram of an update process of a historical software package file library when the change type is a modification type provided in an embodiment of the present application;

[0109] Figure 6 A schematic diagram of an update process of a historical software package file library when the change type is a new addition type provided in an embodiment of the present application;

[0110] Figure 7 A schematic diagram of an update process of a historical software package file library when the change type provided in an embodiment of the present application is a deletion type;

[0111] Figure 8 A schematic diagram of a compatible database generation process provided in an embodiment of the present application;

[0112] Fig. 9 A schematic diagram of the structure of a compatible database generating device provided in an embodiment of the present application;

[0113] Fig.10 A schematic diagram of the hardware structure of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0114] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the appended claims.

[0115] First, the relevant terms involved in the embodiments of the present application are explained.

[0116] Red Hat package management (rpm): A software package name for the Linux operating system, ending in .rpm.

[0117] jar: A software package file format, usually used to aggregate a large number of Java class files, related metadata and resource (text, pictures, etc.) files into one file to develop Java platform application software or libraries.

[0118] Executable and Linkable Format (ELF): A file format for binary files, executable files, object code, shared libraries, and core dump format files. ELF was developed and released by Unex (UNIX) System Laboratories (USL) as an Application Binary Interface (ABI) and is an executable file format for Linux.

[0119] Linux image: is a complete operating system installation package, including the core components of the Linux operating system, system tools, applications and configuration files. Linux images are usually stored in a specific format and can be used to install and deploy Linux systems on computers. For example, the storage format of Linux images can be iso (Isolation) format, img format or img.gz format.

[0120] Community Enterprise Operating System (CentOS): is a server operating system provided free of charge by the open source community.

[0121] Currently, the CentOS community has announced that some versions of the CentOS operating system (for example, CentOS 8 and CentOS 7) have stopped service. After these versions of the CentOS operating system are discontinued, they will bring serious security risks to the application systems deployed on the existing network servers, and thus bring major system security and business continuity risks to users.

[0122] In this scenario, you can use the migration tool to migrate these CentOS operating systems that have stopped service. In the process of using the migration tool to migrate the operating system, it is necessary to replace, adapt or migrate the operating system and the business software or business system installed on it. Therefore, the migration tool needs to perform compatibility analysis on the source system and the target system.

[0123] At present, the compatibility analysis of business software is generally carried out according to the following steps:

[0124] (1) Obtaining dependency information of the business software. For example, the dependency information may include the binary command line, specific version of the dynamic library, and the application programming interface (API) called at runtime that the business software depends on.

[0125] (2) When migrating the source system to the target system, determine whether the target system satisfies all dependency information of the business software; if so, determine that the target system is compatible with the business software; if not, determine that the target system is not compatible with the business software.

[0126] The operating system includes a large number of files. In order to determine whether the target system meets all the dependency information of the business software, it is usually necessary to generate a compatible database in the migration tool in advance to ensure the real-time compatibility analysis of the source system and the target system by the migration tool.

[0127] For example, the migration tool is x2openEuler, and the compatibility analysis function of the migration tool depends on the underlying compatible database of the migration tool. The migration tool also opens a compatible database production platform to facilitate users to generate the compatible database of the migration tool based on the production platform. The migration tool can support different migration paths, and for each migration path, the compatible database corresponding to the migration path needs to be re-created.

[0128] The x2openEuler migration tool supports the migration of the source system (for example, CentOS 7.6) to the target system (for example, openEuler20.03SP3). During the migration process, a compatible database needs to be generated once based on the image files of the source system and the target system. The x2openEuler migration tool can also support the migration of the series version of the source system to the target system. For example, the series version of the source system is source system 7.0 to source system 7.9. When migrating the series version of the source system to the target system, it is necessary to go through 10 migration processes: source system 7.0 migration to target system, source system 7.1 migration to target system,..., source system 7.9 migration to target system. For each migration process, the migration tool needs to generate a compatible database once, so these 10 migration processes need to generate 10 compatible databases.

[0129] In the related art, a compatible database can be pre-generated based on the image files of the source system and the target system of the server to ensure the real-time performance of the compatibility analysis. For example, a source database can be generated based on the image file of the source system, and a target database can be generated based on the image file of the target system; and a difference database can be generated based on the source database and the target database; the compatible database includes the source database, the target database and the difference database.

[0130] Next, combine Figure 1 , the application scenario provided by the embodiment of the present application is described.

[0131] Figure 1 A schematic diagram of an application scenario provided by an embodiment of the present application. Figure 1 In the process of migrating the source system to the target system, a migration tool is needed. The migration tool relies on a compatible database for compatibility analysis. The compatible database is generated based on the image files of the source system and the target system.

[0132] With the upgrade and maintenance of the target operating system, when the version of the image file of the target operating system is updated from the historical version to the target version, it is necessary to regenerate the target compatibility database corresponding to the image file of the target system under the target version.

[0133] In the related art, after the image file version is updated, the source image file of the source system and the updated image file of the target system are usually used to re-create the compatible database. However, the number of software packages included in each image file is usually more than 10,000, and each software package may include several to several thousand binary commands, ELF files, and jar packages, etc., so that the total number of files included in the software packages in the image file can reach millions. This makes it take a long time to perform difference analysis on the source image file and the updated image file (for example, the interface difference of the ELF file), resulting in low efficiency in generating the compatible database.

[0134] In view of this, an embodiment of the present application provides a method for generating a compatible database, which can determine the historical version corresponding to the target version in response to the target system being upgraded to the target version, the target system being the system after the source system is migrated; and determine the historical compatible database corresponding to the historical version, the historical compatible database being used to be compatible with the source system and the target system of the historical version; according to the target image file corresponding to the target system under the target version and the historical image file corresponding to the target system under the historical version, determine the difference data, and update the historical compatible database according to the difference data to obtain the target compatible database, the target compatible database being used to be compatible with the source system and the target system of the target version. In the above method, by analyzing the difference data between the target image file and the historical image file of the target system, and updating the historical compatible database based on the difference data to obtain the target compatible database, it is possible to avoid repeated analysis of the same data under the target image file and the historical image file in the process of generating the target compatible database corresponding to the target version, thereby shortening the generation time of the target compatible database and improving the generation efficiency of the target compatible database.

[0135] The technical solutions of the embodiments of the present application are described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0136] Figure 2 A flowchart of a compatible database generation method provided in an embodiment of the present application. Figure 2 , the method specifically comprises:

[0137] The method may be executed by a computing device, and specifically, may be executed by a processor in the computing device.

[0138] S201: In response to a target system being upgraded to a target version, determine a historical version corresponding to the target version.

[0139] The target system is the system after the source system is migrated. For example, the source system can be operating system 1 released by enterprise A, and the target system can be operating system 2 released by enterprise B.

[0140] The target system and the source system are of the same type of operating system. For example, the target system and the source system are both Linux operating systems.

[0141] The target system can have multiple historical versions, which can be versions used by the target system in historical upgrade processes. For example, in the first upgrade process, the target system version is upgraded from version 1 to version 2. At this time, the historical version is version 1 and the target version is version 2. In the second upgrade process, the target system version is upgraded from version 2 to version 3. At this time, the historical version can be version 1 or version 2, and the target version is version 3.

[0142] S202: Determine the historical compatible database corresponding to the historical version.

[0143] A historical compatibility database can be used to make the source system compatible with the target system's historical versions.

[0144] In a possible implementation, the historical compatible database may be determined through steps S2021 to S2022 as shown below:

[0145] S2021. Obtain the source image file of the source system and the historical image file corresponding to the target system under the historical version.

[0146] In one example, the source image file may be obtained from image repositories corresponding to different systems. For example, the source image file may be obtained from a source image repositories corresponding to a source system.

[0147] S2022. Generate a source software package index library and a source software package file library corresponding to the source system according to the source image file, and generate a historical software package index library and a historical software package file library corresponding to the target system under the historical version according to the historical image file.

[0148] The source package index library is used to store the package information of each package in the source image file, which may include but is not limited to the index, name and version of the package. In the process of generating a software repository (repo source) based on the source image file by using the createrepo command, the source package index library corresponding to the source image file can be automatically generated.

[0149] The source software package index library may be stored in a table form. For example, the source software package index library may be as shown in Table 1:

[0150] Table 1

[0151] Package Index Package Name Package Version 1 Package 1 Version 1 2 Package 2 Version 2 …… …… ……

[0152] The source software package file library may include source files corresponding to each software package in the source image file, and the source files may include the software package identifier, and binary commands, ELF files, and JAR files corresponding to the software package identifier, etc. The binary commands, ELF files, and JAR files corresponding to each software package may be obtained by decompressing each software package in the source image file.

[0153] Each software package and the binary command and ELF file corresponding to each software package may be stored in a table form. For example, the source software package file library may be as shown in Table 2 and Table 3:

[0154] Table 2

[0155]

[0156] Table 3

[0157]

[0158] The historical software package index library can be used to store the software package information of each software package in the historical image file, and the software package information may include but is not limited to the index, name and version of the software package. In the process of generating a software repository (repo source) based on the historical image file by using the createrepo command, the historical software package index library corresponding to the historical image file can be automatically generated.

[0159] The historical software package file library is used to store the historical files corresponding to each software package in the historical image file. The historical files may include the software package identifier, and the binary command, ELF file, and JAR file corresponding to the software package identifier. The binary command, ELF file, and JAR file corresponding to each software package can be obtained by decompressing each software package in the historical image file.

[0160] S2023: Perform difference processing on the source software package file library and the historical software package file library to obtain a historical difference database corresponding to the target system under the historical version.

[0161] The historical difference database includes the historical difference information corresponding to each software package, and the historical difference information can include the difference information corresponding to each ELF file in each software package. For any ELF file in the software package, the ELF file in the source software package file library and the ELF file in the historical software package file library can be analyzed for differences to obtain the difference information of the ELF file. For example, the difference information corresponding to the ELF file can include the addition, deletion and modification information of the interface in the ELF file.

[0162] The historical difference database may be stored in a table form. For example, the historical difference database may be as shown in Table 4:

[0163] Table 4

[0164]

[0165] In the embodiment of the present application, the historical compatibility database may include the above-mentioned source software package index library, source software package file library, historical software package index library, historical software package file library and historical difference database.

[0166] The method for generating a compatible database provided in an embodiment of the present application can generate a historical compatible database corresponding to the historical version of the target system based on the source image file of the source system and the historical image file corresponding to the target system under the historical version, so that in the subsequent version upgrade process of the target system, the target compatible database can be obtained based on the update of the historical compatible database, thereby reducing the generation time of the target compatible database and improving the generation efficiency of the target compatible database.

[0167] S203, determining difference data according to the target image file corresponding to the target system in the target version and the historical image file corresponding to the target system in the historical version, and updating the historical compatible database according to the difference data to obtain the target compatible database.

[0168] The target compatible database is used to make the target system compatible with the source system and the target version.

[0169] For ease of understanding, below, combined Figure 3 , the process of determining differential data is described in detail.

[0170] Figure 3 A flowchart of a method for determining differential data provided in an embodiment of the present application. Figure 3 , the method may include:

[0171] S301, obtaining a target image file corresponding to a target system under a target version, and a historical image file corresponding to a target system under a historical version.

[0172] Exemplarily, the target image file and the historical image file may be obtained from an image file repository of the target system.

[0173] S302: Determine a change type of the software package in the target image file according to the historical image file and the target image file.

[0174] The change type of a software package can be no change type, modification type, addition type or deletion type.

[0175] The unchanged type is used to indicate that the name and version number of the software package in the target image file and the historical image file are the same;

[0176] The modification type is used to indicate that the name of the software package in the target image file and the historical image file is the same but the version number is different;

[0177] The new type is used to indicate that the target image file includes the software package and the historical image file does not include the software package;

[0178] The deletion type is used to indicate that the target image file does not include the software package but the historical image file includes the software package.

[0179] In order to more clearly illustrate the change type of the software package, the difference analysis process of the software package of the target image file and the historical image file is described below in conjunction with Table 5.

[0180] Table 5

[0181]

[0182] It should be noted that in Table 5, "1-v1.rpm" indicates that the name of the software package is software package 1, the version number is v1, and the format is rpm format. Referring to Table 5, for software package 1 (1-v1.rpm), since the software package name and version number of software package 1 are the same in the two image files, it can be determined that the change type of software package 1 is the no change type.

[0183] For software package 2 (2-v2.rpm) and software package 3 (3-v2.rpm), since software package 2 and software package 3 have the same software package name but different version numbers in the two image files, it can be determined that the change type of software package 2 and software package 3 is modification type.

[0184] For software package 5 (5-v2.rpm), since the target image file includes software package 5 but the historical image file does not include software package 5, it can be determined that the change type of software package 5 is a new addition type.

[0185] For software package 4 (4-v1.rpm) and software package 6 (6-v1.rpm), since the historical image file includes software package 4 and software package 6, but the target image file does not include software package 4 and software package 6, it can be determined that the change type of software package 4 and software package 6 is a deletion type.

[0186] S303: Update the target image file according to the change type of the software package to obtain difference data.

[0187] In one implementation, the target image file may be updated in the following manner:

[0188] If the change type of the software package is the unchanged type, the software package is deleted from the target image file;

[0189] If the change type of the software package is a modification type, then the change type of the software package is marked as a modification type;

[0190] If the change type of the software package is a new addition type, the change type of the software package is marked as a new addition type;

[0191] If the change type of the software package is a deletion type, the software package information of the software package is added to the target image file, and the change type of the software package is marked as a deletion type in the target image file. The software package information may include the name and version of the software package.

[0192] The difference data may include the identifier of each software package and the change type of the software package. The difference data may be stored in a table, for example, the difference data may be as shown in Table 6:

[0193] Table 6

[0194] Package Identifier Change Type 2-v1.rpm Modification Type 3-v1.rpm Modification Type 4-v1.rpm Deletion Type 5-v2.rpm New Types 6-v1.rpm Deletion Type

[0195] The compatible database generation method provided in the embodiment of the present application can obtain the difference data by analyzing the changes in the image files of the target system under the target version and the historical version, so that when the historical compatible database is updated based on the difference data to obtain the target compatible database, it can avoid repeated analysis of the same data under the target image file and the historical image file in the process of generating the target compatible database corresponding to the target version, thereby shortening the generation time of the target compatible database and improving the generation efficiency of the target compatible database.

[0196] Next, combine Figure 4 , the process of updating the historical compatible database based on the differential data is described in detail.

[0197] Figure 4 A flowchart of a method for updating a historical compatible database provided in an embodiment of the present application.

[0198] See also Figure 4 , the method may include:

[0199] S401, generating a target software package index library of a target system under a target version according to a target image file.

[0200] The target software package index library is used to store the software package information of each software package in the target image file.

[0201] In the process of generating a software repository (repo source) based on a target image file by using the createrepo command, a target software package index library corresponding to the target image file may be automatically generated.

[0202] It should be noted that the specific execution process of S401 can refer to the specific execution process of S2022, and will not be repeated here.

[0203] The historical compatibility database may include a historical software package index library and a historical software package file library corresponding to the target system under the historical version.

[0204] In a possible implementation, the historical compatible database can be updated according to the difference data and the target software package index library to obtain the target compatible database. The specific implementation process of this implementation is performed with reference to steps S402 to S404:

[0205] S402: Update the historical software package index library in the historical compatible database to the target software package index library.

[0206] Exemplarily, the historical software package index library in the historical compatible database may be deleted, and the target software package index library may be added to the deleted historical compatible database.

[0207] S403: Determine the change type of each software package in the difference data.

[0208] The change type can be modification type, addition type or deletion type.

[0209] S404: Update the historical software package file library according to the change type of each software package to obtain a target compatible database.

[0210] It is understandable that the difference data may include multiple software packages, and the change types of different software packages may be different. For software packages with different change types, the update process of the historical software package file library is different. Figure 5 to Figure 7 , which describes in detail the update process of the historical software package file library under different change types.

[0211] For any software package in the differential data, when the change type of the software package is modification type, you can refer to Figure 5 The method shown in the embodiment updates the historical software package file library.

[0212] Figure 5 A schematic diagram of the update process of the historical software package file library when the change type is a modification type provided in an embodiment of the present application. Figure 5 , the process specifically includes:

[0213] S501: decompress the software package to obtain the target file corresponding to the target version of the software package.

[0214] The target file may include the software package identifier, the binary command corresponding to the software package identifier, the ELF file, the JAR file, etc.

[0215] For example, the target file may include software package 1 and two ELF files corresponding to software package 1 (ELF file 1-V2 and ELF file 2-V2).

[0216] S502: Determine the historical file corresponding to the software package in the historical software package file library.

[0217] For example, the history file may include software package 1 and two ELF files corresponding to software package 1 (ELF file 1-V1 and ELF file 2-V1).

[0218] S503: Update the historical files in the historical software package file library to target files.

[0219] In order to more clearly illustrate the updating process of the historical files in the historical software package file library, the historical software package file library before and after the update is illustrated below in conjunction with Table 7.

[0220] Table 7

[0221]

[0222] Optionally, the historical compatibility database may also include a source software package file library corresponding to the source system and a historical difference database corresponding to the target system under historical versions, wherein the historical difference database is obtained by comparing the historical software package file library with the source software package file library.

[0223] It is understandable that changes in the historical software package file library may lead to changes in the historical difference database. Therefore, after the historical software package file library in the historical compatibility database is updated, the historical difference database in the historical compatibility database also needs to be updated. The process of updating the historical difference database can refer to the following steps:

[0224] S504: Acquire source files corresponding to the software package in the source software package file library, and determine target difference information between the target file and the source file.

[0225] For example, for software package 1, the source file of software package 1 can be obtained in the source software package file library, and the source file includes: ELF file 1-v1. The target file of software package 1 can be obtained in the target software package file library, and the target file includes: ELF file 1-v3.

[0226] The target difference information may be interface difference information between the ELF file 1-v1 and the ELF file 1-v3. The interface difference information of each ELF file in the source software package file library and the target software package file library may be obtained with the help of an open source tool in the related art. For example, the open source tool may be an ELF difference analysis tool (abi-compliance-checker).

[0227] S505: In the historical difference database, the historical difference information corresponding to the software package is updated to the target difference information.

[0228] The historical difference information is obtained by comparing the historical files with the source files.

[0229] For example, for software package 1, the source file of software package 1 can be obtained in the source software package file library, and the source file includes: ELF file 1-v1. The historical file of software package 1 can be obtained in the historical software package file library, and the historical file includes: ELF file 1-v2. The historical difference information is: interface difference information between ELF file 1-v1 and ELF file 1-v2.

[0230] The interface difference information between the ELF file 1-v1 and the ELF file 1-v2 of the software package 1 in the historical difference database may be updated to the interface difference information between the ELF file 1-v1 and the ELF file 1-v3.

[0231] The compatible database generation method provided in the embodiment of the present application can realize the separate update of the data of the software packages involving the modified type in the historical compatible database, without the need to repeatedly analyze the unchanged software packages, thereby shortening the generation time of the target compatible database and improving the generation efficiency of the target compatible database.

[0232] For any software package in the differential data, if the change type of the software package is a new addition, you can refer to Figure 6 The method shown in the embodiment updates the historical software package file library.

[0233] Figure 6 A schematic diagram of the update process of the historical software package file library when the change type is a new type provided in an embodiment of the present application. Figure 6 , the process specifically includes:

[0234] S601: Decompress the software package to obtain the target file corresponding to the target version of the software package.

[0235] In one example, the target file corresponding to the software package under the target version can be obtained through a command line (for example, the command line can be an rpm-ql software package).

[0236] For example, the newly added software package may be glusterfs-7.0-7.x86_64.rpm, and the newly added software package may include two ELF files, namely, meta.so and posix.so.

[0237] S602: Add a target file corresponding to the software package to the historical software package file library.

[0238] Optionally, a correspondence relationship between the software package and the target file corresponding to the software package may be added in the historical software package file library. For example, the correspondence relationship may be as shown in Table 8:

[0239] Table 8

[0240] Serial number Package Identifier ELF file identification 1 glusterfs-7.0-7.x86_64.rpm meta.so 2 glusterfs-7.0-7.x86_64.rpm posix.so

[0241] The compatible database generation method provided in the embodiment of the present application can realize the separate update of the data related to the newly added type of software package in the historical compatible database, without the need to repeatedly analyze the unchanged software packages, thereby shortening the generation time of the target compatible database and improving the generation efficiency of the target compatible database.

[0242] For any software package in the differential data, if the change type of the software package is deletion type, you can refer to Figure 7 The method shown in the embodiment updates the historical software package file library.

[0243] Figure 7 A schematic diagram of the update process of the historical software package file library when the change type is the deletion type provided in the embodiment of the present application. Figure 7 , the process specifically includes:

[0244] S701. Obtain an identifier of a software package from the difference data.

[0245] Software package information of the software package may be obtained from the difference data. The software package information includes an identifier of the software package. The identifier of the software package may be an index or a name of the software package. The identifier of the software package may also be a name and a version number of the software package.

[0246] S702: According to the identifier of the software package, determine the historical file corresponding to the software package in the historical software package file library, and delete the historical file.

[0247] The history file corresponding to the software package may include each binary command, each ELF file, and each jar package in the software package.

[0248] S703: According to the identifier of the software package, determine the historical difference information corresponding to the software package in the historical difference database, and delete the historical difference information.

[0249] The historical difference information corresponding to the software package may include historical difference information corresponding to each ELF file in the software package.

[0250] The compatible database generation method provided in the embodiment of the present application can realize the separate update of the data of the deleted software packages in the historical compatible database, without the need to repeatedly analyze the unchanged software packages, thus shortening the generation time of the target compatible database and improving the generation efficiency of the target compatible database.

[0251] It is understandable that the compatible database generation method provided in the embodiment of the present application can adopt different update strategies according to the change type of each software package in the differential data, so as to be more flexible when updating the historical compatible database.

[0252] Figure 8 A schematic diagram of a compatible database generation process provided in an embodiment of the present application. Figure 8 , including the source image file corresponding to the source system, the historical image file corresponding to the target system under the historical version, the target image file corresponding to the target system under the target version, the historical compatible database and the target compatible database.

[0253] The historical compatible database can be generated based on the source image file and the historical image file. The historical compatible database includes a source software package index library, a source software package file library, a historical software package index library, a historical software package file library and a historical difference database.

[0254] The historical image file and the target image file may be subjected to a difference analysis to obtain difference data between the two image files, and the difference data may include: a modified type of software package, a newly added type of software package, and a deleted type of software package.

[0255] A new historical compatible database can be obtained based on the historical compatible database, and the new historical compatible database can be updated based on the difference data to obtain a target compatible database. The specific update process is as follows:

[0256] (1) Based on the target image file, a target software package index library is generated by using a repo source creation command, and the historical software package index library in the new historical compatible database is updated to the target software package index library.

[0257] (2) For the modified software package in the difference data, the target file (including binary commands, ELF files and JAR files, etc.) of the modified software package is obtained, and the historical file corresponding to the modified software package is modified to the target file in the historical software package file library in the new historical compatible database. Each ELF file in the modified software package is traversed, and the ELF file corresponding to each ELF file is found in the source software package file library, and each ELF file is analyzed for difference with the ELF file corresponding to each ELF file in the source software package file library to obtain the target difference information of each ELF file, and the historical difference information corresponding to each ELF file in the modified software package is modified to the target difference information corresponding to each ELF file in the historical difference database in the new historical compatible database.

[0258] (3) For the newly added software package in the differential data, obtain the target file of the modified software package (including binary commands, ELF files, and JAR files, etc.), and add the target file corresponding to the modified software package in the historical software package file library in the new historical compatibility database.

[0259] (4) For the software package of the deleted type in the differential data, the historical files of the software package of the deleted type are deleted from the historical software package file library in the new historical compatible database, and the historical difference information corresponding to the software package of the deleted type is deleted from the historical difference database.

[0260] The compatible database generation method provided in the embodiment of the present application analyzes the differential data between the target image file and the historical image file of the target system, and updates the historical compatible database based on the differential data to obtain the target compatible database, which can avoid repeated analysis of the same data under the target image file and the historical image file in the process of generating the target compatible database corresponding to the target version, shortening the generation time of the target compatible database and improving the generation efficiency of the target compatible database. The method also adopts different update strategies for the change type of each software package in the differential data, making it more flexible when updating the historical compatible database.

[0261] Fig. 9 This is a schematic diagram of the structure of a compatible database generation device provided in an embodiment of the present application. Fig. 9 , the compatible database generating device 10 comprises:

[0262] A determination module 11, configured to determine a historical version corresponding to a target version in response to a target system being upgraded to a target version, wherein the target system is a system after the source system is migrated;

[0263] The determination module 11 is further used to determine a historical compatible database corresponding to the historical version, and the historical compatible database is used to be compatible with the source system and the target system of the historical version;

[0264] The determination module 11 is further used to determine the difference data according to the target image file corresponding to the target system under the target version and the historical image file corresponding to the target system under the historical version;

[0265] The updating module 12 is used to update the historical compatible database according to the difference data to obtain a target compatible database, and the target compatible database is used to be compatible with the source system and the target system of the target version.

[0266] In a possible implementation, the determining module 11 is specifically configured to:

[0267] Determining a change type of a software package in the target image file according to the historical image file and the target image file;

[0268] The target image file is updated according to the change type of the software package to obtain the difference data.

[0269] In a possible implementation manner, the determining module 11 is further configured to:

[0270] If the change type of the software package is a no-change type, deleting the software package in the target image file, the no-change type is used to indicate that the name and version number of the software package in the target image file and the historical image file are the same;

[0271] If the change type of the software package is a modification type, the change type of the software package is marked as a modification type, and the modification type is used to indicate that the name of the software package in the target image file and the historical image file is the same but the version number is different;

[0272] If the change type of the software package is a new addition type, the change type of the software package is marked as a new addition type, and the new addition type is used to indicate that the target image file includes the software package and the historical image file does not include the software package;

[0273] If the change type of the software package is a deletion type, software package information of the software package is added to the target image file, and the change type of the software package is marked as a deletion type in the target image file, where the deletion type is used to indicate that the target image file does not include the software package and the historical image file includes the software package.

[0274] In a possible implementation, the updating module 12 is specifically configured to:

[0275] generating a target software package index library of the target system under the target version according to the target image file, wherein the target software package index library is used to store software package information of each software package in the target image file;

[0276] The historical compatible database is updated according to the difference data and the target software package index library to obtain the target compatible database.

[0277] In a possible implementation, the historical compatibility database includes a historical software package index library and a historical software package file library corresponding to the target system under the historical version, the historical software package index library is used to store software package information of each software package in the historical image file, and the historical software package file library is used to store historical files corresponding to each software package in the historical image file; the update module 12 is further specifically used to:

[0278] Updating the historical software package index library in the historical compatible database to the target software package index library;

[0279] Determining a change type of each software package in the difference data;

[0280] According to the change type of each software package, the historical software package file library is updated to obtain the target compatible database.

[0281] In a possible implementation, for any software package in the difference data, the change type of the software package is a modification type; and the update module 12 is further configured to:

[0282] Decompressing the software package to obtain a target file corresponding to the software package in the target version;

[0283] Determining the historical file corresponding to the software package in the historical software package file library;

[0284] The historical file in the historical software package file library is updated to the target file.

[0285] In a possible implementation, the historical compatibility database further includes a source software package file library corresponding to the source system and a historical difference database corresponding to the target system under the historical version, wherein the historical difference database is obtained by comparing the historical software package file library with the source software package file library; after updating the historical software file library, the update module 12 is further specifically used to:

[0286] Acquire a source file corresponding to the software package in the source software package file library, and determine target difference information between the target file and the source file;

[0287] In the historical difference database, the historical difference information corresponding to the software package is updated as the target difference information, wherein the historical difference information is obtained by comparing the historical file with the source file.

[0288] In a possible implementation, for any software package in the differential data, the change type of the software package is a new addition type; and the updating module 12 is further configured to:

[0289] Decompressing the software package to obtain a target file corresponding to the software package in the target version;

[0290] Add the target file corresponding to the software package to the historical software package file library.

[0291] In a possible implementation, for any software package in the differential data, the change type of the software package is a deletion type, the historical compatibility database further includes a source software package file library corresponding to the source system and a historical difference database corresponding to the target system under the historical version, and the historical difference database is obtained by comparing the historical software package file library with the source software package file library; the update module 12 is further specifically used for:

[0292] In the difference data, obtaining an identifier of the software package;

[0293] According to the identifier of the software package, determining the historical file corresponding to the software package in the historical software package file library, and deleting the historical file;

[0294] According to the identifier of the software package, historical difference information corresponding to the software package is determined in the historical difference database, and the historical difference information is deleted.

[0295] In a possible implementation manner, the determining module 11 is further configured to:

[0296] Obtaining a source image file of the source system and a historical image file corresponding to the target system under the historical version;

[0297] Generate a source software package index library and a source software package file library corresponding to the source system according to the source image file, and generate a historical software package index library and a historical software package file library corresponding to the target system under the historical version according to the historical image file;

[0298] Performing difference processing on the source software package file library and the historical software package file library to obtain a historical difference database corresponding to the target system under the historical version;

[0299] The historical compatibility database includes the source software package index library, the source software package file library, the historical software package index library, the historical software package file library and the historical difference database.

[0300] The compatible database generation device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.

[0301] Fig.10 A hardware structure diagram of a computing device provided in an embodiment of the present application. Fig.10 The computing device 20 may include a processor 21 and a memory 22, and the processor 21 and the memory 22 are coupled. The processor 21 and the memory 22 may communicate with each other; illustratively, the processor 21 and the memory 22 communicate with each other via a communication bus 23.

[0302] The memory 22 is used to store computer instructions;

[0303] The processor 21 is used to execute the computer instructions stored in the memory 22 to implement the technical solution shown in the above method embodiment.

[0304] Optionally, the computing device 20 may further include a communication interface, which may include a transmitter and / or a receiver.

[0305] Optionally, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application may be directly implemented as being executed by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.

[0306] The embodiment of the present application also provides a chip, which is used to execute the compatible database generation method as described in the above embodiment. Its implementation principle and technical effect are similar and will not be described here.

[0307] An embodiment of the present application provides a computer-readable storage medium, on which computer-executable instructions are stored; when the computer-executable instructions are executed by a processor, they are used to implement the compatible database generation method described in the above embodiment.

[0308] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, a computing device executes the compatible database generation method described in the above embodiment.

[0309] All or part of the steps of the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a readable memory. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned memory (storage medium) includes: read-only memory (English: read-only memory, abbreviated: ROM), RAM, flash memory, hard disk, solid state drive, magnetic tape (English: magnetic tape), floppy disk (English: floppy disk), optical disc (English: optical disc) and any combination thereof.

[0310] All or part of the steps of the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a readable memory. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned memory (storage medium) includes: read-only memory (English: read-only memory, abbreviated: ROM), RAM, flash memory, hard disk, solid state drive, magnetic tape (English: magnetic tape), floppy disk (English: floppy disk), optical disc (English: optical disc) and any combination thereof.

[0311] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable terminal device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0312] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable 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, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0313] These computer program instructions can also be loaded onto a computer or other programmable terminal device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0314] In the embodiments of the present application, the term "include" and its variations may refer to non-restrictive inclusion; the term "or" and its variations may refer to "and / or". In the embodiments of the present application, the terms "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. In the embodiments of the present application, "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previously associated objects are in an "or" relationship.

[0315] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present application, rather than to limit them. Although the embodiments of the present application have been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for generating a compatible database, characterized in that: The method comprises: In response to a target system being upgraded to a target version, determining a historical version corresponding to the target version, the target system being a system after the source system is migrated; Determine a historical compatible database corresponding to the historical version, the historical compatible database is used to be compatible with the source system and the target system of the historical version, the historical compatible database includes a historical software package index library and a historical software package file library corresponding to the target system under the historical version; Determine difference data based on the target image file corresponding to the target system under the target version and the historical image file corresponding to the target system under the historical version, and update the historical compatibility database based on the difference data to obtain a target compatibility database, which is used to be compatible with the source system and the target system of the target version.

2. The method according to claim 1, characterized in that: Determining difference data according to the target image file corresponding to the target system under the target version and the historical image file corresponding to the target system under the historical version includes: Determining a change type of a software package in the target image file according to the historical image file and the target image file; The target image file is updated according to the change type of the software package to obtain the difference data.

3. The method according to claim 2, characterized in that According to the change type of the software package, the target image file is updated to obtain the difference data, including: If the change type of the software package is a no-change type, deleting the software package in the target image file, the no-change type is used to indicate that the name and version number of the software package in the target image file and the historical image file are the same; If the change type of the software package is a modification type, the change type of the software package is marked as a modification type, and the modification type is used to indicate that the name of the software package in the target image file and the historical image file is the same but the version number is different; If the change type of the software package is a new addition type, the change type of the software package is marked as a new addition type, and the new addition type is used to indicate that the target image file includes the software package and the historical image file does not include the software package; If the change type of the software package is a deletion type, software package information of the software package is added to the target image file, and the change type of the software package is marked as a deletion type in the target image file, where the deletion type is used to indicate that the target image file does not include the software package and the historical image file includes the software package.

4. The method according to any one of claims 1 to 3, characterized in that: The historical compatible database is updated according to the difference data to obtain a target compatible database, including: generating a target software package index library of the target system under the target version according to the target image file, wherein the target software package index library is used to store software package information of each software package in the target image file; The historical compatible database is updated according to the difference data and the target software package index library to obtain the target compatible database.

5. The method according to claim 4, characterized in that The historical software package index library is used to store software package information of each software package in the historical image file, and the historical software package file library is used to store historical files corresponding to each software package in the historical image file; The historical compatible database is updated according to the difference data and the target software package index library to obtain the target compatible database, including: Updating the historical software package index library in the historical compatible database to the target software package index library; Determining a change type of each software package in the difference data; According to the change type of each software package, the historical software package file library is updated to obtain the target compatible database.

6. The method according to claim 5, characterized in that For any software package in the difference data, the change type of the software package is a modification type; According to the change type of the software package, the historical software package file library is updated, including: Decompressing the software package to obtain a target file corresponding to the software package in the target version; Determining the historical file corresponding to the software package in the historical software package file library; The historical file in the historical software package file library is updated to the target file.

7. The method according to claim 6, characterized in that The historical compatibility database also includes a source software package file library corresponding to the source system and a historical difference database corresponding to the target system under the historical version, wherein the historical difference database is obtained by comparing the historical software package file library with the source software package file library; After the historical software package file library is updated, the following steps are also included: Acquire a source file corresponding to the software package in the source software package file library, and determine target difference information between the target file and the source file; In the historical difference database, the historical difference information corresponding to the software package is updated as the target difference information, wherein the historical difference information is obtained by comparing the historical file with the source file.

8. The method according to claim 5, characterized in that For any software package in the differential data, the change type of the software package is a new addition type; and according to the change type of the software package, the historical software package file library is updated, including: Decompressing the software package to obtain a target file corresponding to the software package in the target version; Add the target file corresponding to the software package to the historical software package file library.

9. The method according to claim 5, characterized in that For any software package in the differential data, the change type of the software package is a deletion type, the historical compatibility database further includes a source software package file library corresponding to the source system and a historical difference database corresponding to the target system under the historical version, and the historical difference database is obtained by comparing the historical software package file library with the source software package file library; According to the change type of the software package, the historical software package file library is updated, including: In the difference data, obtaining an identifier of the software package; According to the identifier of the software package, determining the historical file corresponding to the software package in the historical software package file library, and deleting the historical file; According to the identifier of the software package, historical difference information corresponding to the software package is determined in the historical difference database, and the historical difference information is deleted.

10. A computing device, characterized in that: include: Processor and memory; The processor is coupled to the memory; The memory is used to store computer instructions; The processor is configured to execute computer instructions stored in the memory to perform the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Database system updating method and management system

    CN105550288A

  • Incremental upgrading method and related equipment

    CN111158737A