Software package management method and device, electronic equipment and storage medium
By performing compatibility checks on candidate operating system nodes in a cloud environment, the complexity and inefficiency of package management tools in the cloud environment are resolved, and unified management and stability assurance of multiple operating system nodes are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA TELECOM CLOUD TECH CO LTD
- Filing Date
- 2025-11-26
- Publication Date
- 2026-04-14
AI Technical Summary
Existing software package management tools cannot meet the needs of efficient management in cloud scenarios in a standalone environment. As a result, with a huge number of operating systems and a variety of vendors and versions, software package upgrades and maintenance are complex and inefficient, making it difficult to guarantee compatibility and stability.
By using package management methods, candidate nodes are determined based on the deployment target of the packages to be installed and the basic configuration information of the operating system nodes, and compatibility checks are performed, including installation compatibility and runtime compatibility checks, to ensure that the packages meet compatibility requirements when installed in batches on multiple operating system nodes.
It enables unified management of multiple operating system nodes, reduces the complexity of software package management, improves efficiency, and ensures the stability and compatibility of software packages, thus preventing system crashes and failures.
Smart Images

Figure CN121209937B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a software package management method, apparatus, electronic device, and storage medium. Background Technology
[0002] Package management tools are tools in operating systems used to automate the installation, uninstallation, upgrade, and querying of software packages. Their function is to simplify the package management process and ensure that software runs stably in the system.
[0003] Current package management tools are used in a standalone environment, managing packages on a single operating system. Once a package management tool is installed on an operating system, it can be used to install, uninstall, and upgrade packages.
[0004] However, in cloud environments, a resource pool, depending on its size, contains a large number of host operating systems, with a wide variety of vendors and versions. Current package management tools used in single-machine environments are insufficient for efficient management in cloud scenarios, both in terms of functionality and efficiency. When operations and development personnel handle large-scale resource pool failures and vulnerability fixes, package upgrades and maintenance become extremely difficult. The sheer number of operating systems, their different vendors and versions, and the need to upgrade and maintain each system using packages compatible with their respective vendors and versions make current package management methods complex and inefficient. Summary of the Invention
[0005] The purpose of this application is to provide a software package management method, apparatus, electronic device, and storage medium that can solve the problems of complex processing and low processing efficiency in software package management methods.
[0006] In a first aspect, embodiments of this application provide a software package management method, the method comprising:
[0007] Based on the deployment target information of the software package to be installed and the basic configuration information of each operating system node, candidate operating system nodes are determined;
[0008] Based on the first compatibility association information of the software package to be installed and the second compatibility association information of the candidate operating system node, a compatibility check is performed on the candidate operating system node;
[0009] If there are candidate operating system nodes that pass the compatibility check, the software package to be installed is uploaded to the target software package repository, and the candidate operating system nodes that pass the compatibility check are notified in batches to install the software package to be installed based on the target software package repository.
[0010] Optionally, the step of performing a compatibility check on the candidate operating system node based on the first compatibility association information of the software package to be installed and the second compatibility association information of the candidate operating system node includes:
[0011] Based on the first installation compatibility association information of the software package to be installed and the second installation compatibility association information of the candidate operating system node, an installation compatibility check is performed on the candidate operating system node;
[0012] If the candidate operating system node passes the installation compatibility check, then the candidate operating system node is subjected to a runtime compatibility check based on the first runtime compatibility association information of the software package to be installed and the second runtime compatibility association information of the candidate operating system node.
[0013] If the candidate operating system node passes the compatibility check, then the candidate operating system node is determined to have passed the compatibility check.
[0014] Optionally, the step of performing an installation compatibility check on the candidate operating system node based on the first installation compatibility association information of the software package to be installed and the second installation compatibility association information of the candidate operating system node includes:
[0015] Obtain the dependent software package information of the software package to be installed as the first installation compatibility association information, and obtain the target software package information corresponding to the candidate operating system node as the second installation compatibility association information;
[0016] The first installation compatibility association information is matched with the second installation compatibility association information. If the first match is successful, the candidate operating system node is determined to have passed the installation compatibility check.
[0017] Optionally, obtaining the target software package information corresponding to the candidate operating system node includes:
[0018] Obtain the first software package information corresponding to the software package repository configured on the candidate operating system node, and use the first software package information as the target software package information;
[0019] or,
[0020] Obtain the first software package information corresponding to the software package repository configured on the candidate operating system node, and the second software package information already installed on the candidate operating system node; use the software package information with the higher version in the first software package information and the second software package information as the target software package information.
[0021] Optionally, the step of performing a runtime compatibility check on the candidate operating system node based on the first runtime compatibility association information of the software package to be installed and the second runtime compatibility association information of the candidate operating system node includes:
[0022] At least one of the first instruction information, the first user-mode call information, and the first kernel-mode call information of the software package to be installed is obtained as the first runtime compatibility association information; at least one of the second instruction information, the second user-mode call information, and the second kernel-mode call information of the candidate operating system node is obtained as the second runtime compatibility association information.
[0023] The first runtime compatibility association information is matched with the second runtime compatibility association information. If the second match is successful, the candidate operating system node is determined to have passed the runtime compatibility check.
[0024] Optionally, obtaining at least one of the second instruction information, the second user-mode call information, and the second kernel-mode call information of the candidate operating system node includes:
[0025] After installing the software package to be installed on the candidate operating system node, at least one of the second instruction information, the second user-mode call information, and the second kernel-mode call information of the candidate operating system node is obtained according to the installation directory.
[0026] or,
[0027] After downloading and decompressing the software package to be installed on the candidate operating system node, at least one of the second instruction information, the second user-mode call information, and the second kernel-mode call information of the candidate operating system node is obtained according to the downloaded and decompressed directory.
[0028] Optionally, the step of performing a compatibility check on the candidate operating system node based on the first compatibility association information of the software package to be installed and the second compatibility association information of the candidate operating system node includes:
[0029] The candidate operating system nodes are divided into multiple groups, and the candidate operating system nodes in each group are of the same type.
[0030] For each group, any candidate operating system node within the group is selected as the target candidate operating system node. Based on the first compatibility association information of the software package to be installed and the second compatibility association information of the target candidate operating system node, a compatibility check is performed on the target candidate operating system node. If the target candidate operating system node passes the compatibility check, it is determined that all candidate operating system nodes within the group have passed the compatibility check.
[0031] Secondly, embodiments of this application provide a software package management apparatus, the apparatus comprising:
[0032] The determination module is used to determine candidate operating system nodes based on the deployment target information of the software package to be installed and the basic configuration information of each operating system node;
[0033] The inspection module is used to perform a compatibility check on the candidate operating system node based on the first compatibility association information of the software package to be installed and the second compatibility association information of the candidate operating system node.
[0034] The upload module is used to upload the software package to be installed to the target software package repository if there are candidate operating system nodes that have passed the compatibility check, and to notify the candidate operating system nodes that have passed the compatibility check to install the software package to be installed based on the target software package repository in batches.
[0035] Optionally, the inspection module includes:
[0036] The first inspection unit is used to perform an installation compatibility check on the candidate operating system node based on the first installation compatibility association information of the software package to be installed and the second installation compatibility association information of the candidate operating system node.
[0037] The second checking unit is used to perform a runtime compatibility check on the candidate operating system node based on the first runtime compatibility association information of the software package to be installed and the second runtime compatibility association information of the candidate operating system node if the candidate operating system node passes the installation compatibility check.
[0038] The determining unit is configured to determine that the candidate operating system node has passed the compatibility check if the candidate operating system node passes the running compatibility check.
[0039] Optionally, the first inspection unit includes:
[0040] The first acquisition subunit is used to acquire the dependent software package information of the software package to be installed as the first installation compatibility association information, and acquire the target software package information corresponding to the candidate operating system node as the second installation compatibility association information;
[0041] The first matching subunit is used to perform a first match between the first installation compatibility association information and the second installation compatibility association information, and if the first match is successful, determine that the candidate operating system node passes the installation compatibility check.
[0042] Optionally, the first acquisition subunit is specifically used for:
[0043] Obtain the first software package information corresponding to the software package repository configured on the candidate operating system node, and use the first software package information as the target software package information;
[0044] or,
[0045] Obtain the first software package information corresponding to the software package repository configured on the candidate operating system node, and the second software package information already installed on the candidate operating system node; use the software package information with the higher version in the first software package information and the second software package information as the target software package information.
[0046] Optionally, the second inspection unit includes:
[0047] The second acquisition subunit is used to acquire at least one of the first instruction information, the first user-mode call information, and the first kernel-mode call information of the software package to be installed, as the first runtime compatibility association information, and to acquire at least one of the second instruction information, the second user-mode call information, and the second kernel-mode call information of the candidate operating system node, as the second runtime compatibility association information.
[0048] The second matching subunit is used to perform a second match between the first runtime compatibility association information and the second runtime compatibility association information, and if the second match is successful, determine that the candidate operating system node passes the runtime compatibility check.
[0049] Optionally, the second acquisition subunit is specifically used for:
[0050] After installing the software package to be installed on the candidate operating system node, at least one of the second instruction information, the second user-mode call information, and the second kernel-mode call information of the candidate operating system node is obtained according to the installation directory.
[0051] or,
[0052] After downloading and decompressing the software package to be installed on the candidate operating system node, at least one of the second instruction information, the second user-mode call information, and the second kernel-mode call information of the candidate operating system node is obtained according to the downloaded and decompressed directory.
[0053] Optionally, the inspection module is specifically used for:
[0054] The candidate operating system nodes are divided into multiple groups, and the candidate operating system nodes in each group are of the same type.
[0055] For each group, any candidate operating system node within the group is selected as the target candidate operating system node. Based on the first compatibility association information of the software package to be installed and the second compatibility association information of the target candidate operating system node, a compatibility check is performed on the target candidate operating system node. If the target candidate operating system node passes the compatibility check, it is determined that all candidate operating system nodes within the group have passed the compatibility check.
[0056] Thirdly, embodiments of this application provide an electronic device including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the software package management method as described in any of the preceding claims.
[0057] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the software package management method as described in any of the preceding claims.
[0058] Fifthly, embodiments of this application provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the software package management method as described in any of the preceding claims.
[0059] In this embodiment, on the one hand, a unified software package management method is used to achieve batch software package management for multiple operating system nodes. Compared with the method of managing software packages for a single operating system node, this reduces the complexity of software package management and improves the efficiency of software package management. On the other hand, by performing compatibility checks on the software packages to be installed, only software packages that pass the compatibility check are uploaded, thereby ensuring that the software packages installed on the operating system nodes meet the compatibility requirements and ensuring the stability of the software packages.
[0060] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0061] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some drawings of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0062] Figure 1This is a system architecture diagram of an embodiment of this application;
[0063] Figure 2 This is a flowchart of a software package management method according to an embodiment of this application;
[0064] Figure 3 This is a flowchart of another software package management method according to an embodiment of this application;
[0065] Figure 4 This is a structural block diagram of a software package management device according to an embodiment of this application;
[0066] Figure 5 This is a structural block diagram of an electronic device according to an embodiment of this application;
[0067] Figure 6 This is a structural block diagram of a readable storage medium according to an embodiment of this application. Detailed Implementation
[0068] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0069] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0070] The software package management method provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0071] In cloud scenarios, with their massive number of operating system nodes from diverse vendors and versions, current single-machine package management tools are insufficient for managing complex cloud operating system node packages. Furthermore, they cannot guarantee compatibility during the repair process, addressing issues such as version selection. To address these problems, this application proposes a package management method for batch management of multiple operating system nodes. This method enables unified management of a vast number of operating system nodes across multiple vendors and versions in a complex cloud environment. It changes the single-machine package management workflow, improves operational efficiency, and resolves compatibility issues that current single-machine package management tools cannot address. Through a unified package management server, packages are checked and installed in batches, ensuring compatibility on every operating system node after installation. This guarantees the full lifecycle compatibility and stability of packages, preventing system crashes and failures caused by compatibility issues after installation.
[0072] Reference Figure 1 The diagram illustrates a system architecture according to an embodiment of this application.
[0073] like Figure 1 As shown, in a cloud-based resource pool, the package management tool server is deployed on an operating system node and connected to a switch in the resource pool via a management network. Each operating system node in the resource pool is connected to the switch via the management network. Once the package management tool client is installed on each operating system node, the package management tool server can establish a connection with the package management tool client on each operating system node through the management network, thus achieving interconnection and interaction. The package repository (repo) can be deployed independently on an operating system node, containing multiple package repositories. The network interface of the package repository is connected to the switch, ensuring network connectivity between the package management tool server, the package management tool client on each operating system node, and the package repository. The package management tool server can upload packages to the package repository, and the package management tool client on each operating system node can download packages from the package repository.
[0074] The software package management method in this application embodiment can be applied to the software package management tool server.
[0075] Reference Figure 2 The diagram shows a flowchart of a software package management method according to an embodiment of this application.
[0076] like Figure 2 As shown, the package management method may include the following steps:
[0077] Step 201: Determine candidate operating system nodes based on the deployment target information of the software package to be installed and the basic configuration information of each operating system node.
[0078] After the package management tool server and the package management tool clients on each operating system node are deployed, the package management tool server can establish network connections with each package management tool client through the resource pool management network (layer 3 network).
[0079] The package management tool server, through relevant tool commands from the package management tool client, instructs each package management tool client to report the basic configuration information of its respective operating system node. After receiving this basic configuration information, the package management tool server stores it in the database, thereby establishing the resource pool's BIDM (Basic Information Data Map). The package management tool server can view the basic configuration information of each operating system node in the resource pool and can filter and categorize it based on any keywords. Each basic configuration information entry contains the basic configuration information of one operating system node.
[0080] For example, the basic configuration information of the operating system node may include, but is not limited to: the architecture information of the operating system node, the vendor information of the operating system node, the version information of the operating system node, the package repository (repo repository) information configured on the operating system node, the IP (Internet Protocol) address (resource pool management network IP address) of the operating system node, and so on.
[0081] The user provides the package to be installed to the package management tool server, along with the deployment target information for the package. The package to be installed can be one or more packages.
[0082] For example, the deployment target information of the software package to be installed may include, but is not limited to: the architecture information of the software package to be installed, the software package repository information to which the software package to be installed belongs, etc.
[0083] For each software package to be installed, the software package management tool server obtains the deployment target information of the software package and the basic configuration information of each operating system node. Based on the deployment target information of the software package to be installed and the basic configuration information of each operating system node, it determines the candidate operating system nodes. The software package management tool server can execute this process after the user provides the software package to be installed, or it can execute this process according to a set periodicity; this embodiment does not impose any restrictions on this.
[0084] For example, the process of determining candidate operating system nodes based on the deployment target information of the software package to be installed and the basic configuration information of each operating system node may include: for each operating system node, comparing the basic configuration information of the operating system node with the deployment target information of the software package to be installed; if there is information in the basic configuration information of the operating system node that is consistent with the deployment target information of the software package to be installed, then the operating system node is determined as a candidate operating system node.
[0085] For example, the architecture information of the software package to be installed is compared with the architecture information of the operating system node, and the software package repository information to which the software package to be installed belongs is compared with the software package repository information configured on the operating system node. If they match, the operating system node is determined to be a candidate operating system node.
[0086] Step 202: Perform a compatibility check on the candidate operating system node based on the first compatibility association information of the software package to be installed and the second compatibility association information of the candidate operating system node.
[0087] The software package management tool server obtains the first compatibility association information of the software package to be installed and the second compatibility association information of the candidate operating system node. Based on the first compatibility association information of the software package to be installed and the second compatibility association information of the candidate operating system node, it performs a compatibility check on the candidate operating system node. The first compatibility association information of the software package to be installed refers to information related to the compatibility of the software package to be installed, and the second compatibility association information of the candidate operating system node refers to information related to the compatibility of the candidate operating system node.
[0088] In one alternative implementation, a compatibility check can be performed on each candidate operating system node based on the first compatibility association information of the software package to be installed and the second compatibility association information of the candidate operating system node.
[0089] In one optional implementation, the first compatibility association information of the software package to be installed includes the first installation compatibility association information and the first runtime compatibility association information of the software package to be installed. The second compatibility association information of the candidate operating system node includes the second installation compatibility association information and the second runtime compatibility association information of the candidate operating system node. Specifically, the first installation compatibility association information of the software package to be installed refers to information associated with the installation compatibility of the software package to be installed; the first runtime compatibility association information of the software package to be installed refers to information associated with the runtime compatibility of the software package to be installed; the second installation compatibility association information of the candidate operating system node refers to information associated with the installation compatibility of the candidate operating system node; and the second runtime compatibility association information of the candidate operating system node refers to information associated with the runtime compatibility of the candidate operating system node.
[0090] Accordingly, the process of performing a compatibility check on the candidate operating system node based on the first compatibility association information of the software package to be installed and the second compatibility association information of the candidate operating system node may include: performing an installation compatibility check on the candidate operating system node based on the first installation compatibility association information of the software package to be installed and the second installation compatibility association information of the candidate operating system node; if the candidate operating system node passes the installation compatibility check, then performing an operation compatibility check on the candidate operating system node based on the first operation compatibility association information of the software package to be installed and the second operation compatibility association information of the candidate operating system node; if the candidate operating system node passes the operation compatibility check, then it is determined that the candidate operating system node has passed the compatibility check. If the candidate operating system node fails the installation compatibility check or fails the operation compatibility check, then it is determined that the candidate operating system node has failed the compatibility check. In this method, by performing compatibility checks on both the installation compatibility check and the operation compatibility check, the installation compatibility and operation compatibility of the software package to be installed can be guaranteed.
[0091] In one optional implementation, the process of performing an installation compatibility check on the candidate operating system node based on the first installation compatibility association information of the software package to be installed and the second installation compatibility association information of the candidate operating system node may include: obtaining the dependent software package information of the software package to be installed as the first installation compatibility association information, and obtaining the target software package information corresponding to the candidate operating system node as the second installation compatibility association information; performing a first match between the first installation compatibility association information and the second installation compatibility association information; if the first match is successful, determining that the candidate operating system node has passed the installation compatibility check; if the first match fails, determining that the candidate operating system node has failed the installation compatibility check.
[0092] For example, in the process of obtaining the dependency information of the software package to be installed, the dependency information can be obtained by parsing the control file (included in the software package to be installed). For instance, the dependency information of the software package to be installed can be extracted by parsing the build specification file (spec file) and control description file (control file) of the software package to be installed.
[0093] For example, dependency package information can include installation dependency package information and runtime dependency package information. Installation dependency package information refers to the package information required during installation, while runtime dependency package information refers to the package information required during runtime. Dependency package information may include, but is not limited to, the names of the dependent packages, the required version of the dependent packages (e.g., the dependent package version needs to be higher than a certain version), etc.
[0094] For example, in the process of obtaining the target software package information corresponding to the candidate operating system node, the first software package information corresponding to the software package repository configured by the candidate operating system node (that is, the software package repository to which the software package to be installed belongs) can be obtained, and the first software package information can be used as the target software package information.
[0095] The package management tool server can synchronize the database file of the package repository (i.e., the package repository to which the package to be installed belongs) configured on the candidate operating system node via the network. The database file contains information about each package in the package repository, specifically including the package name, version number, etc. The package information contained in the database file of the package repository (i.e., the package repository to which the package to be installed belongs) of the candidate operating system node is used as the first package information.
[0096] For example, considering that under normal circumstances the versions of software packages installed on an operating system node are consistent with those in the software package repository, but under abnormal circumstances, the versions of software packages installed on the operating system node may be higher than those in the software package repository for some reason, in this case, only checking the first software package information in the software package repository is inaccurate. Therefore, in the process of obtaining the target software package information corresponding to the candidate operating system node, the first software package information corresponding to the software package repository configured on the candidate operating system node and the second software package information installed on the candidate operating system node can be obtained; the software package information with the higher version in the first software package information and the second software package information is used as the target software package information. This is to deal with the special processing of installation compatibility checks under abnormal scenarios and ensure the reliability of the check results.
[0097] The package management tool server can obtain information about the various packages installed on candidate operating system nodes via the network as second package information, which may include package names, version numbers, and other information. The first and second package information are compared, and the package with the higher version is selected as the target package information. Specifically, for packages with the same name in the first and second package information, the package with the higher version is selected.
[0098] After obtaining the first installation compatibility association information and the second installation compatibility association information, the first installation compatibility association information and the second installation compatibility association information are matched for the first time. If the first match is successful (that is, the first installation compatibility association information and the second installation compatibility association information are successfully matched), the candidate operating system node is determined to have passed the installation compatibility check.
[0099] For example, a successful first match (i.e., a successful match between the first installation compatibility association information and the second installation compatibility association information) means that the second installation compatibility association information contains information that satisfies the first installation compatibility association information. Specifically, it can mean that the target software package information contains information that satisfies the dependent software package information. For instance, if the dependent software package information of the software package to be installed includes a dependent software package name A and a dependent software package version requirement of A>1.0.1, and if the target software package information corresponding to the candidate operating system node includes a software package name A and A=1.0.2 (satisfying A>1.0.1), then the match is successful.
[0100] In one optional implementation, the process of performing a runtime compatibility check on the candidate operating system node based on the first runtime compatibility association information of the software package to be installed and the second runtime compatibility association information of the candidate operating system node may include: obtaining at least one of the first instruction information, the first user-mode call information, and the first kernel-mode call information of the software package to be installed as the first runtime compatibility association information; obtaining at least one of the second instruction information, the second user-mode call information, and the second kernel-mode call information of the candidate operating system node as the second runtime compatibility association information; performing a second match between the first runtime compatibility association information and the second runtime compatibility association information; and determining that the candidate operating system node passes the runtime compatibility check if the second match is successful.
[0101] For example, in the process of obtaining at least one of the first instruction information, first user-mode call information, and first kernel-mode call information of the software package to be installed, the instruction set used in the binary file (executable file) of the software package to be installed can be parsed, and the instruction information in the instruction set can be used as the first instruction information; the header file information called by the debug information package (debuginfo package) of the software package to be installed can be parsed, and the called dynamic library information and called function interface information can be extracted as the first user-mode call information; the system call header file and kernel header file of the software package to be installed can be parsed, and the system call information and called kernel function information can be extracted as the first kernel-mode call information.
[0102] For example, during the process of obtaining at least one of the second instruction information, second user-mode call information, and second kernel-mode call information of the candidate operating system node, at least one of these information can be obtained from the installation directory after the software package to be installed on the candidate operating system node. In this approach, by obtaining relevant information from the installation directory after the software package to be installed, inaccurate detection can be avoided if the software package on the candidate operating system node is updated as a dependent package during the installation process.
[0103] For example, in the process of obtaining at least one of the second instruction information, second user-mode call information, and second kernel-mode call information of the candidate operating system node, after downloading and decompressing the software package to be installed on the candidate operating system node, at least one of the second instruction information, second user-mode call information, and second kernel-mode call information of the candidate operating system node can be obtained according to the download and decompression directory. In this method, to avoid installing related dependent packages when installing the software package to be installed in the production environment, which would damage the production environment, a method of downloading without installing is proposed. The software package to be installed (including dependent packages) is downloaded to a temporary directory (also known as a temporary path). After decompressing the software package to be installed, relevant information is obtained according to the temporary directory, and the involved library files are marked. The search is performed in the candidate operating system node path. If an older version of the library file is found, it is marked. A compatibility check is performed, and a higher version is used for comparison to ensure that the library files at runtime are consistent with the actual installation scenario without damaging the production environment.
[0104] For example, in the process of obtaining at least one of the second instruction information, the second user-mode call information, and the second kernel-mode call information of the candidate operating system node, the instruction set supported by the candidate operating system node can be obtained through an information viewing command (such as the lscpu command), and the instruction information in the instruction set can be used as the second instruction information; the header file of the dynamic library of the candidate operating system node can be parsed to extract the dynamic library information and function interface information as the second user-mode call information; the system call header file and kernel header file of the candidate operating system node can be parsed to extract the system call information and kernel function information as the second kernel-mode call information.
[0105] After obtaining the first runtime compatibility association information and the second runtime compatibility association information, the first runtime compatibility association information and the second runtime compatibility association information are matched for the second time. If the second match is successful (that is, the first runtime compatibility association information and the second runtime compatibility association information are successfully matched), the candidate operating system node is determined to have passed the runtime compatibility check.
[0106] For example, a successful second match (i.e., a successful match between the first runtime compatibility association information and the second runtime compatibility association information) means that the second runtime compatibility association information contains the first runtime compatibility association information. Specifically, for the first instruction information and the second instruction information, the second instruction information must contain the first instruction information; for the first user-mode call information and the second user-mode call information, the second user-mode call information must contain the first user-mode call information; for the first kernel-mode call information and the second kernel-mode call information, the second kernel-mode call information must contain the first kernel-mode call information.
[0107] In one optional implementation, the process of performing a compatibility check on the candidate operating system nodes based on the first compatibility association information of the software package to be installed and the second compatibility association information of the candidate operating system nodes may include: dividing the candidate operating system nodes into multiple groups, with each group containing candidate operating system nodes of the same type; for each group, selecting any candidate operating system node within that group as a target candidate operating system node; performing a compatibility check on the target candidate operating system node based on the first compatibility association information of the software package to be installed and the second compatibility association information of the target candidate operating system node; and if the target candidate operating system node passes the compatibility check, then it is determined that all candidate operating system nodes within the group have passed the compatibility check. Here, "candidate operating system nodes of the same type" means that the basic configuration information of the candidate operating system nodes is the same. This method, by selecting a target candidate operating system node as a representative for compatibility checking, can further reduce the computational load and improve computational efficiency.
[0108] It should be noted that the specific process of performing compatibility checks on the target candidate operating system node based on the first compatibility association information of the software package to be installed and the second compatibility association information of the target candidate operating system node is basically the same as the specific process of performing compatibility checks on the candidate operating system node based on the first compatibility association information of the software package to be installed and the second compatibility association information of the candidate operating system node described above. For details, please refer to the relevant description above. This embodiment will not be discussed in detail here.
[0109] Step 203: If there are candidate operating system nodes that pass the compatibility check, upload the software package to be installed to the target software package repository, and notify the candidate operating system nodes that pass the compatibility check to install the software package based on the target software package repository in batches.
[0110] If candidate operating system nodes pass the compatibility check, the software package to be installed is uploaded to the target software package repository for those nodes, and the candidate operating system nodes that passed the compatibility check are notified in batches to install the software package based on the target software package repository. Here, the target software package repository refers to the software package repository to which the software package to be installed belongs.
[0111] It should be noted that the package management tool server can send notifications in batches to the candidate operating system nodes that have passed the compatibility check. These notifications may include information about the target package repository (such as its IP address). Upon receiving this notification, the candidate operating system nodes that have passed the compatibility check can download the package to be installed from the target package repository and install it. If the candidate operating system node that passed the compatibility check has already installed the package to be installed during the compatibility check process, it does not need to install it again. If the candidate operating system node that passed the compatibility check has already downloaded and decompressed the package to be installed during the compatibility check process, it does not need to download and decompress it again; it can simply install the package based on the already downloaded one.
[0112] If any candidate operating system nodes fail the compatibility check, for those nodes, the installation package can be remade or the relevant configuration of the package repository can be adjusted, and then the above steps can be repeated. If the installation package was already installed on the candidate operating system node that failed the compatibility check during the compatibility check process, then the related files of the installation package should be deleted; if the installation package was downloaded and extracted on the candidate operating system node that failed the compatibility check during the compatibility check process, then the related files of the installation package should be deleted.
[0113] This application's embodiments can solve the complex problems of the entire software package lifecycle management process, such as maintainability, operability, compatibility, and stability. In cloud scenarios, the maintenance and management of software packages in complex operating system environments with multiple vendors and versions is prone to version and compatibility issues. The software package management method of this application's embodiments solves the problems of software package installation version matching, centralized compatibility management and detection, and runtime compatibility analysis and prediction in large-scale operating system clusters. It significantly reduces operation and maintenance costs, greatly reduces the occurrence of compatibility issues during installation, eliminates potential runtime compatibility problems, thereby avoiding compatibility issues and failure rates, improving the efficiency of software package lifecycle management, and enhancing software package compatibility and stability. Operation and maintenance personnel can clearly understand the status of software packages in the entire cluster operating system, the status of software packages to be installed, and the installation compatibility and runtime compatibility status of software packages to be installed through the software package management tool server.
[0114] In one optional implementation, the software package management method of this application mainly includes the following processes:
[0115] ① The server-side of the package management tool in the resource pool.
[0116] ② Deploy the software package management tool client on each operating system node in the resource pool.
[0117] ③BIDM: Primarily used to store basic configuration information of operating system nodes in the resource pool, including but not limited to hardware architecture information, vendor information, version information, and IP address. The package management tool server establishes a network connection with the package management tool client through a Layer 3 network (resource pool management network IP address). It then uses relevant information retrieval commands from the package management tool client to obtain the architecture information, vendor information, version information, and repository information of the operating system nodes, along with the management network IP address. This information is added to the package management tool server's database as the basic configuration information of the operating system nodes, establishing the resource pool BIDM. When one or more packages need to be placed in the resource pool's repository for upgrade or installation, candidate operating system nodes need to be determined based on the deployment target information of the packages to be installed and the basic configuration information of the operating system nodes.
[0118] ④ ICDP (Installation Compatibility Data Map): Primarily used to store installation compatibility information for packages to be installed, preparing for subsequent installation. For identified candidate operating system nodes, an installation compatibility check is required. This involves checking whether the first installation compatibility association information of the package to be installed (such as the installation dependency information and runtime dependency information of the control file (binary package)) is included in the second installation compatibility association information of the candidate operating system node (such as the package information contained in the repo repository configured on the candidate operating system node). If the condition is met (i.e., included), the installation compatibility check is passed, and installation verification can be performed in the corresponding operating system node environment. The installation compatibility check results are stored in the database of the package management tool server, preparing for subsequent installation of the package to be installed in the production environment.
[0119] ⑤ RTCDM (Run-Time Compatibility Data Map): This primarily checks the external interface compatibility of the software package to be installed at runtime, thereby ensuring the stability of the application after installation. After passing the installation compatibility check, a runtime compatibility check needs to be performed on the candidate operating system nodes. Using the second runtime compatibility association information of the candidate operating system nodes (such as at least one of the second instruction information, second user-mode call information, and second kernel-mode call information, specifically obtained through binary file information, binary symbol information, binary external interface call information, etc.), the first runtime compatibility association information (such as at least one of the first instruction information, first user-mode call information, and first kernel-mode call information) of the software package to be installed is used to determine whether the runtime compatibility is satisfied during runtime and when calling external interfaces. If it is satisfied, the runtime compatibility check is passed.
[0120] ⑥ Based on the results of ④ and ⑤, upload the packages to be installed corresponding to the candidate operating system nodes that have passed the installation compatibility check and the running compatibility check to their respective repo repositories, and set the operating system nodes that have passed the installation compatibility check and the running compatibility check to the installation stage in BIDM.
[0121] ⑦ Repeat steps ④, ⑤, and ⑥. After the package to be installed has been checked, and the relevant candidate operating system nodes are in the compatibility check-passed and ready-to-install stage, the package management tool server can issue batch commands to the candidate operating system nodes in the compatibility check-passed and ready-to-install stage to initiate the installation. The package management tool client then returns the package installation status and modifies the status of the candidate operating system nodes in the package management tool server to the completed status.
[0122] Reference Figure 3 The diagram shows a flowchart of another software package management method according to an embodiment of this application.
[0123] like Figure 3 As shown, the package management method may include the following steps:
[0124] S1, the package management tool server obtains the basic configuration information of each operating system node and establishes a basic information data map.
[0125] S2, the package management tool server obtains the package to be installed and the deployment target information of the package to be installed.
[0126] S3, the package management tool server compares the deployment target information and basic information data map of the package to be installed, selects candidate operating system nodes, and can also set the detection bits for candidate operating system nodes.
[0127] S4, the package management tool server obtains the target package information of the candidate operating system node based on the package repository information configured on the candidate operating system node.
[0128] S5, the package management tool server obtains the dependent package information of the package to be installed (including installation dependent package information and runtime dependent package information) based on the control file of the package to be installed.
[0129] S6: The package management tool server performs an installation compatibility check on candidate operating system nodes based on the dependent package information and the target package information. If the installation compatibility check passes, S7 is executed for the candidate operating system nodes that have passed the installation compatibility check. If the installation compatibility check fails, S13 is executed to resolve the installation compatibility issue, reconfigure the package, and then return to S2.
[0130] S7, the package management tool server sets the candidate operating system nodes that have passed the installation compatibility check to the status of having passed the installation compatibility check.
[0131] S8, the package management tool server obtains the first runtime compatibility association information of the package to be installed and the second runtime compatibility association information of the candidate operating system nodes that have passed the installation compatibility check.
[0132] S9: The package management tool server performs runtime compatibility checks on candidate operating system nodes that have passed the installation compatibility check, based on the first runtime compatibility association information and the second runtime compatibility association information. If the runtime compatibility check passes, S10 is executed for the candidate operating system nodes that have passed the runtime compatibility check; otherwise, S14 is executed to resolve runtime compatibility issues, reconfigure the package, and return to S2.
[0133] Compatibility checks can be analyzed from the following dimensions:
[0134] a. Compiler Compatibility (corresponding to the first and second instruction information mentioned above): This determines whether the instructions generated by the compiler in the compilation and runtime environments are compatible. If the instructions generated by the compiler in the compilation environment cannot be executed on the operating system node, a compiler compatibility issue will occur, causing the software package to fail to run properly after installation. For example, if the compilation machine supports a certain execution feature, the compiler will compile the programs in the software package that use that specific instruction into the corresponding instruction to improve the performance of vector calculations. If the machines in the resource pool do not support that instruction, the application will encounter an exception when running that instruction, causing the program to crash. Therefore, it is possible to check whether the instructions in the first instruction information used by the software package are supported in the second instruction information supported by the candidate operating system nodes. If both are supported, then the compiler compatibility is passed. If not, then the compiler compatibility is failed.
[0135] b. User-mode compatibility (corresponding to the first and second user-mode call information mentioned above): If the interface on the call chain involves user-mode programs (by detecting whether the package to be installed directly or indirectly uses system calls, whether there are kernel module binary files, and other kernel-mode related information), the first user-mode call information of the package to be installed (the external interfaces called, including dynamic libraries referenced by the application, binary detection of the called interfaces, detection of header file information called by the package to be installed, parsing and recording its function name, return value, number of parameters, type, etc.) can be compared and matched one by one with the second user-mode call information of the candidate operating system node (related files under the dynamic library header file path, etc.). If the match is successful, user-mode compatibility is set to pass; otherwise, user-mode compatibility is set to fail.
[0136] c. Kernel-mode compatibility: If the package to be installed directly or indirectly uses system calls and has kernel module binary files, it is necessary to further compare and match the first kernel-mode call information of the package to be installed (including system calls and kernel binary files, etc.) with the second kernel-mode call information of the candidate operating system node (kernel header files and system call header files, etc.). The comparison includes the return value of the call interface, parameter type, number of parameters, etc. If the match is successful, the kernel-mode compatibility is set to pass; otherwise, the kernel-mode compatibility is set to fail.
[0137] The above methods, by detecting the relationship between hardware characteristics and the compiler in the compilation environment, prevent instruction compatibility issues caused by the compiler and CPU, reduce the probability of system crashes due to compiler and CPU instruction compatibility problems, and enhance system stability. By detecting the compatibility dependencies of the software package to be installed in user mode and kernel mode at runtime on system libraries, kernel system calls, and kernel interfaces, and comparing the matching of system calls and kernel header files with the binary files of the software package to be installed, comprehensive compatibility matching from ABI (Application Binary Interface) to API (Application Programming Interface) is achieved, enhancing system compatibility and stability and avoiding runtime compatibility issues that could lead to exceptions.
[0138] S10, the package management tool server sets the candidate operating system nodes that have passed the compatibility check to the status of having passed the compatibility check.
[0139] S11, the package management tool server uploads the packages to be installed to the corresponding target package repository based on the status of the candidate operating system nodes.
[0140] S12, the package management tool service, based on the status of candidate operating system nodes, batch notifies candidate operating system nodes that have passed the installation compatibility check and the run compatibility check to install the packages to be installed.
[0141] In this embodiment, the software package management tool server adopts a distributed management model. Through the overall control of the software package management tool server, the operating system nodes within the resource pool are uniformly managed, which greatly improves the efficiency of software package maintenance under large-scale multi-operating system nodes in cloud scenarios, reduces the workload of version checking and comparison, and reduces the tedious checking work and the probability of human error caused by handling large-scale multi-version single operating system nodes. A panoramic view provides a clear global understanding of the status of each software package in the resource pool, greatly reducing the probability of version incompatibility and installation compatibility issues, avoiding the risk of system downtime caused by runtime compatibility problems, reducing the occurrence of related failures, and improving the system's usability, maintainability, compatibility, and stability.
[0142] It should be noted that the software package management method provided in this application embodiment can be executed by a software package management device, or a control module within that software package management device for executing the software package management method. This application embodiment uses the execution of the software package management method by a software package management device as an example to illustrate the software package management method provided in this application embodiment.
[0143] Reference Figure 4 The diagram shows a structural block diagram of a software package management device according to an embodiment of this application.
[0144] like Figure 4 As shown, the software package management device may include the following modules:
[0145] The determination module 401 is used to determine candidate operating system nodes based on the deployment target information of the software package to be installed and the basic configuration information of each operating system node;
[0146] The inspection module 402 is used to perform a compatibility check on the candidate operating system node based on the first compatibility association information of the software package to be installed and the second compatibility association information of the candidate operating system node.
[0147] The upload module 403 is used to upload the software package to be installed to the target software package repository if there are candidate operating system nodes that have passed the compatibility check, and to notify the candidate operating system nodes that have passed the compatibility check to install the software package to be installed based on the target software package repository in batches.
[0148] Optionally, the inspection module 402 includes:
[0149] The first inspection unit is used to perform an installation compatibility check on the candidate operating system node based on the first installation compatibility association information of the software package to be installed and the second installation compatibility association information of the candidate operating system node.
[0150] The second checking unit is used to perform a runtime compatibility check on the candidate operating system node based on the first runtime compatibility association information of the software package to be installed and the second runtime compatibility association information of the candidate operating system node if the candidate operating system node passes the installation compatibility check.
[0151] The determining unit is configured to determine that the candidate operating system node has passed the compatibility check if the candidate operating system node passes the running compatibility check.
[0152] Optionally, the first inspection unit includes:
[0153] The first acquisition subunit is used to acquire the dependent software package information of the software package to be installed as the first installation compatibility association information, and acquire the target software package information corresponding to the candidate operating system node as the second installation compatibility association information;
[0154] The first matching subunit is used to perform a first match between the first installation compatibility association information and the second installation compatibility association information, and if the first match is successful, determine that the candidate operating system node passes the installation compatibility check.
[0155] Optionally, the first acquisition subunit is specifically used for:
[0156] Obtain the first software package information corresponding to the software package repository configured on the candidate operating system node, and use the first software package information as the target software package information;
[0157] or,
[0158] Obtain the first software package information corresponding to the software package repository configured on the candidate operating system node, and the second software package information already installed on the candidate operating system node; use the software package information with the higher version in the first software package information and the second software package information as the target software package information.
[0159] Optionally, the second inspection unit includes:
[0160] The second acquisition subunit is used to acquire at least one of the first instruction information, the first user-mode call information, and the first kernel-mode call information of the software package to be installed, as the first runtime compatibility association information, and to acquire at least one of the second instruction information, the second user-mode call information, and the second kernel-mode call information of the candidate operating system node, as the second runtime compatibility association information.
[0161] The second matching subunit is used to perform a second match between the first runtime compatibility association information and the second runtime compatibility association information, and if the second match is successful, determine that the candidate operating system node passes the runtime compatibility check.
[0162] Optionally, the second acquisition subunit is specifically used for:
[0163] After installing the software package to be installed on the candidate operating system node, at least one of the second instruction information, the second user-mode call information, and the second kernel-mode call information of the candidate operating system node is obtained according to the installation directory.
[0164] or,
[0165] After downloading and decompressing the software package to be installed on the candidate operating system node, at least one of the second instruction information, the second user-mode call information, and the second kernel-mode call information of the candidate operating system node is obtained according to the downloaded and decompressed directory.
[0166] Optionally, the inspection module 402 is specifically used for:
[0167] The candidate operating system nodes are divided into multiple groups, and the candidate operating system nodes in each group are of the same type.
[0168] For each group, any candidate operating system node within the group is selected as the target candidate operating system node. Based on the first compatibility association information of the software package to be installed and the second compatibility association information of the target candidate operating system node, a compatibility check is performed on the target candidate operating system node. If the target candidate operating system node passes the compatibility check, it is determined that all candidate operating system nodes within the group have passed the compatibility check.
[0169] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0170] The software package management device in this application embodiment can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. For example, mobile electronic devices can be mobile phones, tablets, laptops, PDAs, in-vehicle electronic devices, wearable devices, ultra-mobile personal computers (UMPCs), netbooks, or personal digital assistants (PDAs), etc., while non-mobile electronic devices can be servers, network attached storage (NAS), personal computers (PCs), televisions (TVs), ATMs, or self-service machines, etc. This application embodiment does not impose specific limitations.
[0171] The software package management device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system used.
[0172] The software package management device provided in this application embodiment can implement the various processes implemented by the software package management device in any of the above-mentioned method embodiments. To avoid repetition, these processes will not be described again here.
[0173] Optionally, embodiments of this application also provide an electronic device.
[0174] Reference Figure 5 The diagram shows a structural block diagram of an electronic device according to an embodiment of this application.
[0175] like Figure 5As shown, the electronic device 11 includes a processor 111, a memory 112, and a program or instruction 1121 stored in the memory and executable on the processor. When the program or instruction 1121 is executed by the processor 111, it implements the various processes of any of the above-described software package management method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0176] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.
[0177] Optionally, embodiments of this application also provide a readable storage medium.
[0178] Reference Figure 6 The diagram shows a structural block diagram of a readable storage medium according to an embodiment of this application.
[0179] like Figure 6 As shown, a program or instruction 211 is stored on the readable storage medium 21. When the program or instruction 211 is executed by the processor, it implements the various processes of any of the above software package management method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0180] The processor may be the processor in the electronic device described in the above embodiments.
[0181] Optionally, this application embodiment also provides a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the various processes of the above-described package management method embodiments, and achieving the same technical effect, so to avoid repetition, it will not be described again here.
[0182] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0183] The processors mentioned above may include, but are not limited to: Central Processing Unit (CPU), Network Processor (NP), Digital Signal Processor (DSP), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0184] The aforementioned readable storage media include computer-readable storage media, which may include, but are not limited to: read-only memory (ROM), random access memory (RAM), compact disc read-only memory (CD-ROM), electronically erasable programmable read-only memory (EEPROM), hard disk, floppy disk, flash memory, etc.
[0185] The various embodiments in this specification are related to each other and are described in a progressive manner. Each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other.
[0186] It should be noted that all actions involving the acquisition of signals, information, or data in this application are carried out in compliance with the relevant data protection laws and regulations of the locality and with authorization from the owner of the relevant device.
[0187] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0188] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
[0189] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between devices or units, and may be electrical, mechanical, or other forms. The functional units in the various embodiments of this application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0190] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.
[0191] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A software package management method, characterized in that, The method includes: Based on the deployment target information of the software package to be installed and the basic configuration information of each operating system node, candidate operating system nodes are determined; Based on the first compatibility association information of the software package to be installed and the second compatibility association information of the candidate operating system node, a compatibility check is performed on the candidate operating system node; If there are candidate operating system nodes that pass the compatibility check, the software package to be installed is uploaded to the target software package repository, and the candidate operating system nodes that pass the compatibility check are notified in batches to install the software package to be installed based on the target software package repository; The step of performing a compatibility check on the candidate operating system node based on the first compatibility association information of the software package to be installed and the second compatibility association information of the candidate operating system node includes: Obtain the dependent software package information of the software package to be installed as the first installation compatibility association information, and obtain the target software package information corresponding to the candidate operating system node as the second installation compatibility association information; perform a first match between the first installation compatibility association information and the second installation compatibility association information, and if the first match is successful, determine that the candidate operating system node passes the installation compatibility check; If the candidate operating system node passes the installation compatibility check, at least one of the first instruction information, the first user-mode call information, and the first kernel-mode call information of the software package to be installed is obtained as the first runtime compatibility association information. At least one of the second instruction information, the second user-mode call information, and the second kernel-mode call information of the candidate operating system node is obtained as the second runtime compatibility association information. The first runtime compatibility association information and the second runtime compatibility association information are matched for the second time. If the second match is successful, it is determined that the candidate operating system node passes the runtime compatibility check. If the candidate operating system node passes the compatibility check, then the candidate operating system node is determined to have passed the compatibility check.
2. The method according to claim 1, characterized in that, The step of obtaining the target software package information corresponding to the candidate operating system node includes: Obtain the first software package information corresponding to the software package repository configured on the candidate operating system node, and use the first software package information as the target software package information; or, Obtain the first software package information corresponding to the software package repository configured on the candidate operating system node, and the second software package information already installed on the candidate operating system node; use the software package information with the higher version in the first software package information and the second software package information as the target software package information.
3. The method according to claim 1, characterized in that, The step of obtaining at least one of the second instruction information, the second user-mode call information, and the second kernel-mode call information of the candidate operating system node includes: After installing the software package to be installed on the candidate operating system node, at least one of the second instruction information, the second user-mode call information, and the second kernel-mode call information of the candidate operating system node is obtained according to the installation directory. or, After downloading and decompressing the software package to be installed on the candidate operating system node, at least one of the second instruction information, the second user-mode call information, and the second kernel-mode call information of the candidate operating system node is obtained according to the downloaded and decompressed directory.
4. The method according to claim 1, characterized in that, The step of performing a compatibility check on the candidate operating system node based on the first compatibility association information of the software package to be installed and the second compatibility association information of the candidate operating system node includes: The candidate operating system nodes are divided into multiple groups, and the candidate operating system nodes in each group are of the same type. For each group, any candidate operating system node within the group is selected as the target candidate operating system node. Based on the first compatibility association information of the software package to be installed and the second compatibility association information of the target candidate operating system node, a compatibility check is performed on the target candidate operating system node. If the target candidate operating system node passes the compatibility check, it is determined that all candidate operating system nodes within the group have passed the compatibility check.
5. A software package management device, characterized in that, The device includes: The determination module is used to determine candidate operating system nodes based on the deployment target information of the software package to be installed and the basic configuration information of each operating system node; The inspection module is used to perform a compatibility check on the candidate operating system node based on the first compatibility association information of the software package to be installed and the second compatibility association information of the candidate operating system node. The upload module is used to upload the software package to be installed to the target software package repository if there are candidate operating system nodes that have passed the compatibility check, and to notify the candidate operating system nodes that have passed the compatibility check to install the software package to be installed based on the target software package repository in batches; The inspection module includes: The first inspection unit is used to obtain the dependent software package information of the software package to be installed as the first installation compatibility association information, and obtain the target software package information corresponding to the candidate operating system node as the second installation compatibility association information; perform a first match between the first installation compatibility association information and the second installation compatibility association information, and determine that the candidate operating system node passes the installation compatibility check if the first match is successful. The second checking unit is configured to, if the candidate operating system node passes the installation compatibility check, obtain at least one of the first instruction information, the first user-mode call information, and the first kernel-mode call information of the software package to be installed as first runtime compatibility association information; obtain at least one of the second instruction information, the second user-mode call information, and the second kernel-mode call information of the candidate operating system node as second runtime compatibility association information; perform a second match between the first runtime compatibility association information and the second runtime compatibility association information; and determine that the candidate operating system node passes the runtime compatibility check if the second match is successful. The determining unit is configured to determine that the candidate operating system node has passed the compatibility check if the candidate operating system node passes the running compatibility check.
6. An electronic device, characterized in that, The electronic device includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the software package management method as described in any one of claims 1 to 4.
7. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the software package management method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Method and system for improving software compatibility for linux system
CN111736851A
Cross-operating-system service migration method and device and electronic equipment
CN118170431A