Software package management method, device, equipment and medium

文档序号:1921175 发布日期:2021-12-03 浏览:10次 中文

阅读说明:本技术 一种软件包管理方法、装置、设备及介质 (Software package management method, device, equipment and medium ) 是由 李光成 陈曦 于 2020-06-05 设计创作,主要内容包括:本申请提供了一种软件包管理方法,包括:接收软件包下载请求,该软件包下载请求包括硬件环境配置和目标软件包的描述信息,根据描述信息和硬件环境配置,获得与硬件环境配置匹配的目标软件包,然后发送目标软件包。由于无需预先提供针对不同硬件环境配置的目标软件包,降低了软件包管理的复杂度,降低了软件包管理成本。(The application provides a software package management method, which comprises the following steps: receiving a software package downloading request, wherein the software package downloading request comprises hardware environment configuration and description information of a target software package, obtaining the target software package matched with the hardware environment configuration according to the description information and the hardware environment configuration, and then sending the target software package. Because the target software packages configured aiming at different hardware environments do not need to be provided in advance, the complexity of software package management is reduced, and the software package management cost is reduced.)

1. A method for software package management, the method comprising:

receiving a software package downloading request, wherein the software package downloading request comprises hardware environment configuration and description information of a target software package;

obtaining the target software package matched with the hardware environment configuration according to the description information and the hardware environment configuration;

and sending the target software package.

2. The method according to claim 1, wherein obtaining the target software package matching the hardware environment configuration according to the description information and the hardware environment configuration comprises:

obtaining a construction file of the target software package according to the description information and the hardware environment configuration;

and packaging the composition file to obtain the target software package.

3. The method of claim 2, wherein the method comprises:

inquiring file identification of a constituting file of the target software package according to the description information and the hardware environment configuration;

and obtaining the constituent file of the target software package according to the file identifier.

4. A method according to claim 2 or 3, wherein prior to receiving a software package download request, the method further comprises:

and storing the composition file of the target software package.

5. A method according to claim 2 or 3, characterized in that the method further comprises:

and when the composition file of the target software package is not stored, storing the composition file of the target software package.

6. The method according to any one of claims 1 to 5, further comprising:

receiving a software package query request, wherein the software package query request comprises the description information of the target software package;

obtaining metadata of the target software package according to the description information;

and returning the metadata of the target software package.

7. The method according to any one of claims 1 to 6, further comprising:

receiving a software package deleting request, wherein the software package deleting request comprises the description information of the target software package;

obtaining metadata of the target software package according to the description information;

and deleting the constituting file according to the file identifier of the constituting file of the target software package in the metadata.

8. The method according to any one of claims 1 to 7, characterized in that it comprises:

receiving a plurality of software package downloading requests, wherein the software package downloading requests come from clients with different hardware environment configurations to download target software packages;

and obtaining the target software package matched with the hardware environment configuration from the same software warehouse address according to the description information and the hardware environment configuration.

9. The method of any of claims 1 to 8, wherein the hardware environment configuration comprises an operating system configuration, a processor configuration, and an accelerator configuration.

10. A method for software package management, the method comprising:

receiving a constitution file uploading request, wherein the constitution file uploading request is used for requesting to upload a constitution file of a target software package;

and storing the composition file of the target software package.

11. The method of claim 10, wherein the constituent file upload request comprises a constituent file of the target software package.

12. The method of claim 10, wherein the constituent file upload request comprises a target software package;

the method further comprises the following steps:

and unpacking the target software package to obtain a construction file of the target software package.

13. A software package management apparatus, characterized in that the apparatus comprises:

the software package downloading method comprises a communication unit, a processing unit and a processing unit, wherein the communication unit is used for receiving a software package downloading request, and the software package downloading request comprises hardware environment configuration and description information of a target software package;

the management unit is used for obtaining the target software package matched with the hardware environment configuration according to the description information and the hardware environment configuration;

the communication unit is further configured to send the target software package.

14. The apparatus of claim 13, wherein the management unit comprises:

the matching subunit is used for obtaining a construction file of the target software package according to the description information and the hardware environment configuration;

and the construction subunit is used for packaging the construction files to obtain the target software package.

15. The apparatus according to claim 14, wherein the matching subunit is specifically configured to:

inquiring file identification of a constituting file of the target software package according to the description information and the hardware environment configuration;

and obtaining the constituent file of the target software package according to the file identifier.

16. The apparatus of claim 14 or 15, further comprising:

and the storage unit is used for storing the composition file of the target software package before receiving the software package downloading request.

17. The apparatus of claim 14 or 15, further comprising:

and the storage unit is used for storing the constituent files of the target software package when the constituent files of the target software package are not stored.

18. The apparatus according to any of claims 13 to 17, wherein the communication unit is further configured to:

receiving a software package query request, wherein the software package query request comprises the description information of the target software package;

the management unit is further configured to:

obtaining metadata of the target software package according to the description information;

the communication unit is further configured to:

and returning the metadata of the target software package.

19. The apparatus according to any of claims 13 to 18, wherein the communication unit is further configured to:

receiving a software package deleting request, wherein the software package deleting request comprises the description information of the target software package;

the management unit is further configured to:

obtaining metadata of the target software package according to the description information;

and deleting the constituting file according to the file identifier of the constituting file of the target software package in the metadata.

20. The apparatus according to any one of claims 13 to 19, wherein the communication unit is specifically configured to:

receiving a plurality of software package downloading requests, wherein the software package downloading requests come from clients with different hardware environment configurations to download target software packages;

the management unit is specifically configured to:

and obtaining the target software package matched with the hardware environment configuration from the same software warehouse address according to the description information and the hardware environment configuration.

21. The apparatus of any of claims 13 to 20, wherein the hardware environment configuration comprises an operating system configuration, a processor configuration, and an accelerator configuration.

22. A software package management apparatus, characterized in that the apparatus comprises:

the communication unit is used for receiving a composition file uploading request which is used for requesting to upload a composition file of a target software package;

and the storage unit is used for storing the composition files of the target software package.

23. The apparatus of claim 22, wherein the constituent file upload request comprises a constituent file of the target software package.

24. The apparatus of claim 22, wherein the constituent file upload request comprises a target software package;

the device further comprises:

and the unpacking unit is used for unpacking the target software package to obtain a construction file of the target software package.

25. An apparatus, comprising a processor and a memory;

the processor is to execute instructions stored in the memory to cause the device to perform the method of any of claims 1 to 12.

26. A computer-readable storage medium comprising instructions that direct a device to perform the method of any of claims 1-12.

Technical Field

The present application relates to the field of computer technologies, and in particular, to a software package management method, an apparatus, and a computer-readable storage medium.

Background

With the continuous development of computer technology, heterogeneous computing environments containing various architecture processors (such as x86 architecture processor, arm architecture processor, da vinci architecture processor) and/or accelerators (such as Graphics Processing Unit (GPU), Field Programmable Gate Array (FPGA)) are becoming the normal state of enterprise Information Technology (IT) infrastructure deployment and cloud environment deployment.

In heterogeneous environments, software package management (e.g., software package distribution) also becomes more complex as the combination of processor architectures and accelerator types in the environment increases. Aiming at the same software, the software warehouse needs to provide software package downloading links under different hardware environments respectively so that the client can download the corresponding software package through the corresponding software package downloading link. Therefore, the complexity of software package management is increased, and the software package management cost is increased.

Accordingly, there is a need to provide a method for managing software packages to reduce the complexity of software package management and reduce the cost of software package management.

Disclosure of Invention

The application provides a software package management method, which solves the problems that software package management becomes more complex and the management cost is higher along with the increase of combinations of processor architectures and accelerator types in heterogeneous environments in the related art. The application also provides a device, equipment, a computer readable storage medium and a computer program product corresponding to the method.

In a first aspect, the present application provides a software package management method. The method may be performed by a software repository. Specifically, the software warehouse receives a software package downloading request, wherein the software package downloading request comprises hardware environment configuration and description information of a target software package, then obtains the target software package matched with the hardware environment configuration according to the description information and the hardware environment configuration, and then sends the target software package.

In the method, the client carries the hardware environment configuration in the software package downloading request, so that the software warehouse can match out the corresponding target software package based on the hardware environment configuration without providing the target software package aiming at different hardware environment configurations in advance, thereby reducing the complexity of software package management and reducing the software package management cost. In addition, the method can avoid the problem that the downloaded software package is unavailable due to confusion of the software package download link provided by the software warehouse or selection of the software package download link under other hardware environments by the client, thereby improving the efficiency of downloading and installing the software package and improving the user experience.

In some possible implementations, the software warehouse may construct, in real time, a target software package corresponding to the software package download request 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, and packages the constituent files to obtain the target software package.

In some possible implementations, the software repository may obtain the constituent files of the target software package by: and inquiring the file identification of the constituting file of the target software package according to the description information and the hardware environment configuration, and acquiring the constituting file of the target software package according to the file identification.

In some possible implementations, before receiving the software package download request, the software warehouse may further store a configuration file of the target software package, so that the client can construct the software package according to the configuration file and provide the software package to the user when the client has a download demand.

In some possible implementation manners, the software warehouse may store the constituent files of the target software package when the constituent files of the target software package are not stored, so as to avoid storing repeated constituent files, save storage space, and implement efficient storage.

In some possible implementations, the software repository may also provide software package querying functionality. Specifically, the software warehouse receives a software package query request, the software package query request comprises description information of the target software package, then obtains metadata of the target software package according to the description information, and then returns the metadata of the target software package.

In some possible implementations, the software repository may also provide software package deletion functionality. Specifically, the software warehouse receives a software package deleting request, the software package deleting request comprises description information of the target software package, then metadata of the target software package is obtained according to the description information, and then the constituting files are deleted according to file identifiers of the constituting files of the target software package in the metadata.

In some possible implementations, the software repository may receive a plurality of software package download requests, where the plurality of software package download requests are specifically from clients with different hardware environment configurations to download a target software package, and the software repository may obtain the target software package matching the hardware environment configuration from a same software repository address, specifically, a same Uniform Resource Locator (URL), according to the description information and the hardware environment configuration. Therefore, the method is transparent to the client, and the client with different architectures downloads and installs the software package by using the uniform software warehouse address and the same command. The software management complexity is further reduced, and the management cost is reduced.

In some possible implementations, the hardware environment configuration includes an operating system configuration, a processor configuration, and an accelerator configuration. The method can also be applied to the combination of a new processor architecture and an accelerator, and has better compatibility.

In some possible implementations, the software repository may also store the software package directly. Specifically, before receiving a software package download request, the software warehouse may further receive a software package upload request including the target software package, and then store the target software package.

In some possible implementation manners, when the software warehouse stores the target software package, if the target software package has the duplicate blocks in the storage system, the duplicate blocks are removed, so that efficient storage can be realized.

In a second aspect, the present application provides a software package management method. The method may be performed by a software repository. Specifically, the software warehouse receives a configuration file uploading request for requesting to upload a configuration file of a target software package, and then stores the configuration file of the target software package.

In the method, when the client has the software package downloading requirement, the software warehouse can directly and dynamically construct the software package according to the composition file, and the requirement that the client is configured in different hardware environments to download the software package in a uniform mode is met.

In some possible implementations, the constituent file upload request includes a constituent file of the target software package. Therefore, the packaging and unpacking times can be reduced, and the efficiency is improved.

In some possible implementations, the constituent file upload request includes a target software package, based on which the software repository may further unpack the target software package to obtain the constituent file of the target software package. Compared with the direct storage of the target software package, the storage of the constituting files can reduce the storage of repeated files and realize high-efficiency storage.

In a third aspect, the present application provides a software package management apparatus. The device comprises:

the software package downloading method comprises a communication unit, a processing unit and a processing unit, wherein the communication unit is used for receiving a software package downloading request, and the software package downloading request comprises hardware environment configuration and description information of a target software package;

the management unit is used for obtaining the target software package matched with the hardware environment configuration according to the description information and the hardware environment configuration;

the communication unit is further configured to send the target software package.

In some possible implementations, the management unit includes:

the matching subunit is used for obtaining a construction file of the target software package according to the description information and the hardware environment configuration;

and the construction subunit is used for packaging the construction files to obtain the target software package.

In some possible implementations, the matching subunit is specifically configured to:

inquiring file identification of a constituting file of the target software package according to the description information and the hardware environment configuration;

and obtaining the constituent file of the target software package according to the file identifier.

In some possible implementations, the apparatus further includes:

and the storage unit is used for storing the composition file of the target software package before receiving the software package downloading request.

In some possible implementations, the apparatus further includes:

and the storage unit is used for storing the constituent files of the target software package when the constituent files of the target software package are not stored.

In some possible implementations, the communication unit is further configured to:

receiving a software package query request, wherein the software package query request comprises the description information of the target software package;

the management unit is further configured to:

obtaining metadata of the target software package according to the description information;

the communication unit is further configured to:

and returning the metadata of the target software package.

In some possible implementations, the communication unit is further configured to:

receiving a software package deleting request, wherein the software package deleting request comprises the description information of the target software package;

the management unit is further configured to:

obtaining metadata of the target software package according to the description information;

and deleting the constituting file according to the file identifier of the constituting file of the target software package in the metadata.

In some possible implementations, the communication unit is specifically configured to:

receiving a plurality of software package downloading requests, wherein the software package downloading requests come from clients with different hardware environment configurations to download target software packages;

the management unit is specifically configured to:

and obtaining the target software package matched with the hardware environment configuration from the same software warehouse address according to the description information and the hardware environment configuration.

In some possible implementations, the hardware environment configuration includes an operating system configuration, a processor configuration, and an accelerator configuration.

In a fourth aspect, the present application provides a software package management apparatus. The device comprises:

the communication unit is used for receiving a composition file uploading request which is used for requesting to upload a composition file of a target software package;

and the storage unit is used for storing the composition files of the target software package.

In some possible implementations, the constituent file upload request includes a constituent file of the target software package.

In some possible implementations, the constituent file upload request includes a target software package;

the device further comprises:

and the unpacking unit is used for unpacking the target software package to obtain a construction file of the target software package.

In a fifth aspect, the present application provides an apparatus comprising a processor and a memory. The processor and the memory are in communication with each other. The processor is configured to execute the instructions stored in the memory to cause the apparatus to perform the software package management method as in the first aspect or any implementation manner of the first aspect.

In a sixth aspect, the present application provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and the instructions instruct a device to execute the software package management method according to the first aspect or any implementation manner of the first aspect.

In a seventh aspect, the present application provides a computer program product containing instructions that, when run 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.

The present application can further combine to provide more implementations on the basis of the implementations provided by the above aspects.

Drawings

In order to more clearly illustrate the technical method of the embodiments of the present application, the drawings used in the embodiments will be briefly described below.

Fig. 1 is a schematic application environment diagram of a software package management method according to an embodiment of the present application;

fig. 2 is a system architecture diagram of a software package management method according to an embodiment of the present application;

fig. 3 is a system architecture diagram of a software package management method according to an embodiment of the present application;

fig. 4 is an interaction flowchart of a software package management method according to an embodiment of the present application;

fig. 5 is a schematic flowchart of downloading a software package according to an embodiment of the present application;

fig. 6 is a flowchart of a software package management method according to an embodiment of the present application;

FIG. 7 is a schematic view of an interface provided by an embodiment of the present application;

fig. 8 is a schematic structural diagram of a software package management apparatus according to an embodiment of the present application;

fig. 9 is a schematic structural diagram of a software package management apparatus according to an embodiment of the present application;

FIG. 10 is a schematic structural diagram of an apparatus provided in an embodiment of the present application;

fig. 11 is a schematic structural diagram of an apparatus according to an embodiment of the present application.

Detailed Description

The terms "first" and "second" in the embodiments of the present application are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.

Some technical terms referred to in the embodiments of the present application will be first described.

A software repository (software repository), also known as a software repository, is a system that manages and distributes software packages. The software repository manages a large number of software packages that are available for download and installation. These software packages may be provided by different software providers or developers. The software warehouse may classify software packages in different ways for storage and user query. For example, a software repository may be categorized by operating system, license type of software, or even language.

A heterogeneous environment (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. The computing device may be a Personal Computer (PC) such as a desktop computer, a notebook computer, and a smart phone, or may be a server.

These computing devices may employ different system architectures such as the x86 architecture, an Advanced reduced instruction set processor (ARM) architecture, a POWER architecture, and so forth. In some implementations, these computing devices may also be the same system architecture, but with hardware environment configuration differences.

For example, the hardware environment configuration of some computing devices may be such that they include only x86 Central Processing Units (CPUs), namely x86 CPU only. (ii) a Other computing devices may have a hardware environment configuration that includes x86 CPUs and Graphics Processing Units (GPUs), i.e., x86+ GPUs, and still other computing devices may have a hardware environment configuration that includes only ARM architecture CPUs, i.e., ARM CPU only. Of course, some computing devices may also be configured with hardware environments such as ARM-architecture CPUs and embedded Neural-Network Processors (NPUs).

In a heterogeneous environment, software warehouse management of software packages (e.g., distribution of software packages) also becomes more complex as the combination of processor architectures and accelerator types in the environment increases. Aiming at the same software, the software warehouse needs to provide software package downloading links under different hardware environments respectively so that the client can download the corresponding software package through the corresponding software package downloading link. Confusion of software package download links provided by a software warehouse or selection of software package download links in other hardware environments by a client can result in unavailability of downloaded software packages. Therefore, the complexity of software package management is increased, the software package management cost is improved, and the downloading and installation efficiency is influenced.

In view of the above, the present application provides a software package management method. The method may be performed by a software repository. Specifically, the software warehouse receives a software package downloading request, where the software package downloading request includes a hardware environment configuration and description information of a target software package, and the software warehouse may 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.

In the method, the client carries the hardware environment configuration in the software package downloading request, so that the software warehouse can match out the corresponding target software package based on the hardware environment configuration without providing the target software package aiming at different hardware environment configurations in advance, thereby reducing the complexity of software package management and reducing the software package management cost. In addition, the method can avoid the problem that the downloaded software package is unavailable due to confusion of the software package download link provided by the software warehouse or selection of the software package download link under other hardware environments by the client, thereby improving the efficiency of downloading and installing the software package and improving the user experience.

Further, the software repository may receive a plurality of software package downloading requests, where the plurality of software package downloading requests are specifically from clients with different hardware environment configurations to download the target software package, and the software repository may obtain the target software package matching the hardware environment configuration from the same software repository address, specifically, the same Uniform Resource Locator (URL), according to the description information and the hardware environment configuration. Therefore, the method is transparent to the client, and the client with different architectures downloads and installs the software package by using the uniform software warehouse address and the same command. The software management complexity is further reduced, and the management cost is reduced.

In order to make the technical solution of the present application clearer and easier to understand, an application scenario of the software package management method provided in the embodiment of the present application is described below with reference to the drawings.

Referring to fig. 1, an application scenario of the software package management method is shown, and as shown in fig. 1, the scenario includes a software repository 102 and at least one client 104. For ease of description, fig. 1 is illustrated as including multiple clients. At least one client 104 establishes a communication path with the software repository 102 such that the client 104 downloads the software package from the software repository 102 based on the communication path.

Specifically, the client 104 sends a software package download request to the software repository 102, the software package download request including the hardware environment configuration and the description information of the target software package. The hardware environment configuration refers to a configuration status of the hardware environment where the client 104 is located. In some implementations, the hardware environment configuration can be a processor configuration, an operating system configuration, and an accelerator configuration of the device on which the client 104 is located. It should be noted that an accelerator refers to a processor other than a central processing unit, such as a GPU, NPU, etc. When the device on which the client 104 is located is not configured with an accelerator, the accelerator is configured empty.

The target software package may be one or more of the software packages provided by the software repository 102. The description information specifically refers to information describing the software package, and may be, for example, a name, a number, or other character strings that can uniquely determine the software package. In one example, the description information of the target software package may be a message, i.e., a software name of the message software.

Correspondingly, after receiving the software package downloading request, the software warehouse 102 obtains the target software package matched with the hardware environment configuration according to the description information and the hardware environment configuration. The target software package is then sent to the client 104.

In some implementations, at least two of the plurality of clients 104 have different hardware environment configurations. For example, the hardware environment of one client is configured as x86 CPU only, and the hardware environment of the other client is configured as ARM CPU + NPU.

Correspondingly, the software repository 102 may receive a plurality of software package download requests, which are specifically from the above-mentioned downloading operations of the target software package by the clients 104 having different hardware environment configurations. Then, the software repository 102 may 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 the target software package to the corresponding client 104.

As shown in fig. 2, the software repository 102 may be deployed in a cloud environment, and in particular, one or more computing devices (e.g., a central server) on the cloud environment. The software repository 102 may also be deployed in an edge environment, and in particular on one or more computing devices (edge computing devices) in the edge environment, which may be servers, computing boxes, and the like. The cloud environment indicates a central cluster of computing devices owned by a cloud service provider for providing computing, storage, and communication resources; the edge environment indicates a cluster of edge computing devices geographically close to an end device (i.e., a peer device) for providing computing, storage, and communication resources.

The software repository 102 described above may also be deployed on an end device. The end equipment comprises a physical machine (such as a terminal). The terminal includes, but is not limited to, a desktop computer, a notebook computer, a tablet computer, or a smart phone. The software repository 102 may also be deployed in a virtual machine (virtual machine) or a container (container) on the above-mentioned physical machine. In some implementations, the software repository 102 may also be deployed in a cluster in multiple copies, allowing for load balancing and reliability.

Further, as shown in FIG. 3, the software repository 102 may include multiple portions (e.g., include multiple functional modules). Based on this, various portions of the software repository 102 may also be distributively deployed in different environments. For example, portions of software repository 102 may be deployed separately on three environments, a cloud environment, an edge environment, an end device, or any two of them.

In some implementations, the software repository 102 may be deployed on a physical machine or on a virtual machine or container in a physical machine when deployed in the above-described environment. The embodiments of the present application do not limit this.

In order to make the technical solution of the present application clearer and easier to understand, the following describes a software package management method provided by the embodiment of the present application from the perspective of interaction between the software repository 102 and the client 104.

Referring to fig. 4, a flow chart of a software package management method is shown, the method includes:

s402: the client 104 sends a software package download request to the software repository 102.

Client 104 may be a client dedicated to downloading software, such as a client of a software store. Client 104 may also be a general-purpose client, such as a browser. In some implementations, the client 104 can provide a Graphical User Interface (GUI). The user may trigger a software package download operation via 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.

Wherein, the software package downloading request comprises the hardware environment configuration and the description information of the target software package.

The hardware environment configuration refers to the hardware environment configuration of the device on which the client 104 is located. The hardware environment configuration may include a processor configuration, an operating system configuration, and an accelerator configuration. The processor configuration includes processor architecture such as x86, ARM or POWER, etc. The operating system configuration includes operating system types such as Windows, linux, etc. In some implementations, the operating system configuration also includes operating system versions, such as 7.0, 7.1, 10.0, and so on. The operating system may be that of a physical machine, or a virtual machine when the client 104 is deployed on the virtual machine. The accelerator configuration includes a processor for acceleration, such as a GPU, NPU, and the like. In some examples, the accelerator configuration may be null, i.e., the device on which client 104 is located may not be configured with an accelerator.

The target software package is a software package needing to be downloaded. The target software package is one or more of the software packages provided by the software repository 102. Specifically, the user may select one or more software packages through the GUI to trigger the software package downloading operation, where the selected software package is the target software package.

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 may be the name or code of the target software package, and of course, the description information may also be a unique value determined according to one or more of the name, code, and content.

In some implementations, the client 104 may also be a command line (command line) tool. In some examples, the command line tools include a red-hat package manager (RPM), a Debian package manager (dpkg), and so on. The command line tool may also provide a command line user interface (CUI). The user may enter a software package download command, such as wget, through the CUI. Correspondingly, the command line tool may generate a software package download request according to the software package download command.

When the software repository 102 is further provided with an Application Programming Interface (API) corresponding to the software package, the client 104 may also call the API to generate a software package download request. In this implementation, client 104 may be the client dedicated to software download described above, a browser, or other client.

S404: the software warehouse 102 obtains the target software package matched with the hardware environment configuration according to the description information and the hardware environment configuration.

In some implementations, the software repository 102 may store constituent files of the software package. Based on this, the software repository 102 obtains the target software package through a dynamic building manner. Specifically, the software repository 102 may match out a configuration file matching the description information and the hardware environment configuration, that is, a configuration file of the target software package, according to the description information and the hardware environment configuration. The software repository 102 may then package the constituent files to obtain the target software package.

The software repository 102 may match a configuration file matching the description information and the hardware environment configuration according to the description information and the hardware environment configuration through metadata of the software package. The metadata of the software package includes description information of the software package, hardware environment configuration, and file identification of the constituent files of the software package. The file identifier constituting the file is a character string capable of uniquely identifying the file. In some implementations, the file identification that constitutes the file may be a hash value (hash) that constitutes the file. Further, the metadata of the software package may also include other information, such as the version of the software package, the package type, and so forth.

For ease of description, this application also provides specific examples of metadata. As shown in the following table:

TABLE 1 metadata of software packages

Wherein, column 1 in table 1, i.e., "name" lists the description information of the software package, columns 3 to 5 in table 1, i.e., "operating system", "architecture", "accelerator", and other 3 lists the hardware environment configuration, and column 1 in table 1, i.e., "file information" lists the file identifiers of the constituent files of the software package.

In some implementations, the software repository 102 may maintain a software package metadata repository. The software package metadata repository is used to store metadata for each software package for data matching by the software repository 102 based on the software package metadata repository. Similarly, the software repository 102 may also maintain a file repository. The file repository is used for storing the constituent files of the software packages, so that the software repository 102 acquires the corresponding constituent files from the file repository according to the file identifiers.

In some implementations, the software repository 102 pre-stores constituent files of the software package, such as pre-storing constituent files of a target software package, for the client 104 to download the target software package from the software repository 102. Further, the software repository 102 may store the constituent files of the target software package when the constituent files of the target software package are not stored. Therefore, repeated storage of the configuration files can be avoided, storage space is saved, and efficient storage is realized.

The software repository 102 may also store file identifications that make up the files, such as hash values that make up the files, among other things. As shown in the following table:

table 2 file identification of constituting file

File name
2afc1f626f77237d4345aad25b03b8f2
008c83eeff8573656c84e1929d6247ef
5cf1fa21b1984de8e4905b03434db689

In this manner, the software repository 102 may determine whether to store a constituent file to be stored by comparing the file identification of the constituent file to be stored with the file identification of the already stored constituent file. And if the file identifier of the to-be-stored constituent file is the same as the file identifier of the stored constituent file, abandoning the storage operation. And if the file identification of the to-be-stored composition file is different from the file identification of the stored composition file, executing the storage operation.

S406: the software repository 102 sends the target software package to the client 104.

The software repository 102 sends the target software package to the client 104 for the client 104 to install the target software package.

In some implementations, as shown in FIG. 5, the software repository 102 may receive multiple software package download requests. The multiple software package download requests may come from download operations of the target software package by clients 104 of different hardware environment configurations. The software repository 102 is provided with a GUI, and the client displays a software package download page, for example, a software package download page named amand, through the GUI, in which the clients 104 having different hardware environment configurations can download target software packages matching their hardware environment configurations through the same download address, for example, the same URL.

Specifically, the downloading process includes that the clients 104 with different hardware environment configurations respectively send software package downloading requests to the software repository 102, and the software repository 102 obtains the target software package matching each hardware environment configuration from the same software repository address (for example, the above-mentioned URL) according to the description information and the hardware environment configuration in each software package downloading request. The software repository 102 then returns the corresponding target software packages to the clients 104 having different hardware environment configurations, respectively.

Based on the method, 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 download and install the target software package by using the uniform software package name, the software package downloading and installing process is simplified, the software package management difficulty is reduced, and the software package management cost is reduced.

The software package management method provided by the embodiment of the present application is described above from the software package downloading layer, and next, the software package management method provided by the embodiment of the present application is described from the software package uploading layer. The present embodiment is exemplified by uploading a target software package, and uploading other software packages may refer to the present embodiment.

Referring to the flowchart of the software package management method shown in fig. 6, as shown in fig. 6, the method includes:

s602: the software repository 102 receives a request to upload a composed file.

The target software package comprises at least one composition file, and the composition file uploading request is used for requesting to upload the composition file of the target software package. As shown in table 2, the target software package nginx includes 2 constituent files having hash values of hash1 and hash2, and the target software package Tomcat includes a constituent file having a hash value of hash 1.

In some implementations, the constituent file upload request includes the constituent files of the target software package. Specifically, the client 104 directly carries the configuration file of the target software package in the configuration file upload request, and then uploads the configuration file upload request, thereby implementing uploading of the configuration file of the target software package. The client 104 may directly upload the constituent files of the target software package to the software warehouse 102 without packaging the constituent files of the target software package when developing the target software package, for example, when developing operation and maintenance (developers), so as to reduce the packaging and unpacking times of the target software package, improve the uploading efficiency, and reduce the extra workload.

In other implementations, the compose file upload request includes the target software package. Specifically, the client 104 carries a target software package in the request for uploading the configuration file, and the target software package can be unpacked into the configuration file of the target software package, so that uploading the configuration file of the target software package can be realized.

S604: the software repository 102 stores constituent files of the target software package.

The software repository 102 stores the constituent files of the target software package so that, upon receiving a software package download request, the target software package can be dynamically constructed from the pre-stored constituent files of the target software package. When the constituent file uploading request received by the software warehouse 102 includes the target software package, the software warehouse 102 unpacks the target software package on line, obtains the constituent file of the target software package, and then stores the constituent file of the target software package.

In some implementation modes, the software warehouse can detect whether the constituting files exist locally or not, if not, the constituting files of the target software package are stored, and if so, the constituting files are abandoned to be stored, so that the storage space occupied by the repeated constituting files is avoided, and the efficient storage is realized.

It should be noted that the client 104 performing the software package uploading operation and the software package downloading operation may be the same client or different clients. For convenience of description, in the embodiment of the present application, the client 104 performing the software package downloading operation may be referred to as a first client, and the client 104 performing the software package uploading operation may be referred to as a second client. Similarly, a GUI presented by a first client is referred to as a first GUI, and a GUI presented by a second client is referred to as a second GUI.

FIG. 7 provides a schematic illustration of a second GUI, which as shown in FIG. 7, is provided with a software package upload component including a name edit control and a path edit control. The name editing control is used for editing the name of the target software package to be uploaded, and the path editing control is used for editing the path of the file of the target software package to be uploaded.

In some implementations, the second GUI is also provided with a storage mode configuration control. As shown in fig. 7, the storage mode configuration control may be a selection control, and if the selection control is selected, the configuration file upload request sent by the second client also carries a storage mode, specifically, a high-efficiency storage mode, so as to instruct the software repository 102 to detect whether the configuration file is stored first when the configuration file is stored, if so, the storage is abandoned, and if not, the storage is executed. When the selection control is not selected, the configuration file upload request further carries a storage mode, specifically a normal storage mode, or does not carry a storage mode, so that the software repository 102 can directly store the configuration file according to the configuration file upload request.

Based on the embodiments shown in fig. 4 and 6, the software repository 102 may also provide query functions and/or delete functions for software packages. The client 104 executing the software package query operation and the client 104 executing the software package download operation may be the same client or different clients. The client 104 performing the package deleting operation and the client 104 performing the package uploading operation may be the same client or different clients. In this embodiment, the client 104 that executes the software query operation is taken as a third client, and the client 104 that executes the software deletion operation is taken as a fourth client for illustration.

In some implementations, the third client may send a software package query request to the software repository 102, where the software package query request includes description information of the target software package, such as a name of the target software package, and the software repository 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. The software repository 102 may specifically obtain metadata matched with the description information by querying a metadata repository of the software package, where the metadata is metadata of the target software package.

In some implementations, the fourth client may send a software package deletion request to the software repository 102, where the software package deletion request includes description information of the target software package, such as a name of the target software package, and the software repository 102 obtains metadata of the target software package according to the description information, where the metadata includes a file identifier of a constituent file of the target software package, such as a hash value of the constituent file of the target software package. The software repository 102 may delete the constituent files based on their file identifications. Further, to completely delete a software package, the software repository 102 may also delete the file identifications of the constituent files of the target software package.

In some implementation manners, the software warehouse 102 may also directly store the software package, so that when the software warehouse 102 receives the software package downloading request, the target software package matched with the hardware environment configuration may be directly obtained according to the hardware environment configuration and the description information of the target software package, and the target software package does not need to be dynamically constructed, thereby improving the software uploading and downloading efficiency.

Correspondingly, the software package uploading process specifically includes that the software repository 102 receives a software package uploading request, the software package uploading request includes a target software package, and then the software repository 102 stores the target software package. Since software packages of different hardware environment configurations may include the same constituent files, to improve storage efficiency, the software repository 102 may utilize the deduplication functionality of the storage system when storing the target software package. Specifically, when the target software package has duplicate blocks in the storage system, the software repository 102 may also remove the duplicate blocks, so as to alleviate the problem that duplicate file storage in each software package cannot be removed, and improve storage efficiency.

The software package management method provided by the embodiment of the present application is described in detail above with reference to fig. 1 to 7, and the apparatus and the device provided by the embodiment of the present application are described below with reference to the accompanying drawings.

Referring to fig. 8, a schematic structural diagram of a software package management apparatus 800 includes:

a communication unit 802, configured to receive a software package download request, where the software package download request includes a hardware environment configuration and description information of a target software package;

the management unit 804 is configured to obtain the target software package matched with the hardware environment configuration according to the description information and the hardware environment configuration;

the communication unit 802 is further configured to send the target software package.

In some possible implementations, the management unit 804 includes:

a matching subunit 8042, configured to obtain a configuration file of the target software package according to the description information and the hardware environment configuration;

a construction subunit 8044, configured to package the configuration files, and obtain the target software package.

In some possible implementations, the matching subunit 8042 is specifically configured to:

inquiring file identification of a constituting file of the target software package according to the description information and the hardware environment configuration;

and obtaining the constituent file of the target software package according to the file identifier.

In some possible implementations, the apparatus 800 further includes:

the storage unit 806 is configured to store the configuration file of the target software package before receiving the software package download request.

In some possible implementations, the apparatus further includes:

the storage unit 806 is configured to store the configuration file of the target software package when the configuration file of the target software package is not stored.

In some possible implementations, the communication unit 802 is further configured to:

receiving a software package query request, wherein the software package query request comprises the description information of the target software package;

the management unit 804 is further configured to:

obtaining metadata of the target software package according to the description information;

the communication unit 802 is further configured to:

and returning the metadata of the target software package.

In some possible implementations, the communication unit 802 is further configured to:

receiving a software package deleting request, wherein the software package deleting request comprises the description information of the target software package;

the management unit 804 is further configured to:

obtaining metadata of the target software package according to the description information;

and deleting the constituting file according to the file identifier of the constituting file of the target software package in the metadata.

In some possible implementations, the communication unit 802 is specifically configured to:

receiving a plurality of software package downloading requests, wherein the software package downloading requests come from clients with different hardware environment configurations to download target software packages;

the management unit 804 is specifically configured to:

and obtaining the target software package matched with the hardware environment configuration from the same software warehouse address according to the description information and the hardware environment configuration.

In some possible implementations, the hardware environment configuration includes an operating system configuration, a processor configuration, and an accelerator configuration.

The software package management apparatus 800 according to the embodiment of the present application may correspond to perform the method described in the embodiment 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 implementing corresponding flows of each method in the embodiment shown in fig. 4, and are not described herein again for brevity.

The embodiment of the application also provides a software package management device. Referring to the schematic structural diagram of the software package management apparatus shown in fig. 8, the apparatus 900 includes:

a communication unit 902, configured to receive a configuration file upload request, where the configuration file upload request is used to request to upload a configuration file of a target software package;

a storage unit 904, configured to store the configuration file of the target software package.

In some possible implementations, the constituent file upload request includes a constituent file of the target software package.

In some possible implementations, the constituent file upload request includes a target software package;

the apparatus 900 further comprises:

and the unpacking unit 906 is used for unpacking the target software package to obtain a constituent file of the target software package.

The software package management apparatus 900 according to the embodiment of the present application may correspond to perform the method described in the embodiment 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 implementing corresponding flows of each method in the embodiment shown in fig. 6, and are not described herein again for brevity.

The embodiment of the application also provides equipment. The device may also be a computer cluster in a cloud environment or an edge environment, or may also be an end device such as a desktop. This device is used to implement the functionality of the software package management apparatus 800 in the embodiment shown in fig. 8.

Fig. 10 provides a schematic diagram of the structure of a device 1000, and as shown in fig. 10, 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 with each other via a bus 1001.

The bus 1001 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 10, but this is not intended to represent only one bus or type of bus.

The processor 1002 may be any one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Micro Processor (MP), a Digital Signal Processor (DSP), and the like.

The communication interface 1003 is used for communication with the outside. For example, communication interface 1003 may receive a software package download request, transmit a target software package, and so forth.

The memory 1004 may include volatile memory (volatile memory), such as Random Access Memory (RAM). The memory 1004 may also include a non-volatile memory (non-volatile memory), such as a read-only memory (ROM), a flash memory, a hard drive (HDD), or a Solid State Drive (SSD).

The memory 1004 stores executable codes, and the processor 1002 executes the executable codes to perform the aforementioned software package management method.

Specifically, in the case of implementing the embodiment shown in fig. 8, and in the case where the units of the software package management apparatus 800 described in the embodiment of fig. 8 are implemented by software, software or program codes necessary for executing the functions of the management unit 804 in fig. 8 are stored in the memory 1004.

The communication unit 802 functions are realized by a communication interface 1003. The communication interface 1003 receives a software package downloading request including the hardware environment configuration and the description information of the target software package, then the communication interface 1003 transmits it to the processor 1002 through the bus 1001, the processor 1002 executes the program codes corresponding to the units stored in the memory 1004, such as the program codes corresponding to the management unit 804, to perform the step of obtaining the target software package matching the hardware environment according to the hardware environment configuration and the description information of the target software package, and then the communication interface 1003 sends the target software package, such as sending the target software package to the client, thereby completing the software package downloading.

The embodiment of the application also provides another device. This device is used to implement the functions of the software package management apparatus 900 in the embodiment shown in fig. 9.

Fig. 11 provides a schematic diagram of another device 1100, and as shown in fig. 11, the device 1100 includes a bus 1101, a processor 1102, a communication interface 1103, and a memory 1104. Communication between the processor 1102, memory 1104 and communication interface 1103 occurs via a bus 1101.

The communication interface 1103 is used for communication with the outside. For example, the communication interface 1103 may receive a constitute file upload request, or the like. The memory 1104 has stored therein executable code that the processor 1102 executes to perform the aforementioned software package management method.

Specifically, in the case of implementing the embodiment shown in fig. 9, and in the case where the units of the software package management apparatus 900 described in the embodiment of fig. 9 are implemented by software, software or program codes necessary for executing the functions of the unpacking unit 906 in fig. 9 are stored in the memory 1104.

The communication unit 902 functions are implemented by the communication interface 1103. The communication interface 1103 receives the constituent file upload request, and then the communication interface 1103 transmits it to the processor 1102 through the bus 1101, and the processor 1102 executes the program codes corresponding to the respective units stored in the memory 1104 and stores the constituent files of the object software package.

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 execute the step of unpacking the target software package to obtain the constituent file of the target software package, and then stores the constituent file of the target software package to complete the upload of the target software package.

An embodiment of the present application further provides a computer-readable storage medium, which includes instructions for instructing a computer to execute the software package management method applied to the software package management apparatus 800 or the software package management apparatus 900.

An embodiment of the present application further provides a computer-readable storage medium, which includes instructions for instructing a computer to execute the software package management method applied to the software package management apparatus 800 or the software package management apparatus 900.

The embodiment of the application also provides a computer program product, and when the computer program product is executed by a computer, the computer executes any one of the software package management methods. The computer program product may be a software installation package which may be downloaded and executed on a computer in the event that any of the aforementioned software package management methods need to be used.

23页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:表单处理方法、装置、电子设备和计算机存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!