CN118210781A - Compatible database generation method and computing device - Google Patents

Compatible database generation method and computing device Download PDF

Info

Publication number
CN118210781A
CN118210781A CN202410362235.9A CN202410362235A CN118210781A CN 118210781 A CN118210781 A CN 118210781A CN 202410362235 A CN202410362235 A CN 202410362235A CN 118210781 A CN118210781 A CN 118210781A
Authority
CN
China
Prior art keywords
software package
target
history
file
database
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410362235.9A
Other languages
Chinese (zh)
Inventor
王新建
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
XFusion Digital Technologies Co Ltd
Original Assignee
XFusion Digital Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by XFusion Digital Technologies Co Ltd filed Critical XFusion Digital Technologies Co Ltd
Priority to CN202410362235.9A priority Critical patent/CN118210781A/en
Publication of CN118210781A publication Critical patent/CN118210781A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The embodiment of the application provides a compatible database generation method and computing equipment, wherein the method comprises the following steps: responding to the upgrading of the target system to a target version, determining a history version corresponding to the target version, wherein the target system is a system after the migration of the source system; determining a history compatibility database corresponding to the history version, wherein the history compatibility database is used for being compatible with a source system and a target system of the history version; and determining difference data according to the target image file corresponding to the target system under the target version and the history image file corresponding to the target system under the history version, and updating the history compatible database according to the difference data to obtain a target compatible database, wherein the target compatible database is used for being compatible with the source system and the target system of the target version. The method avoids repeated analysis of the same data in the mirror 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.

Description

Compatible database generation method and computing device
Technical Field
The embodiment of the application relates to the technical field of servers, in particular to a compatible database generation method and computing equipment.
Background
Migration of the operating system of the server may be accomplished using a migration tool, e.g., the migration tool may be used to migrate the operating system of the server from the source system to the target system. In the process of operating system migration by using the migration tool, substitution, adaptation or migration needs to be performed for the operating system and application software or service system carried on the operating system, so that the migration tool needs to perform compatibility analysis on the source system and the target system.
In the related art, a compatibility database may be generated in advance based on image files of a source system and a target system of a server, so as to ensure instantaneity of compatibility analysis. For example, a source database may be generated based on an image file of a source system, and a target database may be generated based on an image file of a target system; generating a difference database according to the source database and the target database; the compatible databases include a source database, a target database, and a difference database.
However, since the operating system is updated and iterated at a higher speed, when the image file of the operating system is updated, the compatible database corresponding to the updated image file needs to be regenerated, and the image file generally includes a plurality of software packages, so that it takes a longer time to generate the compatible database, resulting in lower generation efficiency of the compatible database.
Disclosure of Invention
The embodiment of the application provides a method for generating a compatible database and computing equipment, which can avoid repeated analysis of the same data in a target image file and a history image file in the process of generating a target compatible database corresponding to a target version, shorten the generation time of the target compatible database and improve the generation efficiency of the target compatible database.
In a first aspect, an embodiment of the present application provides a method for generating a compatible database, where the method includes:
responding to the upgrading of the target system to a target version, determining a history version corresponding to the target version, wherein the target system is a system after the migration of the source system;
Determining a history compatibility database corresponding to the history version, wherein the history compatibility database is used for being compatible with a source system and a target system of the history version;
and determining difference data according to the target image file corresponding to the target system under the target version and the history image file corresponding to the target system under the history version, and updating the history compatible database according to the difference data to obtain a target compatible database, wherein the target compatible database is used for being compatible with the source system and the target system of the target version.
According to the technical scheme, the target compatible database is obtained by analyzing the difference data of the target image file and the history image file of the target system and updating the history compatible database based on the difference data, repeated analysis of the same data under the target image file and the history image file in the process of generating the target compatible database corresponding to the target version can be avoided, the generation time of the target compatible database is shortened, and the generation efficiency of the target compatible database is improved.
In one possible implementation manner, determining the difference data according to the target image file corresponding to the target system under the target version and the history image file corresponding to the target system under the history version includes:
determining the change type of the software package in the target image file according to the history image file and the target image file;
and updating the target image file according to the change type of the software package to obtain the differential data.
According to the technical scheme, the difference data of the target image file and the history image file of the target system can be analyzed according to the types of the software packages in the target image file and the history image file, and repeated analysis of the same data under the target image file and the history image file in the process of generating the target compatible database corresponding to the target version can be avoided based on the difference data, so that the generation time of the target compatible database is shortened, and the generation efficiency of the target compatible database is improved.
In one possible implementation, updating the target image file according to the change type of the software package to obtain the difference data includes:
if the change type of the software package is a no-change type, deleting the software package in the target image file, wherein the no-change type is used for indicating that the names and version numbers of the software packages in the target image file and the history image file are the same;
if the change type of the software package is a modification type, marking the change type of the software package as a modification type, wherein the modification type is used for indicating that the names of the software packages in the target image file and the history image file are the same and the version numbers are different;
If the change type of the software package is a new type, marking the change type of the software package as the new type, wherein the new type is used for indicating that the target image file comprises the software package and the history image file does not comprise the software package;
If the change type of the software package is a deletion type, adding the software package information of the software package in the target image file, and marking the change type of the software package as the deletion type in the target image file, wherein the deletion type is used for indicating that the target image file does not comprise the software package and the history image file comprises the software package.
According to the technical scheme, the history image file and the target image file can be compared, the change types of the software packages in the target image file can be determined, the software packages in the target image file are flexibly updated according to the difference of the change types to obtain the difference data, and the history compatible database can be quickly updated to obtain the target compatible database based on the difference data, so that the updating efficiency of the target database is improved.
In one possible implementation, updating the historical compatible database according to the difference data to obtain the target compatible database includes:
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 for storing software package information of each software package in the target image file;
and updating the historical compatible database according to the difference data and the target software package index database to obtain a target compatible database.
According to the technical scheme, the historical compatible database is updated based on the difference data to obtain the target compatible database, 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 can be avoided, the generation time of the target compatible database is shortened, and the generation efficiency of the target compatible database is improved.
In one possible implementation manner, the history compatible database includes a history software package index library and a history software package file library corresponding to the target system under a history version, wherein the history software package index library is used for storing software package information of each software package in the history image file, and the history software package file library is used for storing history files corresponding to each software package in the history image file;
Updating the historical compatible database according to the difference data and the target software package index database to obtain a target compatible database, wherein the method comprises the following steps:
Updating a historical software package index library in the historical compatible database into a target software package index library;
Determining the change type of each software package in the differential data;
And updating the historical software package file library according to the change type of each software package to obtain a target compatible database.
According to the technical scheme, the historical compatible database is updated based on the difference data to obtain the target compatible database, 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 can be avoided, the generation time of the target compatible database is shortened, and the generation efficiency of the target compatible database is improved.
In one possible implementation manner, for any one software package in the differential data, the change type of the software package is a modification type; updating the historical software package file library according to the change type of the software package, comprising:
decompressing the software package to obtain a target file corresponding to the software package under the target version;
determining a history file corresponding to the software package in a history software package file library;
And updating the history file in the history software package file library into the target file.
According to the technical scheme, the files corresponding to the software packages related to the modification types in the historical compatible database can be independently updated, repeated analysis of unchanged software packages is not needed, the generation time of the target compatible database is shortened, and the generation efficiency of the target compatible database is improved.
In one possible implementation manner, the history compatible database further comprises a source software package file library corresponding to the source system and a history difference database corresponding to the target system under a history version, wherein the history difference database is obtained by comparing the history software package file library with the source software package file library;
After updating the historical software package file library, the method further comprises the following steps:
Acquiring a source file corresponding to a software package from a source software package file library, and determining target difference information between a target file and the source file;
in the history difference database, the history difference information corresponding to the software package is updated into target difference information, and the history difference information is obtained by comparing a history file with a source file.
In the technical scheme, after the historical software package file library of the modification type software package is updated, the historical difference information of the modification type software package can be updated in the historical difference database.
In one possible implementation manner, for any software package in the differential data, the change type of the software package is a new type; updating the historical software package file library according to the change type of the software package, comprising:
decompressing the software package to obtain a target file corresponding to the software package under the target version;
And newly adding a target file corresponding to the software package in the historical software package file library.
According to the technical scheme, the data related to the newly added type software package in the history compatible database can be updated independently, repeated analysis of the unchanged software package is not needed, the generation time of the target compatible database is shortened, and the generation efficiency of the target compatible database is improved.
In one possible implementation manner, for any software package in the differential data, the change type of the software package is a deletion type, and the history compatible database further comprises a source software package file library corresponding to the source system and a history differential database corresponding to the target system under a history version, wherein the history differential database is obtained by comparing the history software package file library with the source software package file library;
Updating the historical software package file library according to the change type of the software package, comprising:
acquiring the identification of the software package in the differential data;
according to the identification of the software package, determining a history file corresponding to the software package in a history software package file library, and deleting the history file;
And according to the identification of the software package, determining the historical difference information corresponding to the software package in a historical difference database, and deleting the historical difference information.
According to the technical scheme, the data of the software package related to the deletion type in the history compatible database can be updated independently, repeated analysis of the software package without change is not needed, the generation time of the target compatible database is shortened, and the generation efficiency of the target compatible database is improved.
In one possible implementation, determining a history compatibility database corresponding to a history version includes:
Acquiring a source image file of a source system and a history image file corresponding to a target system under a history version;
generating a source software package index library and a source software package file library corresponding to a source system according to the source image file, and generating a history software package index library and a history software package file library corresponding to a target system under a history version according to the history image file;
performing differential processing on the source software package file library and the history software package file library to obtain a history differential database corresponding to the target system under a history version;
The history compatible database comprises a source software package index library, a source software package file library, a history software package index library, a history software package file library and a history difference database.
According to the technical scheme, the historical compatible 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 historical version of the target system, so that in the version upgrading process of the subsequent target system, the target compatible database can be obtained based on updating of the historical compatible database, the generation time of the target compatible database is shortened, and the generation efficiency of the target compatible database is improved.
In a second aspect, an embodiment of the present application provides a compatible database generating apparatus, including:
The determining module is used for determining a historical version corresponding to the target version in response to the target system being updated to the target version, wherein the target system is a system after the source system is migrated;
the determining module is also used for determining a history compatibility database corresponding to the history version, wherein the history compatibility database is used for being compatible with the source system and the target system of the history version;
the determining module is also used for determining the difference data according to the target image file corresponding to the target system under the target version and the history image file corresponding to the target system under the history version;
And the updating module is used for updating the historical compatible database according to the difference data to obtain a target compatible database, wherein the target compatible database is used for being compatible with a source system and a target system of a target version.
In one possible implementation, the determining module is specifically configured to:
determining the change type of the software package in the target image file according to the history image file and the target image file;
and updating the target image file according to the change type of the software package to obtain the differential data.
In one possible implementation, the determining module is specifically further configured to:
if the change type of the software package is a no-change type, deleting the software package in the target image file, wherein the no-change type is used for indicating that the names and version numbers of the software packages in the target image file and the history image file are the same;
if the change type of the software package is a modification type, marking the change type of the software package as a modification type, wherein the modification type is used for indicating that the names of the software packages in the target image file and the history image file are the same and the version numbers are different;
If the change type of the software package is a new type, marking the change type of the software package as the new type, wherein the new type is used for indicating that the target image file comprises the software package and the history image file does not comprise the software package;
If the change type of the software package is a deletion type, adding the software package information of the software package in the target image file, and marking the change type of the software package as the deletion type in the target image file, wherein the deletion type is used for indicating that the target image file does not comprise the software package and the history image file comprises the software package.
In one possible implementation, the updating module is specifically configured to:
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 for storing software package information of each software package in the target image file;
and updating the historical compatible database according to the difference data and the target software package index database to obtain a target compatible database.
In one possible implementation manner, the history compatible database includes a history software package index library and a history software package file library corresponding to the target system under a history version, wherein the history software package index library is used for storing software package information of each software package in the history image file, and the history software package file library is used for storing history files corresponding to each software package in the history image file; the updating module is specifically further used for:
Updating a historical software package index library in the historical compatible database into a target software package index library;
Determining the change type of each software package in the differential data;
And updating the historical software package file library according to the change type of each software package to obtain a target compatible database.
In one possible implementation manner, for any one software package in the differential data, the change type of the software package is a modification type; the updating module is specifically further used for:
decompressing the software package to obtain a target file corresponding to the software package under the target version;
determining a history file corresponding to the software package in a history software package file library;
And updating the history file in the history software package file library into the target file.
In one possible implementation manner, the history compatible database further comprises a source software package file library corresponding to the source system and a history difference database corresponding to the target system under a history version, wherein the history difference database is obtained by comparing the history software package file library with the source software package file library; after updating the historical software file library, the updating module is specifically further configured to:
Acquiring a source file corresponding to a software package from a source software package file library, and determining target difference information between a target file and the source file;
in the history difference database, the history difference information corresponding to the software package is updated into target difference information, and the history difference information is obtained by comparing a history file with a source file.
In one possible implementation manner, for any software package in the differential data, the change type of the software package is a new type; the updating module is specifically further used for:
decompressing the software package to obtain a target file corresponding to the software package under the target version;
And newly adding a target file corresponding to the software package in the historical software package file library.
In one possible implementation manner, for any software package in the differential data, the change type of the software package is a deletion type, and the history compatible database further comprises a source software package file library corresponding to the source system and a history differential database corresponding to the target system under a history version, wherein the history differential database is obtained by comparing the history software package file library with the source software package file library; the updating module is specifically further used for:
acquiring the identification of the software package in the differential data;
according to the identification of the software package, determining a history file corresponding to the software package in a history software package file library, and deleting the history file;
And according to the identification of the software package, determining the historical difference information corresponding to the software package in a historical difference database, and deleting the historical difference information.
In one possible implementation, the determining module is specifically further configured to:
Acquiring a source image file of a source system and a history image file corresponding to a target system under a history version;
generating a source software package index library and a source software package file library corresponding to a source system according to the source image file, and generating a history software package index library and a history software package file library corresponding to a target system under a history version according to the history image file;
performing differential processing on the source software package file library and the history software package file library to obtain a history differential database corresponding to the target system under a history version;
The history compatible database comprises a source software package index library, a source software package file library, a history software package index library, a history software package file library and a history difference database.
In a third aspect, embodiments of the present application provide a computing device comprising: a processor and a memory; the processor is coupled with the memory;
The memory is used for storing computer instructions;
The processor is configured to execute the computer instructions stored by the memory to perform the method according to any one of the first aspects.
In a fourth aspect, embodiments of the present application provide a chip for performing the method of any one of the first aspects.
In a fifth aspect, embodiments of the present application provide a computer-readable storage medium having stored therein computer-executable instructions that, when executed by a processor, implement a method as in any of the first aspects.
In a sixth aspect, embodiments of the present application provide a computer program product comprising a computer program which, when executed by a processor, implements a method as in any of the first aspects.
According to the compatible database generation method and the computing equipment provided by the embodiment of the application, in response to upgrading of a target system to a target version, a historical version corresponding to the target version is determined, and the target system is a system after migration of a source system; determining a history compatibility database corresponding to the history version, wherein the history compatibility database is used for being compatible with a source system and a target system of the history version; and determining difference data according to the target image file corresponding to the target system under the target version and the history image file corresponding to the target system under the history version, and updating the history compatible database according to the difference data to obtain a target compatible database, wherein the target compatible database is used for being 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 history 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.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings can be obtained according to these drawings without inventive faculty for a person skilled in the art.
Fig. 1 is a schematic diagram of an application scenario provided in an embodiment of the present application;
FIG. 2 is a schematic flow chart of a method for generating a compatible database according to an embodiment of the present application;
FIG. 3 is a flow chart of a method for determining differential data according to an embodiment of the present application;
FIG. 4 is a flowchart of a method for updating a history-compatible database according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a process for updating a historical package file library when a modification type is a modification type according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a process for updating a historical package file library when a change type is a new type according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a process for updating a historical package library when a change type is a delete type according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a compatible database generating process according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a compatible database generating device according to an embodiment of the present application;
fig. 10 is a schematic hardware structure of a computing device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with embodiments of the application. Rather, they are merely examples of apparatus and methods consistent with aspects of embodiments of the application as detailed in the accompanying claims.
First, related terms related to the embodiments of the present application will be explained.
Red cap software package management (REDHAT PACKAGE MANAGE, rpm): software package name of Linux operating system tied in rpm
Jar: a package file format is typically used to aggregate a large number of Java class files, associated metadata and resource (text, pictures, etc.) files into one file in order to develop Java platform applications or libraries.
Executable and linkable formats (Executable and Linkable Format, ELF): the file format for binary files, executable files, object code, shared libraries, and core dump format files, ELF is a You Nake Six (UNIX) systems laboratory (USL) developed and published as an application binary interface (Application Binary Interface, ABI), an executable file format for Linux.
Linux mirror image: is a complete operating system installation package including the core components, system tools, applications, configuration files, etc. of the Linux operating system, linux images are typically stored in a specific format and can be used to install and deploy the Linux system on a computer. For example, the storage format of the Linux image may be iso (Isolation) format, img format, img.gz format, or the like.
Community enterprise operating system (Community Enterprise Operating System, centOS): is a server operating system provided by the open source community for free.
Currently, the CentOS community has announced that partial versions of CentOS operating systems (e.g., centOS 8 and CentOS 7) have been out of service. After the CenteOS operating systems of the versions stop serving, serious potential safety hazards are brought to application systems deployed on the existing network server, and great system safety and service continuity risks are brought to users.
In this scenario, these out-of-service centOS operating systems may be migrated using a migration tool. In the process of operating system migration by using the migration tool, substitution, adaptation or migration needs to be performed for the operating system and service software or service system carried on the operating system, so that the migration tool needs to perform compatibility analysis on the source system and the target system.
At present, the business software generally performs compatibility analysis according to the following steps:
(1) Dependency information for the business software is obtained, for example, the dependency information may include binary command lines on which the business software depends, a specific version of the dynamic library, and application programming interfaces (Application Programming Interface, APIs) for runtime calls, etc.
(2) When a source system is migrated to a target system, judging whether the target system meets all the dependency information of service software; if yes, determining that the target system is compatible with the service software; if not, determining that the target system is not compatible with the service software.
In order to judge whether the target system meets all the dependency information of the service software, a compatible database is usually required to be generated in advance in the migration tool so as to ensure the instantaneity of the migration tool for carrying out compatibility analysis on the source system and the target system.
For example, the migration tool is x2openEuler, the compatibility analysis function of the migration tool depends on the compatibility database of the bottom layer of the migration tool, and the migration tool also opens a production platform of the compatibility database so that a user can generate the compatibility database of the migration tool based on the production platform. The migration tool may support different migration paths, and for each migration path, the compatible database corresponding to the migration path needs to be restored.
The x2openEuler migration tool supports migration of a source system (e.g., centOS 7.6) to a target system (e.g., openEuler 20.03SP3), during which a primary compatible database needs to be generated from mirror files of the source and target systems. The x2openEuler migration tool may also support the migration of serial versions of a source system to a target system. For example, the serial versions of the source systems are source systems 7.0 to 7.9, and when migrating the serial versions of the source systems to the target system, the serial versions need to undergo: the migration of the source system 7.0 to the target system, the migration of the source system 7.1 to the target system, … …, and the migration of the source system 7.9 to the target system 10 times, for each migration process, the migration tool needs to generate 1 compatible database, and then the 10 migration processes need to generate 10 compatible databases.
In the related art, a compatibility database may be generated in advance based on image files of a source system and a target system of a server, so as to ensure instantaneity of compatibility analysis. For example, a source database may be generated based on an image file of a source system, and a target database may be generated based on an image file of a target system; generating a difference database according to the source database and the target database; the compatible databases include a source database, a target database, and a difference database.
Next, an application scenario provided by an embodiment of the present application will be described with reference to fig. 1.
Fig. 1 is a schematic diagram of an application scenario provided in an embodiment of the present application. Referring to fig. 1, a migration tool is required to be used in the process of migrating a source system to a target system, and the migration tool relies on a compatibility database for compatibility analysis, where the compatibility database is generated based on image files of the source system and the target system.
Along with the upgrade 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, the target compatible database corresponding to the image file of the target system under the target version needs to be regenerated.
In the related art, after the image file version is updated, a compatible database is usually manufactured again by adopting the source image file of the source system and the image file updated by the target system. However, the number of software packages included in each image file is typically more than 1 ten thousand, and each software package may include several to several thousand binary commands, an ELF file, a jar package, and the like, so that the total number of files included in the software package in the image file may be up to several million, which makes it take a long time when performing a difference analysis (for example, interface difference of the ELF file) between the source image file and the updated image file, resulting in low efficiency of generating a compatible database.
In view of this, the embodiment of the application provides a compatible database generation method, which can respond to the upgrade of a target system to a target version, determine a history version corresponding to the target version, and the target system is a system after the migration of a source system; determining a history compatibility database corresponding to the history version, wherein the history compatibility database is used for compatibility with a source system and a target system of the history version; and determining difference data according to the target image file corresponding to the target system under the target version and the history image file corresponding to the target system under the history version, and updating the history compatible database according to the difference data to obtain a target compatible database, wherein the target compatible database is used for being compatible with the source system and the target system of the target version. In the method, the target compatible database is obtained by analyzing the difference data of the target image file and the history image file of the target system and updating the history compatible database based on the difference data, so that repeated analysis of the same data under the target image file and the history image file in the process of generating the target compatible database corresponding to the target version can be avoided, the generation time of the target compatible database is shortened, and the generation efficiency of the target compatible database is improved.
The technical scheme of the embodiment of the application is described in detail below by using specific embodiments. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
Fig. 2 is a flow chart of a method for generating a compatible database according to an embodiment of the present application. Referring to fig. 2, the method specifically includes:
The subject of execution of the method may be a computing device, in particular, by a processor in the computing device.
S201, responding to upgrading of the target system to the target version, and determining a history version corresponding to the target version.
The target system is a system after the source system is migrated. For example, the source system may be operating system 1 published by enterprise A and the target system may be operating system 2 published by enterprise B.
The target system and the source system belong to the same type of operating system, for example, the target system and the source system belong to the Linux operating system.
The target system may have multiple historical versions, which may be versions of the target system that are used during the history upgrade process. For example, in the 1 st upgrade process, the version of the target system is upgraded from version 1 to version 2, where the historical version is version 1 and the target version is version 2; in the 2 nd upgrading process, the version of the target system is upgraded from the version 2 to the version 3, and at this time, the historical version can be the version 1 or the version 2, and the target version is the version 3.
S202, determining a history compatible database corresponding to the history version.
The historical compatibility database may be used to compatible the source system with the historical version of the target system.
In one possible implementation, the history compatible database may be determined by steps S2021 to S2021 as follows:
S2021, acquiring a source image file of the source system and a history image file corresponding to the target system under the history version.
In one example, the source image file may be obtained from an image repository corresponding to a different system. For example, the source image file may be obtained from a source image repository corresponding to the source system.
S2022, generating 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 generating a history software package index library and a history software package file library corresponding to the target system under a history version according to the history image file.
The source package index library is used to store package information for 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 sources) by creating a software repository (createpo) command based on a source image file, a source software package index library corresponding to the source image file can be automatically generated.
The source package index library may be stored in tabular form, e.g., the source package index library may be as shown in table 1:
TABLE 1
Software package indexing Software package name Software package version
1 Software package 1 Version 1
2 Software package 2 Version 2
…… …… ……
The source software package file library may include source files corresponding to each software package in the source image file, where the source files may include an identifier of the software package, and binary commands, ELF files, JAR files, and the like corresponding to the identifier of the software package. The binary command, the ELF file, the JAR file and the like corresponding to each software package can be obtained by decompressing each software package in the source image file.
The binary commands and ELF files for each software package may be stored in tabular form, e.g., the source software package library may be as shown in tables 2 and 3:
TABLE 2
TABLE 3 Table 3
The historical package index library may be used to store package information for each package in the historical 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 warehouse (repo sources) by creating a software warehouse (creatoepo) command based on the history image file, a history software package index library corresponding to the history image file can be automatically generated.
The history software package file library is used for storing history files corresponding to each software package in the history image file, and the history files can comprise the identification of the software package, binary commands corresponding to the identification of the software package, ELF files, JAR files and the like. The binary command, the ELF file, the JAR file and the like corresponding to each software package can be obtained by decompressing each software package in the history image file.
S2023, performing differential processing on the source software package file library and the history software package file library to obtain a history differential database corresponding to the target system under the history version.
The historical difference database includes historical difference information corresponding to each software package, which may include difference information corresponding to the ELF files in each software package. For any ELF file in the software package, the difference analysis can be performed on the ELF file in the source software package file library and the ELF file in the history software package file library to obtain the difference information of the ELF file. For example, the difference information corresponding to the ELF file may include adding and deleting and modifying information of the interface in the ELF file.
The historical difference database may be stored in tabular form, for example, the historical difference database may be as shown in table 4:
TABLE 4 Table 4
In the embodiment of the present application, the history compatible database may include the source software package index library, the source software package file library, the history software package index library, the history software package file library, and the history difference database.
According to the method for generating the compatible database, the historical compatible 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 the target compatible database can be obtained based on updating of the historical compatible database in the subsequent version upgrading process of the target system, the generation time of the target compatible database is shortened, and the generation efficiency of the target compatible database is improved.
S203, determining difference data according to the target image file corresponding to the target system under the target version and the history image file corresponding to the target system under the history version, and updating the history compatible database according to the difference data to obtain the target compatible database.
The target compatibility database is used for being compatible with the source system and the target system of the target version.
For ease of understanding, the process of determining the difference data is described in detail below in conjunction with FIG. 3.
Fig. 3 is a flowchart of a method for determining difference data according to an embodiment of the present application. Referring to fig. 3, the method may include:
S301, acquiring a target image file corresponding to the target system under the target version and a history image file corresponding to the target system under the history version.
The target image file and the history image file may be obtained from an image file repository of the target system, for example.
S302, determining the change type of the software package in the target image file according to the history image file and the target image file.
The change type of the software package may be a no change type, a modification type, a new addition type, or a deletion type. Wherein:
The unchanged type is used for indicating that the names and version numbers of the software packages in the target image file and the history image file are the same;
the modification type is used for indicating that the names of the software packages in the target image file and the history image file are the same and the version numbers are different;
the newly added type is used for indicating that the target image file comprises the software package and the history image file does not comprise the software package;
The delete type is used to indicate that the target image file does not include the software package and that the history image file includes the software package.
In order to more clearly describe the type of change of the software package, a description will be given below of a process of analyzing the difference of the software package of the target image file and the history image file with reference to table 5.
TABLE 5
In table 5, "1 to v1.Rpm" means that the name of the software package is package 1, the version number is v1, and the format is rpm format. Referring to table 5, for package 1 (1-v 1. Rpm), since package 1 has the same package name and version number in both image files, it can be determined that the type of change of package 1 is a no change type.
For software package 2 (2-v 2. Rpm) and software package 3 (3-v 2. Rpm), since the software package 2 and software package 3 have the same software package name but different version numbers in the two image files, the change types of the software package 2 and software package 3 can be determined to be the modification types.
For software package 5 (5-v 2. Rpm), since the software package 5 is included in the target image file and the software package 5 is not included in the history image file, it can be determined that the change type of the software package 5 is the newly added type.
For software package 4 (4-v 1. Rpm) and software package 6 (6-v 1. Rpm), since the software package 4 and software package 6 are included in the history image file and the software package 4 and software package 6 are not included in the target image file, it can be determined that the change types of the software package 4 and software package 6 are deletion types.
And S303, updating the target image file according to the change type of the software package to obtain the differential data.
In one implementation, the update of the target image file may be performed as follows:
If the change type of the software package is the unchanged type, deleting the software package in the target image file;
if the change type of the software package is a modification type, marking the change type of the software package as the modification type;
If the change type of the software package is a new addition type, marking the change type of the software package as the new addition type;
if the change type of the software package is the deletion type, adding the software package information of the software package in the target image file, and marking the change type of the software package as the deletion type in the target image file. The package information may include the name and version of the package.
The differential data may include an identification of each software package and a type of change of the software package. The difference data may be stored in a tabular manner, for example, the difference data may be as shown in table 6:
TABLE 6
Software package identification Change type
2-v1.rpm Modification type
3-v1.rpm Modification type
4-v1.rpm Deletion type
5-v2.rpm Newly added type
6-v1.rpm Deletion type
According to the method for generating the compatible database, the difference data can be obtained by analyzing the change condition of the mirror image file 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, repeated analysis of the same data under the target mirror image file and the historical mirror image file in the process of generating the target compatible database corresponding to the target version can be avoided, the generation time of the target compatible database is shortened, and the generation efficiency of the target compatible database is improved.
Next, a process of updating the history compatible database based on the difference data will be described in detail with reference to fig. 4.
Fig. 4 is a flowchart of a method for updating a history compatible database according to an embodiment of the present application.
Referring to fig. 4, the method may include:
s401, generating 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 for storing the software package information of each software package in the target image file.
In the process of generating a software repository (repo sources) by creating a software repository (createpo) command based on the target image file, a target software package index library corresponding to the target image file can be automatically generated.
Note that, the specific execution process of S401 may refer to the specific execution process of S2022, and the description thereof will not be repeated here.
The historical compatibility database may include a historical package index library and a historical package file library corresponding to the target system under the historical version.
In one possible implementation, the historical compatible database may be updated according to the differential data and the target software package index library to obtain the target compatible database. The specific execution process of the implementation mode is executed by referring to the steps S402 to S404:
s402, updating a historical software package index library in the historical compatible database into a target software package index library.
For example, the historical package index library in the historical compatible database may be deleted, and the target package index library may be added to the deleted historical compatible database.
S403, determining the change type of each software package in the differential data.
The change type may be a modification type, a new addition type, or a deletion type.
S404, updating the historical software package file library according to the change type of each software package to obtain a target compatible database.
It will be appreciated that the differential data may comprise a plurality of software packages, and that the type of change may vary from software package to software package. The updating process for the historical software package file library is different for software packages of different change types. In order to facilitate understanding, the following describes in detail the updating process of the historical package library under different modification types with reference to fig. 5 to 7.
For any software package in the difference data, when the change type of the software package is a modification type, the historical software package file library can be updated by referring to the method shown in the embodiment of fig. 5.
Fig. 5 is a schematic diagram of an update process of a historical package file library when a modification type is a modification type according to an embodiment of the present application. Referring to fig. 5, the process specifically includes:
S501, decompressing the software package to obtain a target file corresponding to the software package under the target version.
The target file may include the identification of the software package, the binary command corresponding to the identification of the software package, the ELF file, the JAR file, etc
For example, the object files may include software package 1,2 ELF files (ELF files 1-V2 and ELF files 2-V2) corresponding to software package 1.
S502, determining a history file corresponding to the software package in a history software package file library.
For example, the history file may include software package 1,2 ELF files (ELF files 1-V1 and ELF files 2-V1) corresponding to software package 1.
S503, updating the history file in the history software package file library as a target file.
In order to more clearly describe the update process of the history file in the history package file library, the history package file library before and after update is illustrated with reference to table 7.
TABLE 7
Optionally, the history compatible database may further include a source software package file library corresponding to the source system and a history difference database corresponding to the target system under a history version, where the history difference database is obtained by comparing the history software package file library with the source software package file library.
It will be appreciated that changes to the historical package library may result in changes to the historical difference database. Therefore, after updating the historical software package file library in the historical compatible database, the historical difference database in the historical compatible database needs to be updated, and the process of updating the historical difference database can refer to the following steps:
S504, acquiring a source file corresponding to the software package from a source software package file library, and determining target difference information between a target file and the source file.
For example, for software package 1, a source file for the software package 1 may be obtained in a source software package library, the source file including: ELF files 1-v1. The target file of the software package 1 may be obtained in a target software package file library, where the target file includes: ELF files 1-v3.
The target difference information may be interface difference information between the ELF files 1-v1 and ELF files 1-v 3. Interface difference information for each ELF file in the source and target package libraries may be obtained by an open source tool in the related art, which may be, for example, an ELF difference analysis tool (abi-complex-checker).
S505, in the history difference database, the history difference information corresponding to the software package is updated to be the target difference information.
The history difference information is obtained by comparing the history file with the source file.
For example, for software package 1, a source file for the software package 1 may be obtained in a source software package library, the source file including: ELF files 1-v1, a history file of the software package 1 may be obtained in a history software package file library, where the history file includes: ELF files 1-v2, the historical difference information is: interface difference information between ELF files 1-v1 and ELF files 1-v 2.
The interface difference information between the ELF files 1-v1 and ELF files 1-v2 of the software package 1 in the historical difference database may be updated to interface difference information between the ELF files 1-v1 and ELF files 1-v 3.
The method for generating the compatible database provided by the embodiment of the application can realize the independent update of the data of the software package related to the modification type in the historical compatible database, does not need repeated analysis of the unchanged software package, shortens the generation time of the target compatible database, and improves the generation efficiency of the target compatible database.
For any software package in the difference data, when the change type of the software package is a new type, the historical software package file library can be updated by referring to the method shown in the embodiment of fig. 6.
Fig. 6 is a schematic diagram of an update process of a historical software package file library when a change type is a new type according to an embodiment of the present application. Referring to fig. 6, the process specifically includes:
S601, decompressing the software package to obtain a target file corresponding to the software package under the target version.
In one example, a target file for a software package corresponding to a target version may be obtained through a command line (e.g., the command line may be an rpm-ql software package).
For example, the newly added software package may be glusterfs-7.0-7.x86_64.Rpm, and the newly added software package may include 2 ELF files, respectively: meta.so and posix.so.
S602, adding a target file corresponding to the software package in a history software package file library.
Alternatively, the correspondence between the software package and the object file corresponding to the software package may be newly added in the historical software package file library, for example, the correspondence may be as shown in table 8:
TABLE 8
Sequence number Software package identification ELF file identification
1 glusterfs-7.0-7.x86_64.rpm meta.so
2 glusterfs-7.0-7.x86_64.rpm posix.so
The method for generating the compatible database provided by the embodiment of the application can realize the independent update of the data related to the newly added type software package in the historical compatible database, does not need repeated analysis of the unchanged software package, shortens the generation time of the target compatible database, and improves the generation efficiency of the target compatible database.
For any software package in the difference data, when the change type of the software package is the deletion type, the historical software package file library can be updated by referring to the method shown in the embodiment of fig. 7.
Fig. 7 is a schematic diagram of an update process of a historical package file library when a change type is a delete type according to an embodiment of the present application. Referring to fig. 7, the process specifically includes:
s701, acquiring the identification of the software package in the differential data.
The software package information of the software package can be obtained from the differential data, the software package information comprises the identification of the software package, the identification of the software package can be the index or the name of the software package, and the identification of the software package can also be the name and the version number of the software package.
S702, according to the identification of the software package, determining a history file corresponding to the software package in a history software package file library, and deleting the history file.
The history file corresponding to the software package may include binary commands, ELF files, and jar packages in the software package.
S703, according to the identification of the software package, determining the history difference information corresponding to the software package in a history difference database, and deleting the history difference information.
The historical difference information corresponding to the software package may include historical difference information corresponding to each ELF file in the software package.
The method for generating the compatible database provided by the embodiment of the application can realize the independent update of the data of the software package related to the deletion type in the historical compatible database, does not need repeated analysis of the unchanged software package, shortens the generation time of the target compatible database, and improves the generation efficiency of the target compatible database.
It can be understood that, the method for generating the compatible database provided by the embodiment of the application can adopt different updating strategies aiming at the changing types of each software package in the differential data, so that the method is more flexible in updating the historical compatible database.
Fig. 8 is a schematic diagram of a compatible database generating process according to an embodiment of the present application. Referring to fig. 8, the method includes a source image file corresponding to a source system, a history image file corresponding to a target system in a history version, a target image file corresponding to a target system in a target version, a history compatibility database, and a target compatibility database.
The history compatible database may be generated based on the source image file and the history image file. The history compatible database comprises a source software package index library, a source software package file library, a history software package index library, a history software package file library and a history difference database.
The historical image file and the target image file may be subjected to differential analysis, and differential data between the two image files may be obtained, where the differential data may include: modified type software packages, added type software packages, and deleted type software packages.
The new historical compatible database can be obtained based on the duplication of the historical compatible database, and the new historical compatible database is updated based on the difference data to obtain the target compatible database. The specific updating process is as follows:
(1) And generating a target software package index library through repo source creation commands based on the target image file, and updating the historical software package index library in the new historical compatible database into the target software package index library.
(2) And for the software package of the modification type in the differential data, acquiring a target file (comprising a binary command, an ELF file, a JAR file and the like) of the software package of the modification type, and modifying a history file corresponding to the software package of the modification type into the target file in a history software package file library in a new history compatible database. And traversing each ELF file in the software package of the modification type, finding the ELF file corresponding to each ELF file in a source software package file library, performing difference analysis on each ELF file and the ELF file corresponding to each ELF file in the source software package file library to obtain target difference information of each ELF file, and modifying the history difference information corresponding to each ELF file in the software package of the modification type into the target difference information corresponding to each ELF file in a history difference database in a new history compatible database.
(3) And for the newly added type software package in the differential data, acquiring the target file (comprising a binary command, an ELF file, a JAR file and the like) of the software package of the modification type, and adding the target file corresponding to the software package of the modification type into a historical software package file library in a new historical compatible database.
(4) For the software package of the deleting type in the difference data, deleting the history file of the software package of the deleting type in a history software package file library in a new history compatible database, and deleting the history difference information corresponding to the software package of the deleting type in a history difference database.
According to the method for generating the compatible database, provided by the embodiment of the application, the target compatible database is obtained by analyzing the difference data of the target image file and the history image file of the target system and updating the history compatible database based on the difference data, so that repeated analysis of the same data under the target image file and the history image file in the process of generating the target compatible database corresponding to the target version can be avoided, the generation time of the target compatible database is shortened, and the generation efficiency of the target compatible database is improved. The method also adopts different updating strategies aiming at the change types of the software packages in the difference data, so that the method is more flexible when updating the history compatible database.
Fig. 9 is a schematic structural diagram of a compatible database generating device according to an embodiment of the present application. Referring to fig. 9, the compatible database generating apparatus 10 includes:
a determining module 11, configured to determine, in response to upgrading a target system to a target version, a history version corresponding to the target version, where the target system is a system after migration of a source system;
The determining module 11 is further configured to determine a history compatibility database corresponding to the history version, where the history compatibility database is used for being compatible with the source system and the target system of the history version;
The determining module 11 is further configured to determine difference data according to a target image file corresponding to the target system under the target version and a history image file corresponding to the target system under the history version;
and the updating module 12 is configured to update the historical compatibility database according to the difference data to obtain a target compatibility database, where the target compatibility database is used for being compatible with the source system and the target system of the target version.
In one possible implementation, the determining module 11 is specifically configured to:
determining the change type of the software package in the target image file according to the history image file and the target image file;
And updating the target image file according to the change type of the software package to obtain the differential data.
In a possible implementation, the determining module 11 is specifically further configured to:
if the change type of the software package is a no-change type, deleting the software package in the target image file, wherein the no-change type is used for indicating that the names and version numbers of the software packages in the target image file and the history image file are the same;
If the change type of the software package is a modification type, marking the change type of the software package as a modification type, wherein the modification type is used for indicating that the names of the software packages in the target image file and the history image file are the same and the version numbers are different;
if the change type of the software package is a new type, marking the change type of the software package as a new type, wherein the new type is used for indicating that the target image file comprises the software package and the history image file does not comprise the software package;
If the change type of the software package is a deletion type, adding the software package information of the software package in the target image file, and marking the change type of the software package as a deletion type in the target image file, wherein the deletion type is used for indicating that the target image file does not comprise the software package and the history image file comprises the software package.
In one possible implementation, the updating module 12 is specifically configured to:
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 for storing software package information of each software package in the target image file;
And updating the history compatible database according to the difference data and the target software package index database to obtain the target compatible database.
In a possible implementation manner, the history compatible database includes a history software package index library and a history software package file library corresponding to the target system under the history version, where the history software package index library is used to store software package information of each software package in the history image file, and the history software package file library is used to store a history file corresponding to each software package in the history image file; the updating module 12 is specifically further configured to:
updating the historical software package index library in the historical compatible database to the target software package index library;
Determining the change type of each software package in the differential data;
And updating the historical software package file library according to the change type of each software package to obtain the target compatible database.
In one possible implementation manner, for any one software package in the differential data, the change type of the software package is a modification type; the updating module 12 is specifically further configured to:
Decompressing the software package to obtain a target file corresponding to the software package under the target version;
Determining a history file corresponding to the software package in the history software package file library;
And updating the history file in the history software package file library into the target file.
In a possible implementation manner, the history compatible database further includes a source software package file library corresponding to the source system and a history difference database corresponding to the target system under the history version, where the history difference database is obtained by comparing the history software package file library with the source software package file library; after updating the historical software file library, the updating module 12 is specifically further configured to:
acquiring a source file corresponding to the software package from the source software package file library, and determining target difference information between the target file and the source file;
and updating the historical difference information corresponding to the software package into the target difference information in the historical difference database, wherein the historical difference information is obtained by comparing the historical file with the source file.
In one possible implementation manner, for any software package in the differential data, the change type of the software package is a new type; the updating module 12 is specifically further configured to:
Decompressing the software package to obtain a target file corresponding to the software package under the target version;
and newly adding the target file corresponding to the software package in the historical software package file library.
In a possible implementation manner, for any software package in the differential data, the change type of the software package is a deletion type, and the history compatible database further includes a source software package file library corresponding to the source system and a history differential database corresponding to the target system under the history version, where the history differential database is obtained by comparing the history software package file library with the source software package file library; the updating module 12 is specifically further configured to:
acquiring the identification of the software package from the differential data;
according to the identification of the software package, determining a history file corresponding to the software package in the history software package file library, and deleting the history file;
And according to the identification of the software package, determining the history difference information corresponding to the software package in the history difference database, and deleting the history difference information.
In a possible implementation, the determining module 11 is specifically further configured to:
acquiring a source image file of the source system and a history image file corresponding to the target system under the history version;
Generating 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 generating a history software package index library and a history software package file library corresponding to the target system under the history version according to the history image file;
performing differential processing on the source software package file library and the history software package file library to obtain a history differential database corresponding to the target system under the history version;
The history compatible database comprises the source software package index library, the source software package file library, the history software package index library, the history software package file library and the history difference database.
The compatible database generating device provided by the embodiment of the application can execute the technical scheme shown in the embodiment of the method, and the implementation principle and the beneficial effects are similar, and are not repeated here.
Fig. 10 is a schematic hardware structure of a computing device according to an embodiment of the present application. Referring to fig. 10, the computing device 20 may include a processor 21 and a memory 22, the processor 21 and the memory 22 being coupled. Wherein the processor 21 and the memory 22 may communicate; the processor 21 and the memory 22 are in communication via a communication bus 23, as an example.
The memory 22 is used for storing computer instructions;
the processor 21 is configured to execute the computer instructions stored in the memory 22, so as to execute the technical solution as shown in the foregoing method embodiment.
Optionally, the computing device 20 may also include a communication interface, which may include a transmitter and/or a receiver.
Alternatively, the Processor may be a central processing unit (Central Processing Unit, CPU), other general purpose Processor, digital signal Processor (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in the processor for execution.
The embodiment of the application also provides a chip for executing the compatible database generation method described in the above embodiment, and its implementation principle and technical effects are similar, and will not be described here again.
Embodiments of the present application provide a computer-readable storage medium having stored thereon computer-executable instructions; the computer-executable instructions, when executed by a processor, are for implementing the compatible database generation method as described in the above embodiments.
An embodiment of the present application provides a computer program product, which includes a computer program, which when executed by a processor, causes a computing device to execute the compatible database generating method described in the above embodiment.
All or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The aforementioned program may be stored in a readable memory. The program, when executed, performs steps including the method embodiments described above; and the aforementioned memory (storage medium) includes: read-only memory (abbreviated as ROM), RAM, flash memory, hard disk, solid state disk, magnetic tape (English: MAGNETIC TAPE), floppy disk (English: floppy disk), optical disk (English: optical disk), and any combination thereof.
All or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The aforementioned program may be stored in a readable memory. The program, when executed, performs steps including the method embodiments described above; and the aforementioned memory (storage medium) includes: read-only memory (abbreviated as ROM), RAM, flash memory, hard disk, solid state disk, magnetic tape (English: MAGNETIC TAPE), floppy disk (English: floppy disk), optical disk (English: optical disk), and any combination thereof.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processing unit of a general purpose computer, special purpose computer, embedded processor, or other programmable terminal device to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable terminal device to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable terminal device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer implemented process such that the instructions which execute on the computer or other programmable device provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In embodiments of the present application, the term "include" and variations thereof may refer to non-limiting inclusion; the term "or" and variations thereof may refer to "and/or". The terms "first," "second," and the like in embodiments of the present application are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. In the embodiments of the present application, "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the embodiments of the present application, and are not limited thereto; although embodiments of the present application have been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A method of generating a compatible database, the method comprising:
Responding to upgrading of a target system to a target version, and determining a history version corresponding to the target version, wherein the target system is a system after migration of a source system;
determining a history compatibility database corresponding to the history version, wherein the history compatibility database is used for being compatible with the source system and the target system of the history version;
Determining difference data according to a target image file corresponding to the target system under the target version and a history image file corresponding to the target system under the history version, and updating the history compatible database according to the difference data to obtain a target compatible database, wherein the target compatible database is used for being compatible with the source system and the target system of the target version.
2. The method of claim 1, wherein determining the differential data based on the target image file corresponding to the target system in the target version and the history image file corresponding to the target system in the history version comprises:
determining the change type of the software package in the target image file according to the history image file and the target image file;
And updating the target image file according to the change type of the software package to obtain the differential data.
3. The method of claim 2, wherein updating the target image file according to the change type of the software package to obtain the differential data comprises:
if the change type of the software package is a no-change type, deleting the software package in the target image file, wherein the no-change type is used for indicating that the names and version numbers of the software packages in the target image file and the history image file are the same;
If the change type of the software package is a modification type, marking the change type of the software package as a modification type, wherein the modification type is used for indicating that the names of the software packages in the target image file and the history image file are the same and the version numbers are different;
if the change type of the software package is a new type, marking the change type of the software package as a new type, wherein the new type is used for indicating that the target image file comprises the software package and the history image file does not comprise the software package;
If the change type of the software package is a deletion type, adding the software package information of the software package in the target image file, and marking the change type of the software package as a deletion type in the target image file, wherein the deletion type is used for indicating that the target image file does not comprise the software package and the history image file comprises the software package.
4. A method according to any one of claims 1-3, wherein updating the history compatible database according to the difference data to obtain a target compatible database comprises:
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 for storing software package information of each software package in the target image file;
And updating the history compatible database according to the difference data and the target software package index database to obtain the target compatible database.
5. The method of claim 4, wherein the history compatible database includes a history package index library and a history package file library corresponding to the target system in the history version, the history package index library being used for storing package information of each package in the history image file, the history package file library being used for storing history files corresponding to each package in the history image file;
Updating the history compatible database according to the difference data and the target software package index database to obtain the target compatible database, wherein the updating comprises the following steps:
updating the historical software package index library in the historical compatible database to the target software package index library;
Determining the change type of each software package in the differential data;
And updating the historical software package file library according to the change type of each software package to obtain the target compatible database.
6. The method of claim 5, wherein for any one of the software packages in the differential data, the change type of the software package is a modification type; updating the historical software package file library according to the change type of the software package, wherein the updating comprises the following steps:
Decompressing the software package to obtain a target file corresponding to the software package under the target version;
Determining a history file corresponding to the software package in the history software package file library;
And updating the history file in the history software package file library into the target file.
7. The method of claim 6, wherein the history compatible database further comprises a source software package library corresponding to the source system and a history difference database corresponding to the target system in the history version, the history difference database being obtained by comparing the history software package library with the source software package library;
after updating the historical software package file library, the method further comprises the following steps:
acquiring a source file corresponding to the software package from the source software package file library, and determining target difference information between the target file and the source file;
and updating the historical difference information corresponding to the software package into the target difference information in the historical difference database, wherein the historical difference information is obtained by comparing the historical file with the source file.
8. The method of claim 5, wherein for any one of the software packages in the differential data, the change type of the software package is a new type; updating the historical software package file library according to the change type of the software package, wherein the updating comprises the following steps:
Decompressing the software package to obtain a target file corresponding to the software package under the target version;
and newly adding the target file corresponding to the software package in the historical software package file library.
9. The method according to claim 5, wherein, for any one of the software packages in the differential data, the change type of the software package is a deletion type, and the history compatible database further includes a source software package library corresponding to the source system and a history differential database corresponding to the target system in the history version, the history differential database being obtained by comparing the history software package library with the source software package library;
Updating the historical software package file library according to the change type of the software package, wherein the updating comprises the following steps:
acquiring the identification of the software package from the differential data;
according to the identification of the software package, determining a history file corresponding to the software package in the history software package file library, and deleting the history file;
And according to the identification of the software package, determining the history difference information corresponding to the software package in the history difference database, and deleting the history difference information.
10. A computing device, comprising: a processor and a memory; the processor and the memory are coupled;
The memory is used for storing computer instructions;
The processor is configured to execute computer instructions stored in the memory to perform the method of any one of claims 1 to 9.
CN202410362235.9A 2024-03-27 2024-03-27 Compatible database generation method and computing device Pending CN118210781A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410362235.9A CN118210781A (en) 2024-03-27 2024-03-27 Compatible database generation method and computing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410362235.9A CN118210781A (en) 2024-03-27 2024-03-27 Compatible database generation method and computing device

Publications (1)

Publication Number Publication Date
CN118210781A true CN118210781A (en) 2024-06-18

Family

ID=91453213

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410362235.9A Pending CN118210781A (en) 2024-03-27 2024-03-27 Compatible database generation method and computing device

Country Status (1)

Country Link
CN (1) CN118210781A (en)

Similar Documents

Publication Publication Date Title
US7739679B2 (en) Object ordering tool for facilitating generation of firmware update friendly binary image
US11169792B2 (en) Method and apparatus for generating patch
US10360023B2 (en) Source code revision control with selectable file portion synchronization
CN103914439A (en) Method, device and system for online document edition
CN108536745B (en) Shell-based data table extraction method, terminal, equipment and storage medium
CN111158741B (en) Method and device for monitoring dependency relationship change of service module on third party class library
CN107025108B (en) Exporting hierarchical data from a Source Code Management (SCM) system to a Product Lifecycle Management (PLM) system
CN112965761B (en) Data processing method, system, electronic equipment and storage medium
US11328021B2 (en) Automatic resource management for build systems
WO2019041891A1 (en) Method and device for generating upgrade package
WO2020123923A1 (en) Automated testing for metadata-driven custom applications
US20210124575A1 (en) Providing build avoidance without requiring local source code
CN110716804A (en) Method and device for automatically deleting useless resources, storage medium and electronic equipment
CN118210781A (en) Compatible database generation method and computing device
CN115543967A (en) Data migration method and device, electronic equipment and computer readable medium
CN115729590A (en) Service deployment method, device, equipment and computer readable storage medium
CN111625232B (en) Method and device for generating application program installation package, readable medium and electronic equipment
CN110580216A (en) application extraction and detection method and device
CN114330278A (en) Method and equipment for judging consistency of returned data
CN114527993A (en) Application deployment method, device, equipment and medium
CN114115982A (en) Code issuing method, device, equipment and storage medium
CN114625373A (en) Application conversion method and device, electronic equipment and storage medium
CN114089965A (en) Program development project management method and device based on monolithic code warehouse Monorepo
CN113721940A (en) Software deployment method and device, electronic equipment and storage medium
CN113806327A (en) Database design method and device and related equipment

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination