A software package management method, device, equipment and medium
By dynamically matching and building target software packages based on hardware environment configuration through a software repository, the problem of high complexity in software package management in heterogeneous environments is solved, and efficient and low-cost software package management and installation are achieved.
Patent Information
- Application Number
- CN202010505645.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-05-29
- Filing Date
- 2020-06-05
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2040-06-05
AI Technical Summary
In heterogeneous computing environments, package management becomes increasingly complex due to the combination of processor architectures and accelerator types, resulting in high management costs and low efficiency.
The software repository receives download requests containing hardware environment configuration and target software package description information, dynamically matches and sends the corresponding target software packages, avoiding the need to pre-provide software packages for different hardware environments, and uses component files for packaging and storage to achieve efficient storage and download.
It reduces the complexity and cost of package management, improves download and installation efficiency, and ensures package accuracy and user experience.
Smart Images

Figure CN113741952B_ABST
Abstract
Description
[0001] This application claims priority to the Chinese Patent Application No. 202010477029.4, filed on May 29, 2020, entitled "A Method for Efficiently Managing and Distributing Software in a Heterogeneous IT Environment", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] The present application relates to the technical field of computer, and in particular, to a software package management method and device, and a computer readable storage medium. BACKGROUND
[0003] With the continuous development of computer technology, a heterogeneous computing environment containing multiple architecture processors (such as x86 architecture processors, arm architecture processors, davinci architecture processors) and / or accelerators (such as graphics processing units (GPUs) and field programmable gate arrays (FPGAs)) is gradually becoming the norm of enterprise information technology (IT) infrastructure deployment and cloud environment deployment.
[0004] In a heterogeneous environment, software package management (such as software package distribution) also becomes more complex with the increase of the combination of processor architectures and accelerator types in the environment. For the same software, a software repository needs to provide software package download links in different hardware environments respectively, so that a client downloads the corresponding software package through the corresponding software package download link. In this way, the complexity of software package management is increased, and the cost of software package management is increased.
[0005] Therefore, there is an urgent need in the industry to provide a software package management method to reduce the complexity of software package management and reduce the cost of software package management. SUMMARY
[0006] The present application provides a software package management method, which solves the problem that software package management in the related art becomes more complex with the increase of the combination of processor architectures and accelerator types in a heterogeneous environment, and the management cost is high. The present application also provides a device, equipment, computer readable storage medium and computer program product corresponding to the above method.
[0007] In a first aspect, the present application provides a software package management method. The method can be executed by a software repository. Specifically, the software repository receives a software package download request, the software package download request including a hardware environment configuration and description information of a target software package, then obtains the target software package matching the hardware environment configuration according to the description information and the hardware environment configuration, and then sends the target software package.
[0008] In the method, the client carries the hardware environment configuration in the software package download request, so that the software warehouse can match the corresponding target software package based on the hardware environment configuration, without providing the target software package for different hardware environment configurations in advance, reducing the complexity and cost of software package management. Moreover, the method can avoid the confusion of the software package download link provided by the software warehouse, or the selection of the software package download link for other hardware environment by the client, resulting in the problem of unavailable downloaded software package, improving the efficiency of software package download and installation, and improving the user experience.
[0009] In some possible implementation ways, the software warehouse can construct the target software package corresponding to the software package download request in real time according to the software package download request. Specifically, the software warehouse obtains the constituent files of the target software package according to the description information and the hardware environment configuration, packs the constituent files, and obtains the target software package.
[0010] In some possible implementation ways, the software warehouse can obtain the constituent files of the target software package by querying the file identifier of the constituent files of the target software package according to the description information and the hardware environment configuration, and obtaining the constituent files of the target software package according to the file identifier.
[0011] In some possible implementation ways, before receiving the software package download request, the software warehouse can also store the constituent files of the target software package, so that the client can provide the software package to the user according to the constituent files when there is a download demand.
[0012] In some possible implementation ways, the software warehouse can store the constituent files of the target software package when the constituent files of the target software package are not stored, thereby avoiding storing repeated constituent files, saving storage space, and realizing efficient storage.
[0013] In some possible implementation ways, the software warehouse can also provide a software package query function. Specifically, the software warehouse receives a software package query request, the software package query request includes the description information of the target software package, then obtains the metadata of the target software package according to the description information, and returns the metadata of the target software package.
[0014] In some possible implementation ways, the software warehouse can also provide a software package deletion function. Specifically, the software warehouse receives a software package deletion request, the software package deletion request includes the description information of the target software package, then obtains the metadata of the target software package according to the description information, and deletes the constituent files of the target software package according to the file identifier of the constituent files in the metadata.
[0015] In some possible implementation manners, the software warehouse can receive a plurality of software package download requests, which are specifically from download operations of clients with different hardware environment configurations on target software packages, and the software warehouse can obtain the target software package matching the hardware environment configuration from the same software warehouse address, specifically, the same uniform resource locator (URL), according to the description information and the hardware environment configuration. In this way, transparency to the client is achieved, and clients with different architectures use a unified software warehouse address and the same command to download and install software packages. The software management complexity is further reduced, and the management cost is reduced.
[0016] In some possible implementation manners, the hardware environment configuration includes an operating system configuration, a processor configuration, and an accelerator configuration. The method is also applicable to new combinations of processor architectures and accelerators, and has good compatibility.
[0017] In some possible implementation manners, the software warehouse can also directly store software packages. Specifically, before receiving the software package download request, the software warehouse can also receive a software package upload request including the target software package, and then store the target software package.
[0018] In some possible implementation manners, when the software warehouse stores the target software package, if there are duplicate blocks in the storage system, the duplicate blocks are removed, so that efficient storage can be achieved.
[0019] In a second aspect, the present application provides a software package management method. The method can be executed by a software warehouse. Specifically, the software warehouse receives a constituent file upload request for requesting to upload constituent files of a target software package, and then stores the constituent files of the target software package.
[0020] In the method, when a client has a software package download demand, the software warehouse can directly construct a software package according to the constituent files, thereby meeting the demand of different hardware environment configuration clients to download software packages in a unified manner.
[0021] In some possible implementation manners, the constituent file upload request includes the constituent files of the target software package. In this way, the number of packaging and unpacking times can be reduced, and the efficiency is improved.
[0022] In some possible implementation manners, the constituent file upload request includes the target software package, based on which the software warehouse can also unpack the target software package to obtain the constituent files of the target software package. Compared with directly storing the target software package, storing the constituent files can reduce the storage of duplicate files, and efficient storage is achieved.
[0023] In a third aspect, the present application provides a software package management apparatus. The apparatus comprises:
[0024] a communication unit configured to receive a software package download request, the software package download request comprising description information of a target software package and a hardware environment configuration;
[0025] a management unit configured to obtain the target software package matching the hardware environment configuration according to the description information and the hardware environment configuration;
[0026] the communication unit is further configured to send the target software package.
[0027] In some possible implementation manners, the management unit comprises:
[0028] a matching sub-unit configured to obtain constituent files of the target software package according to the description information and the hardware environment configuration;
[0029] a construction sub-unit configured to package the constituent files to obtain the target software package.
[0030] In some possible implementation manners, the matching sub-unit is specifically configured to:
[0031] query a file identifier of the constituent files of the target software package according to the description information and the hardware environment configuration;
[0032] obtain the constituent files of the target software package according to the file identifier.
[0033] In some possible implementation manners, the apparatus further comprises:
[0034] a storage unit configured to store the constituent files of the target software package before receiving the software package download request.
[0035] In some possible implementation manners, the apparatus further comprises:
[0036] a storage unit configured to store the constituent files of the target software package when the constituent files of the target software package are not stored.
[0037] In some possible implementation manners, the communication unit is further configured to:
[0038] receive a software package query request, the software package query request comprising the description information of the target software package;
[0039] the management unit is further configured to:
[0040] obtain metadata of the target software package according to the description information;
[0041] The communication unit is further configured to:
[0042] Return the metadata of the target software package.
[0043] In some possible implementation manners, the communication unit is further configured to:
[0044] receive a software package deletion request, the software package deletion request comprising description information of the target software package;
[0045] The management unit is further configured to:
[0046] obtain metadata of the target software package according to the description information;
[0047] delete constituent files of the target software package according to file identifiers of the constituent files in the metadata.
[0048] In some possible implementation manners, the communication unit is specifically configured to:
[0049] receive a plurality of software package download requests, the plurality of software package download requests being from download operations of target software packages by clients in different hardware environment configurations;
[0050] The management unit is specifically configured to:
[0051] obtain, from a same software repository address, the target software package matching the hardware environment configuration according to the description information and the hardware environment configuration.
[0052] In some possible implementation manners, the hardware environment configuration comprises an operating system configuration, a processor configuration, and an accelerator configuration.
[0053] In a fourth aspect, the present application provides a software package management apparatus. The apparatus comprises:
[0054] a communication unit configured to receive a constituent file upload request, the constituent file upload request being used to request uploading of constituent files of a target software package;
[0055] a storage unit configured to store the constituent files of the target software package.
[0056] In some possible implementation manners, the constituent file upload request comprises constituent files of a target software package.
[0057] In some possible implementation manners, the constituent file upload request comprises a target software package.
[0058] The apparatus further comprises:
[0059] an unpacking unit configured to unpack the target software package to obtain the constituent files of the target software package.
[0060] In a fifth aspect, the present application provides a device, which comprises a processor and a memory. The processor and the memory are in communication with each other. The processor is configured to execute instructions stored in the memory, so that the device performs the software package management method according to the first aspect or any implementation manner of the first aspect.
[0061] In a sixth aspect, the present application provides a computer readable storage medium, which stores instructions. The instructions instruct a device to perform the software package management method according to the first aspect or any implementation manner of the first aspect.
[0062] In a seventh aspect, the present application provides a computer program product comprising instructions which, when executed on a device, cause the device to perform the software package management method according to the first aspect or any implementation manner of the first aspect.
[0063] On the basis of the implementation manners of the aspects described above, the present application can be further combined to provide more implementation manners. BRIEF DESCRIPTION OF DRAWINGS
[0064] In order to more clearly illustrate the technical method of the embodiments of the present application, the drawings required to be used in the embodiments will be briefly introduced as follows.
[0065] Figure 1 An application environment schematic diagram of a software package management method provided by the embodiments of the present application;
[0066] Figure 2 A system architecture diagram of a software package management method provided by the embodiments of the present application;
[0067] Figure 3 A system architecture diagram of a software package management method provided by the embodiments of the present application;
[0068] Figure 4 An interaction flowchart of a software package management method provided by the embodiments of the present application;
[0069] Figure 5 A flowchart of downloading a software package provided by the embodiments of the present application;
[0070] Figure 6 A flowchart of a software package management method provided by the embodiments of the present application;
[0071] Figure 7 An interface schematic diagram provided by the embodiments of the present application;
[0072] Figure 8 A structure schematic diagram of a software package management device provided by the embodiments of the present application;
[0073] Figure 9 A structural schematic diagram of a software package management apparatus provided for an embodiment of the present application;
[0074] Figure 10 A structural schematic diagram of a device provided for an embodiment of the present application;
[0075] Figure 11 A structural schematic diagram of a device provided for an embodiment of the present application. DETAILED DESCRIPTION
[0076] The terms “first”, “second” in the embodiments of the present application are only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with “first”, “second” can explicitly or implicitly include one or more of the features.
[0077] First, some technical terms involved in the embodiments of the present application are introduced.
[0078] A software repository, also known as a software repository, is a system for managing and distributing software packages. A software repository manages a large number of software packages that can be downloaded and installed. These software packages can be provided by different software providers or developers. In order to facilitate storage and user query, the software repository can classify software packages in different ways. For example, the software repository can be classified according to operating system, software license type, and even language.
[0079] A heterogeneous environment refers to an information technology (IT) environment composed of computing devices of different architectures and / or different hardware environment configurations produced by different manufacturers. Among them, the computing device can be a personal computer (PC) such as a desktop computer, a notebook computer, a smart phone, etc., or a server.
[0080] These computing devices can adopt different system architectures, such as x86 architecture, Advanced RISC Machines (ARM) architecture, POWER architecture, etc. In some implementations, these computing devices can also be the same system architecture, but there are differences in hardware environment configuration.
[0081] For example, the hardware environment configuration of some computing devices can be x86 central processing unit (CPU) only, i.e., x86 CPU only. The hardware environment configuration of some other computing devices can be x86 CPU and graphical processing unit (GPU), i.e., x86+GPU. The hardware environment configuration of some other computing devices can be ARM CPU only. Of course, the hardware environment configuration of some computing devices can also be ARM CPU and embedded Neural-network Processing Unit (NPU).
[0082] In a heterogeneous environment, the software repository manages (such as distributes) software packages, and the management becomes more complex as the combination of processor architectures and accelerator types in the environment increases. For the same software, the software repository needs to provide software package download links for different hardware environments respectively, so that the client downloads the corresponding software package through the corresponding software package download link. If the software repository provides confused software package download links, or the client selects software package download links for other hardware environments, the downloaded software package will be unavailable. In this way, the complexity of software package management is increased, the cost of software package management is increased, and the download and installation efficiency is affected.
[0083] Therefore, the present application provides a software package management method. The method can be executed by a software repository. Specifically, the software repository receives a software package download request, the software package download request including a hardware environment configuration and description information of a target software package. The software repository can obtain the target software package matching the hardware environment configuration according to the description information and the hardware environment configuration, and then send the target software package.
[0084] In the method, the client carries the hardware environment configuration in the software package download request. In this way, the software repository can match the corresponding target software package based on the hardware environment configuration, without pre-providing target software packages for different hardware environment configurations, reducing the complexity of software package management and the cost of software package management. Moreover, the method can avoid the problem that the software repository provides confused software package download links, or the client selects software package download links for other hardware environments, resulting in an unavailable downloaded software package, improving the efficiency of software package download and installation, and improving the user experience.
[0085] Furthermore, the software repository can receive multiple software package download requests, specifically from clients with different hardware configurations attempting to download the target software package. The software repository can then obtain the target software package matching the hardware configuration from the same software repository address—specifically, the same Uniform Resource Locator (URL)—based on the description information and the hardware environment configuration. This achieves transparency to the client, allowing clients with different architectures to use a unified software repository address and the same commands to download and install software packages. This further reduces software management complexity and costs.
[0086] To make the technical solution of this application clearer and easier to understand, the application scenarios of the software package management method provided in the embodiments of this application are described below with reference to the accompanying drawings.
[0087] See Figure 1 The diagram illustrates an application scenario for the package management method, such as... Figure 1 As shown, this scenario includes a software repository 102 and at least one client 104. For ease of description, Figure 1 The example involves multiple clients. At least one client 104 establishes a communication channel with the software repository 102, thereby downloading software packages from the software repository 102 through this communication channel.
[0088] Specifically, client 104 sends a software package download request to software repository 102. This request includes hardware environment configuration and a description of the target software package. Hardware environment configuration refers to the configuration of the hardware environment on which client 104 resides. In some implementations, hardware environment configuration may include the processor configuration, operating system configuration, and accelerator configuration of the device on which client 104 resides. It should be noted that an accelerator refers to a processor other than the central processing unit (CPU), such as a GPU, NPU, etc. When the device on which client 104 resides does not have an accelerator configured, the accelerator configuration is empty.
[0089] The target software package can be one or more packages provided by software repository 102. The description information specifically refers to information describing the software package, such as the package name, number, or other strings that can uniquely identify the package. In one example, the description information of the target software package could be "message," that is, the software name of the messaging software.
[0090] Correspondingly, after receiving the aforementioned software package download request, software repository 102 obtains the target software package that matches the hardware environment configuration based on the description information and the hardware environment configuration. Then, it sends the target software package to client 104.
[0091] In some implementations, at least two of the plurality of clients 104 have different hardware environment configurations. For example, one client has a hardware environment configuration of x86 CPU only, and another client has a hardware environment configuration of ARM CPU + NPU.
[0092] Correspondingly, the software repository 102 can receive a plurality of software package download requests, which specifically come from the download operations of the target software package by the clients 104 with different hardware environment configurations described above. Then, the software repository 102 can obtain the target software package matching the hardware environment configuration of each client 104 from the same URL according to the description information and the hardware environment configuration, and return to the corresponding client 104.
[0093] As shown in Figure 2 , the software repository 102 can be deployed in a cloud environment, specifically one or more computing devices (for example: a central server) in the cloud environment. The software repository 102 can also be deployed in an edge environment, specifically one or more computing devices (edge computing devices) in the edge environment, which can be servers, computing boxes, etc. The cloud environment indicates a cluster of central computing devices owned by a cloud service provider, which is used to provide computing, storage, and communication resources; the edge environment indicates a cluster of edge computing devices that are geographically close to the end device (i.e., the end-side device), which is used to provide computing, storage, and communication resources.
[0094] The software repository 102 described above can also be deployed on an end device. The end device includes a terminal and other physical machines. The terminal includes but is not limited to a desktop computer, a notebook computer, a tablet computer, or a smartphone. The software repository 102 can also be deployed in a virtual machine or a container on the physical machine. In order to balance the load and ensure reliability, in some implementations, the software repository 102 can also be deployed in the form of multiple copies in a cluster.
[0095] Further, as shown in Figure 3 , the software repository 102 can include multiple parts (for example, including multiple functional modules). Based on this, each part of the software repository 102 can also be distributed and deployed in different environments. For example, one part of the software repository 102 can be deployed in each of the cloud environment, the edge environment, and the end device, or any two of them.
[0096] In some implementations, the software repository 102 can be deployed on a physical machine or a virtual machine or a container in a physical machine when it is deployed in the above-mentioned environments. The embodiments of the present application do not limit this.
[0097] To make the technical solutions of the present application more clear and easy to understand, the software package management method provided by the embodiments of the present application will be introduced from the perspective of the interaction between the software repository 102 and the client 104.
[0098] Referring to Figure 4 the flowchart of the software package management method, the method comprises:
[0099] S402: The client 104 sends a software package download request to the software repository 102.
[0100] The client 104 can be a client dedicated to downloading software, such as a client of a software store. The client 104 can also be a general-purpose client, such as a browser. In some implementations, the client 104 can provide a graphical user interface (GUI). A user can trigger a software package download operation through the GUI, and the client 104 generates a software package download request in response to the software package download operation, and then sends the software package download request to the software repository 102.
[0101] The software package download request comprises a hardware environment configuration and description information of a target software package.
[0102] The hardware environment configuration refers to the hardware environment configuration of the device where the client 104 is located. The hardware environment configuration can include processor configuration, operating system configuration, and accelerator configuration. The processor configuration includes processor architecture, such as x86, ARM, or POWER, etc. The operating system configuration includes operating system type, such as Windows, Linux, etc. In some implementations, the operating system configuration also includes operating system version, such as 7.0, 7.1, 10.0, etc. The operating system can be the operating system of a physical machine, and when the client 104 is deployed on a virtual machine, the operating system can also be the operating system of the virtual machine. The accelerator configuration includes processors for acceleration, such as GPU, NPU, etc. In some examples, the accelerator configuration can be empty, i.e., the device where the client 104 is located can not be configured with an accelerator.
[0103] The target software package is a software package that needs to be downloaded. The target software package is one or more of the software packages provided by the software repository 102. Specifically, a user can select one or more software packages through the above-mentioned GUI to trigger a software package download operation, wherein the selected software package is the target software package.
[0104] The description information of the target software package is used to uniquely identify the target software package, so that the software repository 102 can determine the corresponding target software package according to the description information. Based on this, the description information of the target software package can be the name or code of the target software package, of course, the description information can also be a unique value determined according to one or more of the above name, code, content.
[0105] In some implementations, the client 104 can also be a command line tool. In some examples, the command line tool includes red-hat package manager (RPM), Debian package manager (dpkg), etc. The command line tool can also provide a command user interface (CUI). The user can input a software package download command, such as wget, through the CUI. Correspondingly, the command line tool can generate a software package download request according to the software package download command.
[0106] When the software repository 102 also provides an application programming interface (API) corresponding to the software package, the client 104 can also call the API to generate a software package download request. In this implementation, the client 104 can be the above-mentioned client dedicated to software download, a browser or other client.
[0107] S404: The software repository 102 obtains the target software package matching the hardware environment configuration according to the description information and the hardware environment configuration.
[0108] In some implementations, the software repository 102 can store the constituent files of the software package. Based on this, the software repository 102 obtains the target software package by a dynamic construction manner. Specifically, the software repository 102 can match the constituent files matching the description information and the hardware environment configuration, i.e. the constituent files of the target software package, according to the description information and the hardware environment configuration. Then, the software repository 102 can package the constituent files to obtain the target software package.
[0109] The software warehouse 102 can match the constituent files matching the description information and the hardware environment configuration according to the metadata of the software package. The metadata of the software package includes the description information of the software package, the hardware environment configuration, and the file identifier of the constituent files of the software package. The file identifier of the constituent files is a string capable of uniquely identifying the file. In some implementations, the file identifier of the constituent files can be a hash value of the constituent files. Further, the metadata of the software package can further include other information, such as the version of the software package, the type of the package, and the like.
[0110] For ease of description, specific examples of the metadata are further provided in the present application. As shown in the following table:
[0111] Table 1: Metadata of the software package
[0112]
[0113] The first column in Table 1, i.e., the “name” column, represents the description information of the software package. The third to fifth columns in Table 1, i.e., the “operating system”, “architecture”, and “accelerator” columns, represent the hardware environment configuration. The last column in Table 1, i.e., the “file information” column, represents the file identifier of the constituent files of the software package.
[0114] In some implementations, the software warehouse 102 can maintain a software package metadata warehouse. The software package metadata warehouse is used to store the metadata of each software package, so that the software warehouse 102 performs data matching based on the software package metadata warehouse. Similarly, the software warehouse 102 can also maintain a file warehouse. The file warehouse is used to store the constituent files of each software package, so that the software warehouse 102 obtains the corresponding constituent files from the file warehouse according to the file identifier.
[0115] In some implementations, the software warehouse 102 pre-stores the constituent files of the software package, for example, pre-stores the constituent files of a target software package, so that the client 104 downloads the target software package from the software warehouse 102. Further, the software warehouse 102 can store the constituent files of the target software package when the constituent files of the target software package are not stored. In this way, it is possible to avoid storing duplicate constituent files, save storage space, and achieve efficient storage.
[0116] The software warehouse 102 can also store the file identifier of the constituent files, for example, the hash value of the constituent files. As shown in the following table:
[0117] Table 2: File identifier of the constituent files
[0118] File name 2afc1f626f77237d4345aad25b03b8f2 008c83eeff8573656c84e1929d6247ef 5cf1fa21b1984de8e4905b03434db689
[0119] In this way, the software warehouse 102 can determine whether to store the to-be-stored constituent file by comparing the file identifier of the to-be-stored constituent file with the file identifier of the stored constituent file. If the file identifier of the to-be-stored constituent file is the same as the file identifier of the stored constituent file, the storage operation is abandoned. If the file identifier of the to-be-stored constituent file is different from the file identifier of the stored constituent file, the storage operation is performed.
[0120] S406: The software warehouse 102 sends the target software package to the client 104.
[0121] The software warehouse 102 sends the target software package to the client 104, so that the client 104 installs the target software package.
[0122] In some implementations, as shown in Figure 5 The software warehouse 102 can receive a plurality of software package download requests. The plurality of software package download requests can come from the download operations of the clients 104 with different hardware environment configurations on the target software package. The software warehouse 102 provides a GUI, and the clients display a software package download page, for example, a software package download page with the software package name amand, in which the clients 104 with different hardware environment configurations can download the target software package matching the hardware environment configuration through the same download address, for example, the same URL.
[0123] The specific download process is that the clients 104 with different hardware environment configurations respectively send software package download requests to the software warehouse 102, and the software warehouse 102 obtains the target software package matching each hardware environment configuration from the same software warehouse address (for example, the above-mentioned URL) according to the description information and the hardware environment configuration in each software package download request. Then, the software warehouse 102 returns the corresponding target software package to the clients 104 with different hardware environment configurations respectively.
[0124] Based on this, the software package difference caused by the processor configuration, the operating system configuration, and the accelerator configuration is transparent to the user, the user can use a unified software package name to download and install the target software package, which simplifies the software package download and installation process, reduces the software package management difficulty, and reduces the software package management cost.
[0125] The above describes the software package management method provided by the embodiments of the present application from the software package download level. Next, the software package management method provided by the embodiments of the present application will be described from the software package upload level. The embodiments are exemplarily described by the upload of the target software package, and the upload of other software packages can refer to the embodiments.
[0126] Referring to the flowchart of the software package management method shown in Figure 6 as shown inFigure 6 As shown, the method comprises:
[0127] S602: The software warehouse 102 receives a constituent file upload request.
[0128] The target software package comprises at least one constituent file, and the constituent file upload request is used to request uploading the constituent files of the target software package. As shown in Table 2, the target software package nginx comprises two constituent files with hash values of hash1 and hash2, and the target software package Tomcat comprises a constituent file with a hash value of hash1.
[0129] In some implementations, the constituent file upload request comprises the constituent files of the target software package. Specifically, the client 104 directly carries the constituent files of the target software package in the constituent file upload request, and then uploads the constituent file upload request, so as to upload the constituent files of the target software package. Wherein, the client 104 can directly upload the constituent files to the software warehouse 102 without packing the constituent files of the target software package when developing the target software package, for example, when developing development operations (DevOps), so as to reduce the packing and unpacking times of the target software package, improve the uploading efficiency, and reduce the additional workload.
[0130] In other implementations, the constituent file upload request comprises the target software package. Specifically, the client 104 carries the target software package in the constituent file upload request, and the target software package can be unpacked into the constituent files of the target software package, so as to upload the constituent files of the target software package.
[0131] S604: The software warehouse 102 stores the constituent files of the target software package.
[0132] The software warehouse 102 stores the constituent files of the target software package, so as to dynamically construct the target software package according to the pre-stored constituent files of the target software package when receiving a software package download request. Wherein, when the constituent file upload request received by the software warehouse 102 comprises the target software package, the software warehouse 102 unpacks the target software package to obtain the constituent files of the target software package, and then stores the constituent files of the target software package.
[0133] In some implementations, the software warehouse can first detect whether the local exists the constituent files, if not, store the constituent files of the target software package, if yes, give up storing the constituent files, so as to avoid the repeated constituent files occupying the storage space, thereby realizing efficient storage.
[0134] It should be noted that the client 104 performing the software package uploading operation and the client 104 performing the software package downloading operation can be the same client or different clients. For ease of description, the client 104 performing the software package downloading operation can be referred to as a first client, and the client 104 performing the software package uploading operation can be referred to as a second client. Similarly, the GUI presented by the first client can be referred to as a first GUI, and the GUI presented by the second client can be referred to as a second GUI.
[0135] Figure 7 A schematic diagram of the second GUI is provided, as shown in Figure 7 The second GUI is provided with a software package uploading component, which includes a name editing control and a path editing control. The name editing control is used to edit the name of the target software package to be uploaded, and the path editing control is used to edit the path of the constituent file of the target software package to be uploaded.
[0136] In some implementations, the second GUI is further provided with a storage mode configuration control. As shown in Figure 7 The storage mode configuration control can be a selection control. When the selection control is selected, the constituent file uploading request sent by the second client further carries a storage mode, specifically, an efficient storage mode, thereby instructing the software warehouse 102 to first detect whether the constituent file has been stored when storing the constituent file, and if so, to give up storing, and if not, to perform storing. When the selection control is not selected, the constituent file uploading request further carries a storage mode, specifically, a normal storage mode, or does not carry a storage mode. In this way, the software warehouse 102 can directly store the constituent file according to the constituent file uploading request.
[0137] Based on the embodiments shown in Figure 4 , Figure 6 The software warehouse 102 can also provide a query function and / or a deletion function for the software package. The client 104 performing the software package query operation and the client 104 performing the software package downloading operation can be the same client or different clients. The client 104 performing the software package deletion operation and the client 104 performing the software package uploading operation can be the same client or different clients. The embodiment takes the client 104 performing the software query operation as a third client and the client 104 performing the software deletion operation as a fourth client for example.
[0138] In some embodiments, the third client can send a software package query request to the software warehouse 102, the software package query request comprising description information of the target software package, for example, comprising a name of the target software package and the like, and then the software warehouse 102 obtains metadata of the target software package according to the description information and returns the metadata of the target software package to the third client. Specifically, the software warehouse 102 can obtain metadata matching the description information by querying a metadata warehouse of the software package, and the metadata is the metadata of the target software package.
[0139] In some embodiments, the fourth client can send a software package deletion request to the software warehouse 102, the software package deletion request comprising description information of the target software package, for example, comprising a name of the target software package and the like, and then the software warehouse 102 obtains metadata of the target software package according to the description information, the metadata comprising file identifiers of constituent files of the target software package, for example, hash values of the constituent files of the target software package. The software warehouse 102 can delete the constituent files according to the file identifiers of the constituent files. Further, in order to completely delete the software package, the software warehouse 102 can also delete the file identifiers of the constituent files of the target software package.
[0140] In some embodiments, the software warehouse 102 can also directly store software packages, so that when the software warehouse 102 receives a software package download request, the software warehouse 102 can directly obtain a target software package matching the hardware environment configuration according to the hardware environment configuration and the description information of the target software package, without the need to dynamically construct the target software package, thereby improving the software uploading and downloading efficiency.
[0141] Correspondingly, the software package uploading process specifically comprises that the software warehouse 102 receives a software package uploading request, the software package uploading request comprising a target software package, and then the software warehouse 102 stores the target software package. Since software packages of different hardware environment configurations can comprise the same constituent files, in order to improve the storage efficiency, the software warehouse 102 can utilize the deduplication function of the storage system when storing the target software package. Specifically, when there are duplicate blocks in the target software package in the storage system, the software warehouse 102 can also remove the duplicate blocks, thereby alleviating the problem of being unable to remove duplicate files in each software package and improving the storage efficiency.
[0142] The above is described in combination with Figures 1 to 7 The software package management method provided by the embodiments of the present application is described in detail, and the device and equipment provided by the embodiments of the present application will be introduced below in combination with the drawings.
[0143] Referring to Figure 8 The structure diagram of the software package management device is shown in FIG. 8, the device 800 comprises:
[0144] The communication unit 802 is configured to receive a software package download request, the software package download request comprising description information of a hardware environment configuration and a target software package;
[0145] The management unit 804 is configured to obtain the target software package matching the hardware environment configuration according to the description information and the hardware environment configuration;
[0146] The communication unit 802 is further configured to send the target software package.
[0147] In some possible implementation manners, the management unit 804 comprises:
[0148] The matching sub-unit 8042 is configured to obtain constituent files of the target software package according to the description information and the hardware environment configuration;
[0149] The construction sub-unit 8044 is configured to package the constituent files to obtain the target software package.
[0150] In some possible implementation manners, the matching sub-unit 8042 is specifically configured to:
[0151] query file identification of the constituent files of the target software package according to the description information and the hardware environment configuration;
[0152] obtain the constituent files of the target software package according to the file identification.
[0153] In some possible implementation manners, the apparatus 800 further comprises:
[0154] The storage unit 806 is configured to store the constituent files of the target software package before receiving the software package download request.
[0155] In some possible implementation manners, the apparatus further comprises:
[0156] The storage unit 806 is configured to store the constituent files of the target software package when the constituent files of the target software package are not stored.
[0157] In some possible implementation manners, the communication unit 802 is further configured to:
[0158] receive a software package query request, the software package query request comprising description information of the target software package;
[0159] The management unit 804 is further configured to:
[0160] obtain metadata of the target software package according to the description information;
[0161] The communication unit 802 is further configured to:
[0162] obtaining metadata of the target software package according to the description information.
[0163] In some possible implementation, the communication unit 802 is further configured to:
[0164] receive a software package deletion request, the software package deletion request comprising description information of the target software package;
[0165] The management unit 804 is further configured to:
[0166] obtain metadata of the target software package according to the description information;
[0167] delete constituent files of the target software package according to file identifiers of the constituent files in the metadata.
[0168] In some possible implementation, the communication unit 802 is specifically configured to:
[0169] receive a plurality of software package download requests, the plurality of software package download requests being from download operations of target software packages by clients in different hardware environment configurations;
[0170] The management unit 804 is specifically configured to:
[0171] obtain, from the same software repository address, the target software package matching the hardware environment configuration according to the description information and the hardware environment configuration.
[0172] In some possible implementation, the hardware environment configuration comprises an operating system configuration, a processor configuration and an accelerator configuration.
[0173] The software package management apparatus 800 according to the embodiments of the present application can correspond to performing the methods described in the embodiments of the present application, and the above and other operations and / or functions of each module / unit of the software package management apparatus 800 are respectively for realizing the corresponding procedures of each method in the embodiments of the present application, which will not be described herein again for brevity. Figure 4 The above and other operations and / or functions of each module / unit of the software package management apparatus 900 are respectively for realizing the corresponding procedures of each method in the embodiments of the present application, which will not be described herein again for brevity.
[0174] The embodiments of the present application further provide a software package management apparatus. Referring to Figure 8 The structure schematic diagram of the software package management apparatus is shown in FIG. 9, the apparatus 900 comprises:
[0175] A communication unit 902, configured to receive a constituent file upload request, the constituent file upload request being used for requesting to upload constituent files of a target software package;
[0176] A storage unit 904, configured to store the constituent files of the target software package.
[0177] In some possible implementation manners, the constituent file upload request comprises a constituent file of the target software package.
[0178] In some possible implementation manners, the constituent file upload request comprises a target software package;
[0179] The apparatus 900 further includes:
[0180] The unpacking unit 906 is configured to unpack the target software package to obtain a constituent file of the target software package.
[0181] The software package management apparatus 900 according to the embodiments of the present application can correspond to performing the methods described in the embodiments of the present application, and the above and other operations and / or functions of each module / unit of the software package management apparatus 900 are respectively for realizing the corresponding flow of each method in the embodiments of the present application. For brevity, they will not be described here again. Figure 6 The above and other operations and / or functions of each module / unit of the software package management apparatus 900 are respectively for realizing the corresponding flow of each method in the embodiments of the present application. For brevity, they will not be described here again.
[0182] The embodiments of the present application also provide a device. The device can also be a computer cluster in a cloud environment or an edge environment, and can also be a terminal device such as a desktop computer. The device is used to implement the functions of the software package management apparatus 800 in the embodiments of the present application. Figure 8 The embodiments of the present application also provide a device. The device can also be a computer cluster in a cloud environment or an edge environment, and can also be a terminal device such as a desktop computer. The device is used to implement the functions of the software package management apparatus 800 in the embodiments of the present application.
[0183] Figure 10 A structural schematic diagram of a device 1000 is provided, as shown in the figure, the device 1000 includes a bus 1001, a processor 1002, a communication interface 1003 and a memory 1004. The processor 1002, the memory 1004 and the communication interface 1003 communicate through the bus 1001. Figure 10
[0184] The bus 1001 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 10 only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.
[0185] The processor 1002 can be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP), etc.
[0186] The communication interface 1003 is used for communication with external systems. For example, the communication interface 1003 can receive software package download requests, send target software packages, and so on.
[0187] The memory 1004 may include volatile memory, such as random access memory (RAM). The memory 1004 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0188] The memory 1004 stores executable code, and the processor 1002 executes the executable code to perform the aforementioned software package management method.
[0189] Specifically, in achieving Figure 8 In the case of the illustrated embodiment, and Figure 8 When each unit of the package management device 800 described in the embodiment is implemented by software, it executes... Figure 8 The software or program code required for the functions of the management unit 804 is stored in the memory 1004.
[0190] The communication unit 802 functions through the communication interface 1003. The communication interface 1003 receives a software package download request, which includes hardware environment configuration and a description of the target software package. The communication interface 1003 then transmits this request to the processor 1002 via the bus 1001. The processor 1002 executes the program code corresponding to each unit stored in the memory 1004, such as the program code corresponding to the management unit 804, to perform the step of obtaining a target software package matching the hardware environment based on the hardware environment configuration and the description of the target software package. The communication interface 1003 then sends the target software package, such as to the client, thereby completing the software package download.
[0191] This application also provides another device. This device is used to implement, as described above. Figure 9 The embodiment illustrates the function of the software package management device 900.
[0192] Figure 11 A structural schematic diagram of another device 1100 is provided, such as Figure 11As shown, the device 1100 includes a bus 1101, a processor 1102, a communication interface 1103 and a memory 1104. The processor 1102, the memory 1104 and the communication interface 1103 communicate through the bus 1101.
[0193] The communication interface 1103 is used for communication with the outside. For example, the communication interface 1103 can receive a file upload request and the like. The memory 1104 stores executable code, and the processor 1102 executes the executable code to perform the aforementioned software package management method.
[0194] Specifically, in the case of implementing the embodiment, and Figure 9 As shown in the embodiment, and Figure 9 In the case of implementing the software package management device 900 described in the embodiment by software, the software or program code required for the function of the unpacking unit 906 in the software package management device 900 is stored in the memory 1104. Figure 9
[0195] The function of the communication unit 902 is implemented by the communication interface 1103. The communication interface 1103 receives a file upload request, and then the communication interface 1103 transmits it to the processor 1102 through the bus 1101. The processor 1102 executes the program code corresponding to each unit stored in the memory 1104, and stores the constituent files of the target software package.
[0196] Further, when the constituent file upload request carries the target software package, the processor 1102 executes the program code corresponding to the unpacking unit 906 to perform the step of unpacking the target software package to obtain the constituent files of the target software package, and then store the constituent files of the target software package to complete the upload of the target software package.
[0197] The embodiment of the present application also provides a computer readable storage medium, which includes instructions, and the instructions instruct a computer to execute the software package management method applied to the software package management device 800 or the software package management device 900.
[0198] The embodiment of the present application also provides a computer readable storage medium, which includes instructions, and the instructions instruct a computer to execute the software package management method applied to the software package management device 800 or the software package management device 900.
[0199] The embodiment of the present application also provides a computer program product, which is executed by a computer, and the computer executes any of the aforementioned software package management methods. The computer program product can be a software installation package, and in the case of needing to use any of the aforementioned software package management methods, the computer program product can be downloaded and executed on the computer.
Claims
1. A software package management method characterized by comprising: The method comprises: receiving a constituent file upload request, the constituent file upload request comprising a target software package; unpacking the target software package to obtain at least one constituent file corresponding to the target software package, the constituent file having a file identifier for uniquely identifying the constituent file; determining that the constituent file is not stored based on the file identifier, and storing the constituent file; or, determining that the constituent file is stored based on the file identifier, and abandoning to store the constituent file; receiving a software package download request, the software package download request comprising a hardware environment configuration and description information of the target software package, the hardware environment configuration comprising an operating system configuration, a processor configuration, and an accelerator configuration, the operating system configuration comprising an operating system type and an operating system version; obtaining the target software package matching the hardware environment configuration according to the description information and the hardware environment configuration, comprising: determining metadata of the target software package from a software package metadata warehouse according to the description information and the hardware environment configuration, matching constituent files matching the description information and the hardware environment configuration in a file warehouse through the metadata of the target software package, the metadata of the software package comprising description information of the target software package, the hardware environment configuration of the target software package, and file identifiers of constituent files of the target software package; and packaging the constituent files to obtain the target software package; sending the target software package; receiving a plurality of software package download requests, the plurality of software package download requests being from download operations of target software packages by clients of different hardware environment configurations; obtaining target software packages matching the hardware environment configuration corresponding to each software package download request from the same software warehouse address according to the description information and the hardware environment configuration corresponding to each software package download request in the plurality of software package download requests, the same software warehouse address being a same uniform resource locator (URL); sending target software packages corresponding to software package download requests of clients from different hardware environment configurations to the clients.
2. The method of claim 1, wherein, The method comprises: querying file identifiers of constituent files of the target software package according to the description information and the hardware environment configuration; obtaining the constituent files of the target software package according to the file identifiers.
3. The method according to any one of claims 1 to 2, characterized in that, The method further comprises: receiving a software package query request, the software package query request comprising description information of the target software package; obtaining metadata of the target software package according to the description information; returning the metadata of the target software package.
4. The method according to any one of claims 1 to 2, characterized in that, The method further comprises: receiving a software package deletion request, the software package deletion request comprising description information of the target software package; obtaining metadata of the target software package according to the description information; deleting constituent files of the target software package according to file identifiers of the constituent files in the metadata.
5. A software package management method characterized by, The method comprises: receiving a constituent file upload request, the constituent file upload request being used for requesting to upload constituent files of a target software package; wherein the constituent files of the target software package comprise file identifiers and storage modes, the file identifiers being used for uniquely identifying the constituent files; In the high-efficiency storage mode, based on the file identifier, it is determined that the constituent file of the target software package is not stored, the constituent file of the target software package is stored in a file warehouse, and the metadata of the target software package is stored in a software package metadata warehouse. In the normal storage mode, the constituent file of the target software package is stored in the file warehouse, and the metadata of the target software package is stored in the software package metadata warehouse. The metadata of the target software package includes description information of the target software package, a hardware environment configuration of the target software package, and a file identifier of the constituent file of the target software package, and the hardware environment configuration includes an operating system configuration, a processor configuration, and an accelerator configuration, and the operating system configuration includes an operating system type and an operating system version.
6. The method of claim 5, wherein, The constituent file upload request includes the constituent file of the target software package.
7. The method of claim 5, wherein, The constituent file upload request includes the target software package. The method further includes: unpacking the target software package to obtain the constituent file of the target software package.
8. A software package management apparatus characterized by comprising: The apparatus includes: a communication unit that receives a constituent file upload request, the constituent file upload request including a target software package; a storage unit that unpacks the target software package to obtain at least one constituent file corresponding to the target software package, the constituent file having a file identifier that uniquely identifies the constituent file, determines whether the constituent file is stored based on the file identifier, stores the constituent file if the constituent file is determined not to be stored, or discards storing the constituent file if the constituent file is determined to be stored; a communication unit that receives a software package download request, the software package download request including a hardware environment configuration and description information of the target software package, the hardware environment configuration including an operating system configuration, a processor configuration, and an accelerator configuration, the operating system configuration including an operating system type and an operating system version; a management unit that obtains the target software package matching the hardware environment configuration according to the description information and the hardware environment configuration; The management unit is specifically configured to determine the metadata of the target software package from a software package metadata warehouse according to the description information and the hardware environment configuration, match the constituent file matching the description information and the hardware environment configuration in the file warehouse through the metadata of the target software package, the metadata of the software package including the description information of the target software package, the hardware environment configuration of the target software package, and the file identifier of the constituent file of the target software package, and package the constituent file to obtain the target software package. The communication unit is further configured to send the target software package. The communication unit is specifically configured to receive a plurality of software package download requests, the plurality of software package download requests being from different hardware environment configurations of clients for downloading the target software package. The management unit is further configured to: obtain, from a same software repository address, a target software package matching a hardware environment configuration corresponding to each software package download request according to the description information and the hardware environment configuration corresponding to each software package download request in the plurality of software package download requests, the same software repository address being a same uniform resource locator (URL); The communication unit is further configured to send the target software package corresponding to the software package download request of the client to the client from different hardware environment configurations.
9. The apparatus of claim 8, wherein, The management unit comprises a matching sub-unit, which is specifically configured to: query file identifiers of constituent files of the target software package according to the description information and the hardware environment configuration; obtain the constituent files of the target software package according to the file identifiers.
10. The apparatus of any one of claims 8 to 9, wherein, The communication unit is further configured to: receive a software package query request, the software package query request comprising the description information of the target software package; The management unit is further configured to: obtain metadata of the target software package according to the description information; The communication unit is further configured to: return the metadata of the target software package.
11. The apparatus of any one of claims 8 to 9, wherein, The communication unit is further configured to: receive a software package deletion request, the software package deletion request comprising the description information of the target software package; The management unit is further configured to: obtain metadata of the target software package according to the description information; delete constituent files of the target software package according to file identifiers of the constituent files in the metadata.
12. A software package management apparatus characterized by comprising: The apparatus comprises: a communication unit configured to receive a constituent file upload request, the constituent file upload request being used to request to upload constituent files of a target software package; wherein the constituent files of the target software package comprise file identifiers and storage modes, and the file identifiers are used to uniquely identify the constituent files; a storage unit configured to, when the storage mode is an efficient storage mode, determine that the constituent files of the target software package are not stored based on the file identifiers, store the constituent files of the target software package in a file repository, and store metadata of the target software package in a software package metadata repository; the storage unit is configured to, when the storage mode is a normal storage mode, store the constituent files of the target software package in the file repository, and store the metadata of the target software package in the software package metadata repository; wherein the metadata of the target software package comprises description information of the target software package, a hardware environment configuration of the target software package, and file identifiers of the constituent files of the target software package, and the hardware environment configuration comprises an operating system configuration, a processor configuration, and an accelerator configuration, and the operating system configuration comprises an operating system type and an operating system version.
13. The apparatus of claim 12, wherein, The constituent file upload request comprises the constituent files of the target software package.
14. The apparatus of claim 12, wherein, The constituent file upload request comprises the target software package. The apparatus further comprises: an unpacking unit configured to unpack the target software package to obtain the constituent files of the target software package.
15. An apparatus, comprising: The device comprises a processor and a memory; The processor is configured to execute instructions stored in the memory, so that the device performs the method in any one of claims 1 to 7.
16. A computer-readable storage medium, characterized in that, including instructions to instruct a device to perform the method of any of claims 1 to 7. including instructions to instruct a device to perform the method of any of claims 1 to 7.
Citation Information
Patent Citations
Method and device for installing and upgrading software
CN103984564A
Software packaging method and device, computer equipment and storage medium
CN111104158A