Software warehouse management method, system, electronic device, storage medium and program product
By establishing a combined repository in multiple software repositories and setting a priority order, the problems of repository maintenance complexity and version conflicts are solved, and orderly software package matching and a safe download process are achieved.
Patent Information
- Application Number
- CN202510765619.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2045-06-10
AI Technical Summary
In the management of multiple software repositories, the high complexity of repository maintenance and imperfect dependency resolution management lead to version conflicts and runtime errors.
By establishing a combined warehouse, setting the priority order of multiple software warehouses, and matching target software packages from the combined warehouse according to the priority, the orderliness and consistency of the matching process are ensured.
It reduces the complexity of warehouse maintenance, avoids version conflicts, ensures that different download requests are matched to the same software package, and improves matching efficiency and security.
Smart Images

Figure CN120276756B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a software warehouse management method, system, electronic device, storage medium and program product, which can be applied to the field of software management technology. Background Art
[0002] With the increasing number of enterprise-developed applications, using multiple software repositories to manage their software packages has become a mainstream approach to managing software packages. Currently, when using multiple repositories to manage software packages, these repositories are maintained independently, resulting in a high level of maintenance complexity. Furthermore, dependency resolution management is not perfect, meaning different users may download packages with the same name but different content, leading to runtime errors and other issues such as version conflicts. Summary of the Invention
[0003] Embodiments of the present application provide a software warehouse management method, system, electronic device, storage medium, and program product to alleviate or solve one or more technical problems existing in the prior art.
[0004] In a first aspect, an embodiment of the present application provides a software repository management method, the method comprising: receiving a download request sent by a client, the download request being used to request downloading a target software package; in response to the target software package being located in a combined repository, matching the target software package from the multiple software repositories in the combined repository according to the priority order of the multiple software repositories, wherein the multiple software repositories have an associated relationship and any software repository includes at least one software package; and sending the target software package to the client.
[0005] In a second aspect, an embodiment of the present application provides a software repository management method, the method comprising: sending a download request to a server in response to a download instruction for a target software package, the download request being used to request downloading the target software package; receiving the target software package sent by the server, wherein the target software package is matched by the server from multiple software repositories in a combined repository in accordance with the priority order of multiple software repositories in the combined repository in response to the target software package being located in the combined repository, the multiple software repositories being associated with each other, and any software repository including at least one software package.
[0006] In a third aspect, an embodiment of the present application provides a software warehouse management system, the system comprising: a client, for sending a download request to a server in response to a download instruction for a target software, and receiving the target software sent by the server; the server, for obtaining the target software package from the multiple software warehouses in the combined warehouse in accordance with the priority order of the multiple software warehouses in the combined warehouse when determining, based on the download request, that the target software package to be downloaded is located in a combined warehouse; and sending the target software package to the client.
[0007] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor implements any method of the embodiments of the present application when executing the computer program.
[0008] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method of any one of the embodiments of the present application is implemented.
[0009] In a sixth aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements any method of the embodiments of the present application when executed by a processor.
[0010] In the software warehouse management method provided in the embodiment of the present application, by setting up a combined warehouse, it is sufficient to maintain the combined warehouse, without having to maintain each software warehouse in the combined warehouse one by one, thereby reducing the complexity of warehouse maintenance. By setting the priorities of multiple software warehouses in the combined warehouse, the target software package that the client needs to download can be matched from the multiple software warehouses according to the priority, thereby ensuring the orderliness of the matching process. Since the matching process is orderly, different download requests for the same target software package are matched according to the same matching order, ensuring that different download requests are matched to the same software package, rather than different software packages with version conflicts, that is, it is possible to avoid version conflicts and other problems in the combined warehouse.
[0011] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar components or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments according to the present application and should not be regarded as limiting the scope of the present application.
[0013] Figure 1 A schematic diagram showing the composition of a software warehouse management system provided in an embodiment of the present application is shown;
[0014] Figure 2 A schematic diagram showing the composition of a management application provided in an embodiment of the present application is shown;
[0015] Figure 3 A functional schematic diagram of the server provided in an embodiment of the present application is shown;
[0016] Figure 4 A first flow chart of the software warehouse management method provided by an embodiment of the present application is shown;
[0017] Figure 5 A schematic diagram of matching target software packages provided in an embodiment of the present application is shown;
[0018] Figure 6 A schematic diagram of private software warehouse management provided by an embodiment of the present application is shown;
[0019] Figure 7 A schematic diagram of software warehouse management of an agent type provided in an embodiment of the present application is shown;
[0020] Figure 8 A second flow chart of the software warehouse management method provided in an embodiment of the present application is shown;
[0021] Figure 9 A schematic diagram showing a first composition of a software warehouse management device provided in an embodiment of the present application is shown;
[0022] Figure 10 A second schematic diagram of the composition of the software warehouse management device provided in an embodiment of the present application is shown;
[0023] Figure 11 A block diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0024] Hereinafter, only certain exemplary embodiments are briefly described. As will be appreciated by those skilled in the art, the described embodiments may be modified in various ways without departing from the spirit or scope of the present application. Therefore, the drawings and description are to be regarded as illustrative in nature and not restrictive.
[0025] To facilitate understanding of the technical solutions of the embodiments of the present application, the following describes the related technologies of the embodiments of the present application. The following related technologies can be combined with the technical solutions of the embodiments of the present application as optional solutions, and all of them fall within the scope of protection of the embodiments of the present application.
[0026] The following terms will be used in the following text:
[0027] Python Package Index (PyPI): Also known as the PyPI repository, it is an internal repository for storing and distributing custom Python packages within an enterprise, effectively managing the use and distribution of enterprise-level packages.
[0028] Dependency resolution: Resolve the project's dependencies on different package versions to ensure compatibility between each package.
[0029] Priority management: When there are multiple software repositories, prioritize the repositories to determine the order of package dependency resolution and installation.
[0030] With the widespread use of Python in enterprise applications, the demand for Python package management is growing. While the traditional PyPI repository provides a rich set of package resources, its internal enterprise use still presents the following issues: When managing software packages using multiple repositories, these repositories are maintained independently, resulting in a high level of complexity in repository maintenance. Furthermore, dependency resolution management is imperfect. Because different repositories may contain packages with the same package name but different content, different users may download packages with the same package name but different content, leading to runtime errors and version conflicts. For example, both Repository 1 and Repository 2 contain a package named 123. However, the package named 123 in Repository 2 fixes a vulnerability in the package named 123 in Repository 1. Therefore, the content of the package named 123 in Repository 1 is different from the content of the package named 123 in Repository 2. However, since dependency resolution is not perfect, that is, there is no constraint on the resolution order, the user may download a software package with the package name 123 from software warehouse 1, resulting in an error during runtime due to a vulnerability.
[0031] Based on this, the embodiments of the present application provide a software warehouse management method, electronic device, storage medium and program product, aiming to reduce the complexity of maintaining the software warehouse, ensure the orderliness of the software package matching process, and avoid version conflicts and other problems. Figure 1 A schematic diagram of a software warehouse management system provided by an embodiment of the present application is shown in FIG. Figure 1 As shown, the system may include a client and a server.
[0032] For example, the client can be a terminal device such as a mobile phone, tablet computer, desktop computer, portable notebook, etc. The server can be a physical server or a cloud server. Figure 1The client is a desktop computer and the server is a physical server as an example for schematic illustration.
[0033] The client can be configured with a software warehouse management application, which can be an independent application (Application, referred to as App), a small program embedded in other applications, or a web application. Figure 2 As shown, the management application may include an interface module and an operation interface.
[0034] The interface module may include an upload interface, a download interface, a user management interface, a repository management interface, and a permissions management interface. The upload interface is used to request uploading a software package to the corresponding software repository, or to request uploading of software package test results. The download interface is used to request downloading a software package from the software repository. The user management interface is used to request adding or deleting users. The repository management interface is used to request creating, updating, or deleting software repositories. The permissions management interface is used to request configuration of user upload and download permissions, interface and screen access permissions, user management permissions, and repository management permissions.
[0035] The operation interface includes a user management module, a warehouse management module, a namespace management module, a permission management module, a software package management module, etc. Among them, the user management module is used for users with user management permissions (such as administrators, project managers, etc.) to edit the properties of the target user, request to add users through the aforementioned user management interface, or request to delete users, etc. The user's attributes include at least one of the user role, the user group to which the user belongs, etc. The warehouse management module is used for users with warehouse management permissions to edit the properties of the target software warehouse, request to create a software warehouse, or update a software warehouse, or delete a software warehouse, etc. through the aforementioned warehouse management interface. The properties of the target software warehouse may include at least one of the warehouse name, warehouse type, and the namespace associated with the warehouse. Warehouse types may include private types and proxy types. Private type software warehouses are used to store customized software packages, and proxy type software warehouses are used to store software packages downloaded from associated websites. The namespace management module is used to edit namespaces, request to add namespaces, or delete namespaces, etc. The namespace can be used as the prefix of the software repository URL (Uniform Resource Locator), and the software repository name can be used as the suffix of the software repository URL. That is, the software repository URL includes the namespace and the repository name. The permission management module is used to edit the user's upload permissions, download permissions, interface and interface access permissions, etc. The software package management module is used to provide a browser index of the software package so that users can view or download the software package in the browser interface, etc., and for users to upload the software package to be stored, etc. It should be pointed out that Figure 2 It is for illustration only and not for limitation. In actual applications, the operation interface may include more or fewer modules, the management application may include more or fewer interfaces, and the functions of some modules may be combined into the same module. For example, the user management module may include permission management functions, etc.
[0036] The server is used to manage multiple software repositories, each of which contains at least one software package. At least two software repositories with an association relationship can form a combined repository. The association relationship can be associated with the same project, the same product, etc. Corresponding to the composition of the aforementioned management application, such as Figure 3 As shown, the server-side software repository management can include private type software repository management (including creation, deletion, update, etc.), proxy type software repository management (including creation, deletion, update, etc.), user management (including user attributes, user permissions, etc.), priority management (i.e., managing the priorities between multiple software repositories in a combined repository), etc.
[0037] The server and client can communicate over the network. Upon receiving a download request for a target software package from the client, the server, in response to the target software package being located in the combined repository, matches the target software package from the multiple software repositories in the combined repository according to their priority order, and sends the target software package to the client. Further details on the server's management of software repositories are described below, and any repetition is omitted here.
[0038] It can be seen that by setting up a combined warehouse, it is sufficient to maintain the combined warehouse without having to maintain each software warehouse in the combined warehouse one by one, thus reducing the complexity of warehouse maintenance. By setting the priority of multiple software warehouses in the combined warehouse, the target software package that the client needs to download can be matched from the multiple software warehouses according to the priority, ensuring the orderliness of the matching process. Because the matching process is orderly, different download requests for the same target software package are matched according to the same matching order, ensuring that different download requests match the same software package, rather than different software packages with version conflicts. In other words, it is possible to avoid version conflicts and other problems in the combined warehouse.
[0039] It should be noted that the above-mentioned application scenarios or application examples provided in the embodiments of this application are for ease of understanding, and the embodiments of this application do not specifically limit the application of the technical solution. In addition, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation portals for users to choose to authorize or refuse.
[0040] The following describes in detail the technical solution of this application and how it solves the aforementioned technical problems using specific embodiments. The several specific embodiments listed can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The following describes the embodiments of this application in detail with reference to the accompanying drawings.
[0041] Figure 4 A flowchart showing a method for displaying a chart according to an embodiment of the present application is shown. The method can be applied to Figure 1 The server shown, such as Figure 4 As shown, the method may include step S401, step S402 and step S403.
[0042] Step S401: receiving a download request sent by a client, wherein the download request is used to request downloading a target software package.
[0043] In some implementations, when a user needs to download a target software package, they can use a software repository management application configured on their client to edit the target software package's information and enter a download instruction. In response to the download instruction entered by the user, the client sends a download request based on the target software package's information to the server. The server then receives the download request sent by the client.
[0044] In some implementations, the management application's interface includes a graphical user interface (GUI). Accordingly, the user can manually enter target software package information through the GUI or select the target software package from a drop-down list. Inputting a download instruction can involve operating (e.g., single-clicking or double-clicking) a download control or operating a download link that matches the target software package displayed in the GUI. The download control and download link are associated with the aforementioned download interface.
[0045] In some other implementations, the operation interface of the management application includes a command line interface (CLI). Accordingly, the user can operate the command line interface to edit the download instruction, and the parameters of the download instruction include information of the target software package.
[0046] Step S402: In response to the target software package being located in the combined repository, the target software package is matched from multiple software repositories according to the priority order of multiple software repositories in the combined repository, wherein the multiple software repositories are associated with each other and any software repositories includes at least one software package.
[0047] To reduce the difficulty of software repository management and avoid version conflicts, in an embodiment of the present application, multiple software repositories with related relationships can be divided into a combined repository, and the priorities of the multiple software repositories in the combined repository can be pre-set. If the server determines that the target software package is located in the combined repository based on the download request, it will match the target software package from the multiple software repositories in the combined repository according to the priority order of the multiple software repositories.
[0048] Step S403: Send the target software package to the client.
[0049] Thus, by setting up a combined warehouse, it is sufficient to maintain the combined warehouse without having to maintain each software warehouse in the combined warehouse one by one, thereby reducing the complexity of warehouse maintenance. By setting the priorities of multiple software warehouses in the combined warehouse, the target software package that the client needs to download can be matched from the multiple software warehouses according to the priorities, ensuring the orderliness of the matching process. Because the matching process is orderly, different download requests for the same target software package are matched according to the same matching order, ensuring that different download requests match the same software package, rather than different software packages with version conflicts. In other words, it is possible to avoid version conflicts and other problems in the combined warehouse.
[0050] In order to efficiently manage software packages and realize quick downloading of software packages, in some embodiments, the multiple software repositories in the combined repository may include private-type software repositories and proxy-type software repositories, wherein the priority of private-type software repositories is higher than that of proxy-type software repositories. Private-type software repositories are used to store customized software packages and have environment attributes and editing attributes. Proxy-type software repositories are used to store software packages downloaded from associated websites.
[0051] Customized software packages can be self-developed software packages of the enterprise, that is, enterprise employees can upload the written software packages to a private software repository during the project development process. Considering that in actual applications, some enterprise projects may rely on software packages outside the enterprise, based on this, in order to facilitate the acquisition of the external software packages, a proxy-type software repository can also be created, and the original software packages downloaded from the associated website can be stored in the proxy-type software repository, or the software packages that have been rewritten from the original software packages can be stored in the proxy-type software repository. Among them, the associated website can be an official website, other download websites publicly available on the Internet, etc. When matching the target software package from the combined repository, the target software package is matched from the private software repository first, and if the target software package is not included in the private software repository, the target software package is matched from the proxy-type software repository. In this way, the orderliness of dependency resolution can be guaranteed, and the accuracy of the matched target software package can be guaranteed. At the same time, since there is no need to search for associated websites during the matching process, the matching efficiency can be improved.
[0052] Furthermore, when the software repository containing the target software package is a proxy-type software repository, in order to facilitate subsequent evaluation of the quality of the software packages in the target software repository, in some embodiments, step S403 may further include: generating a download record of the target software package.
[0053] To ensure secure access to the target software package, in some implementations, the download request includes a client identifier of the client. Accordingly, in step S402, obtaining the target software package from multiple software repositories in the combined repository according to the priority order of the multiple software repositories may include: querying permission information of the client based on the client identifier; and obtaining the target software package from the multiple software repositories in the combined repository according to the priority order of the multiple software repositories in the combined repository when the permission information indicates that the client has software download permission from the combined repository.
[0054] In some embodiments, the server maintains a correspondence between the client identifier and permission information. Upon determining that the target software package is located in a combined repository, the server retrieves the permission information associated with the client identifier in the download request from this correspondence. If the retrieved permission information indicates that the client has download permission for the combined repository, the server retrieves the target software package from the multiple repositories in the combined repository in order of priority. The client identifier can be a user's account associated with the management application, or a unique identifier assigned by the server to the user when registering an account for the management application.
[0055] Therefore, by verifying whether the client has access rights to the combined repository where the target software package is located, and matching the target software package from the combined repository if the client has access rights, the security of the target software package is guaranteed and illegal access to the target software package is avoided.
[0056] In order to facilitate the server to accurately determine the software repository to be matched, in some implementations, the download request includes the repository address corresponding to the target software package. Correspondingly, the method may also include: obtaining the target repository identifier associated with the repository address corresponding to the target software package from the association relationship between the warehouse address and the warehouse identifier; when there are multiple target repository identifiers, determining that the target software package is located in the combined repository.
[0057] In some embodiments, a user can operate a management application on their terminal device to configure a default combined repository, and the client maintains the repository address of the default combined repository. When the user needs to download a software package from a software repository other than the default combined repository, the user can edit the corresponding software repository information, specifying the repository name using the software repository information. Accordingly, after receiving a download instruction input by the user, the client can determine whether the download instruction contains the repository name of the software repository. If not, the client sends a download request to the server based on the repository address of the default combined repository. If the repository name is included, the client obtains the associated repository address (which can be the repository address of an independent repository or the repository address of a combination of repositories other than the default combined repository) from a preset association between repository names and repository addresses, and sends a download request to the server based on the repository address. After receiving the download request, the server can obtain the target repository identifier associated with the repository address in the download request from the association between repository addresses and repository identifiers. If there are multiple target repository identifiers, the server determines that the target software package is located in the combined repository and determines the repository corresponding to the repository address in the download request as the combined repository where the target software package is located. The repository identifier may be the repository name of the software repository, the URL of the software repository, or a unique identifier assigned when the software repository is created.
[0058] Therefore, based on the association between the warehouse address and the warehouse identifier, the target warehouse identifier associated with the warehouse address corresponding to the target software package is obtained, and based on the number of target warehouse identifiers, it is determined whether the target software package is located in the combined warehouse, which ensures the accuracy of the determination result and provides a strong guarantee for accurately obtaining the target software package.
[0059] It is understandable that, when each warehouse is managed separately, the client needs to maintain the warehouse address of each software warehouse, and the server needs to maintain the access rights of each software warehouse, so that the client sends a download request to the server based on the warehouse address, and the server performs authentication based on the permission information of the software warehouse corresponding to the warehouse address. Whether it is the client or the server, the maintenance of the software warehouse is relatively complicated because of the need to maintain the relevant information of each software warehouse. In the embodiment of the present application, by configuring the combined warehouse, the client only needs to maintain the warehouse address of the combined warehouse, without having to maintain the warehouse address of each software warehouse in the combined warehouse, thereby greatly reducing the number of warehouse addresses that need to be maintained and reducing the difficulty of maintenance. For the server, it is only necessary to maintain the permission information of the combined warehouse and authenticate access to the combined warehouse, without having to maintain the permission information of each software warehouse in the combined warehouse and authenticate one by one, thereby reducing the number of permission information that needs to be maintained, that is, reducing the difficulty of maintenance, and reducing the number of authentication times, thereby improving the efficiency of authentication.
[0060] To improve target software package matching efficiency, in some implementations, the user-edited target software package information may be the package identifier of the target software package, i.e., the download request includes the package identifier of the target software package. Accordingly, in step S402, matching the target software package from the multiple software repositories according to the priority order of the multiple software repositories in the combined repository may include: for a software repository corresponding to any priority in the priority order, matching the package identifier with the package identifier of at least one software package contained in the software repository; and if a software repository contains a successfully matched package identifier, determining the software package corresponding to the successfully matched package identifier as the target software package.
[0061] In some implementations, the priority order is from high to low. Accordingly, the highest priority may be first determined as the current priority, and the package identifier of the target software package may be matched with the package identifiers of the software packages in the software repository corresponding to the current priority. If a matching package identifier exists in the software repository corresponding to the current priority, the software package corresponding to the matching package identifier is determined as the target software package. If a matching package identifier does not exist in the software repository corresponding to the current priority, the next priority level below the current priority is determined as the current priority, and the package identifier of the target software package may be matched with the package identifiers of the software packages in the software repository corresponding to the current priority until a matching package identifier is obtained, thereby obtaining the target software package.
[0062] Therefore, matching the target software package based on the package identifier and priority order can not only ensure the convenience and orderliness of the matching operation, but also even if different software repositories in the combined repository contain software packages with the same package identifier but different package contents, the correct target software package can be matched according to the priority order, that is, version conflict problems can be avoided.
[0063] Considering that in actual applications, there are software packages with the same name but different versions, based on this, in order to ensure the accuracy of the matched target software package, in some implementations, the package identifier includes the package name and the package version. Accordingly, the aforementioned matching of the package identifier with the package identifier of at least one software package contained in the software repository may include:
[0064] For any software package in at least one software package, if the package name of the software package is consistent with the package name of the target software package and the package version of the software package is consistent with the package version of the target software package, it is determined that the software repository contains a successfully matched package identifier; or, if the package name of the software package is consistent with the package name of the target software package and the package version of the software package is inconsistent with the package version of the target software package, a request failure message is sent to the client; or, if the package name of at least one software package is inconsistent with the package name of the target software package and the package version of at least one software package is inconsistent with the package version of the target software package, it is determined that the software repository does not contain a successfully matched package identifier.
[0065] In some embodiments, for any software package in the software warehouse corresponding to the current priority in the combined warehouse, the package name of the software package is matched with the package name of the target software package; if the package name matching result is consistent, the package version of the software package is matched with the package version of the target software package; if the package version matching result is consistent, it is determined that the software warehouse corresponding to the current priority includes a successfully matched package identifier. If the package version matching result is inconsistent, a request failure message is sent to the client. If the package name matching result is inconsistent and the software warehouse contains an unmatched software package, matching is performed in the above manner for any unmatched software package. If the package name matching result is inconsistent and the software warehouse does not contain an unmatched software package, that is, the package name of each software package in the software warehouse is inconsistent with the package name of the target software package, and the package version of each software package in the software warehouse is inconsistent with the package version of the target software package, it is determined that the software warehouse does not contain a successfully matched package identifier.
[0066] Therefore, only when the matching results of the package name and the package version are consistent, it is determined that the software warehouse contains a package identifier that has been successfully matched, ensuring that the matched target software package is consistent with the expectation, avoiding compatibility issues or security risks caused by version inconsistencies. In the case where the package name is consistent and the package version is inconsistent, by sending a request failure message to the client instead of continuing to match other software packages, not only can the confusion caused by version inconsistencies be avoided, but also the network and computing overhead can be reduced, which is conducive to users correcting problems in a timely manner, such as modifying the version number. When the package name of each software package in the software warehouse is inconsistent with the package name of the target software package, and the package version of each software package in the software warehouse is inconsistent with the package version of the target software package, it is determined that the software warehouse does not contain a package identifier that has been successfully matched, avoiding omissions and ensuring the accuracy of the matching results.
[0067] Furthermore, considering that in actual applications, a user may provide an incorrect package identifier or incorrect software repository information, resulting in a failure to match the target software package in the combined repository, in some implementations, matching the target software package from multiple software repositories according to the priority order of the multiple software repositories in the combined repository may further include: if the software repository does not contain a successfully matched package identifier and there is a next priority in the priority order, matching the target software package from the software repository corresponding to the next priority; or, if the software repository does not contain a successfully matched package identifier and the current priority is the last priority in the priority order, sending a request failure message to the client regarding the download request.
[0068] Specifically, when it is determined that the software warehouse corresponding to the current priority does not contain a successfully matched package identifier, it is determined whether the current priority is the last priority in the priority order; if the current priority is not the last priority in the priority order, it indicates that there is a next priority in the priority order, and the next priority is determined as the current priority, and matching continues; if the current priority is the last priority in the priority order, it is determined that the target software package is not included in the combined warehouse, and a request failure message for the download request is sent to the client.
[0069] For example, the combined warehouse includes a private type software warehouse 1, a private type software warehouse 2 and an agent type software warehouse 3, and the priority order is software warehouse 1 priority > software warehouse 2 priority > software warehouse 3 priority. Figure 5As shown, the above matching process may include: determining whether software warehouse 1 contains a software package with the same package name as the target software package; if software warehouse 1 contains a software package with the same package name, determining whether the package version of the software package is consistent with the package version of the target software package; if the package versions are consistent, determining the software package as the target software package, i.e., software warehouse 1 contains the target software package; if the package versions are inconsistent, sending a request failure message to the client. If software warehouse 1 does not contain a software package with the same package name, since there is a next priority in the priority order, determining whether software warehouse 2 of the next priority contains a software package with the same package name as the target software package; if software warehouse 2 contains a software package with the same package name, determining whether the package version of the software package is consistent with the package version of the target software package; if the package versions are consistent, determining the software package as the target software package, i.e., software warehouse 2 contains the target software package; if the package versions are inconsistent, sending a request failure message for the download request to the client. If software warehouse 2 does not contain a software package with the same package name, since there is a next priority in the priority order, it is determined whether software warehouse 3 of the next priority contains a software package with the same package name as the target software package. If software warehouse 3 contains a software package with the same package name, it is determined whether the package version of the software package is consistent with the package version of the target software package. If the package versions are consistent, the software package is determined to be the target software package, that is, the target software package is included in software warehouse 3. If the package versions are inconsistent, a request failure message is sent to the client for the download request. If software warehouse 3 does not contain a software package with the same package name, since software warehouse 3 has the last priority in the priority order, it is determined that the target software package is not included in the combined warehouse, and a request failure message is sent to the client for the download request.
[0070] This ensures that matching is done in order of priority across the corresponding software repositories, ensuring a consistent and orderly matching process and avoiding version conflicts. If the target software package is not included in the combined repository, a request failure message is sent to the client, enabling the client to promptly adjust the target software package information.
[0071] As previously mentioned, users can also operate the management application in their client to create or update a software repository. Accordingly, the method can also include: responding to a repository creation request for a target software repository, creating the target software repository, configuring properties of the target software repository, and, if the target software repository is a composite repository, adding the target software repository to the corresponding composite repository and configuring a priority for the target software repository.
[0072] And / or, in response to a warehouse update request for a target software warehouse, the software packages to be stored are stored in the target software warehouse, or the software packages to be deleted are deleted from the target software warehouse, or if the target software warehouse is of a private type, the software packages in the target software warehouse are migrated to a new software warehouse, or if the target software warehouse is of a proxy type and the software packages in the target software warehouse are changed, the software inventory of the target software warehouse is updated.
[0073] The target software warehouse can be the software warehouse where the aforementioned target software package is located, or it can be another software warehouse. Specifically, when a user needs to create a software warehouse, he can operate the warehouse management module of the management application in the client to edit the creation information of the target software warehouse to be created. The creation information may include the attributes of the target software warehouse. When the target software warehouse belongs to a certain combination warehouse, the creation information may also include the warehouse identifier of the combination warehouse and the priority of the target software warehouse in the combination warehouse. After the creation information is edited, a warehouse creation request is input. The client sends the warehouse creation request to the server. In response to the warehouse creation request, the server calls the warehouse creation interface or runs the warehouse creation command according to the creation information in the warehouse creation request to create the target software warehouse, configure the attributes of the target software warehouse, and when the creation information includes the warehouse identifier of the combination warehouse and the priority of the target software warehouse, that is, when the target software warehouse belongs to a combination warehouse, add the target software warehouse to the combination warehouse corresponding to the warehouse identifier and configure the priority of the target software warehouse. The attributes of the target software warehouse may include the warehouse type.
[0074] In the case where the warehouse type is private, configuring the properties of the target software warehouse may include: configuring the type of the target software warehouse to be private, configuring the environment and read-write status of the target software warehouse. In some embodiments, in the case where the environment to which the target software warehouse belongs is a development environment, the read-write status of the target software warehouse may be configured to be editable, that is, the software packages in the target software warehouse may be further modified. In the case where the environment to which the target software warehouse belongs is a pre-release environment or a release environment, the read-write status of the target software warehouse may be configured to be read-only, that is, the software packages in the target software warehouse are not allowed to be further modified to ensure the availability of the software packages. In some embodiments, the software packages in a software warehouse whose environment is a development environment may be software packages in the R&D stage, which require multiple debugging. The software packages in a software warehouse whose environment is a development environment may be software packages that are ready to be released after debugging. The software packages in a software warehouse whose environment is a release environment may be released software packages.
[0075] If the repository type is a proxy, it is understood that the software packages in the target software repository are actually cached packages, and the original packages are located on the associated website. Therefore, in this case, configuring the properties of the target software repository may include configuring proxy repository login information, configuring cache parameters, creating a software inventory, etc. Caching parameters include whether to enable the cache function and the cache duration threshold. Accordingly, the method may also include deleting any software package in the proxy software repository if it is determined that the cache duration of the software package has reached the cache duration threshold.
[0076] Furthermore, after creating a target software repository, if the user has an update requirement for the target software repository, he or she can send a repository update request to the server through his or her client. The repository update request may include at least one of an upload request, a download request, a migration request, and a repository deletion request.
[0077] Specifically, when a user needs to upload a software package to a target software repository, they can use the software package management module in their client application to upload the software package, edit the repository identifier of the target software repository for storing the software package, and then send an upload request to the server. In response to the upload request, the server determines the target software repository based on the repository identifier and saves the software package to the target software repository.
[0078] Furthermore, when the target software warehouse is of a proxy type, in order to facilitate the management of software packages in the target software warehouse, in some embodiments, the server responds to the upload request, saves the software package to be stored in the corresponding target software warehouse, and can also add the package identifier and source information of the software package to the software list of the target software warehouse.
[0079] Furthermore, before the server saves the software package to be stored in the corresponding target software warehouse, it may also include: determining whether the client has software upload permission to the target software warehouse, and if the client has software upload permission to the target software warehouse, saving the software package to be stored in the corresponding target software warehouse. This upload permission verification ensures the security of the target software warehouse.
[0080] When a user needs to delete a software package in a target software warehouse (i.e., remove the package from the shelf), he or she can operate the software package management module of the management application in the client, edit the package identifier of the software package to be deleted, and send a deletion request to the server. Accordingly, the server, in response to the deletion request, determines the target software warehouse where the software package to be deleted is located, and deletes the software package to be deleted from the target software warehouse. In addition, if the type of the target software warehouse is a proxy type, the software package to be deleted is cleared from the software warehouse. Determining the target software warehouse where the software package to be deleted is located may include: determining the software warehouse corresponding to the warehouse identifier in the deletion request as the target software warehouse; or matching the target software warehouse where the software package to be deleted is located according to the package identifier in the deletion request.
[0081] That is, when the target software repository is of the proxy type, a change to a software package in the target software repository may involve the storage of a new software package (i.e., a new software package) in the target software repository. Accordingly, updating the target software repository's software inventory may involve adding the package identifier and source information of the new software package to the target software repository's software inventory. A change to a software package in the target software repository may also involve the removal of a new software package from the target software repository. Accordingly, updating the target software repository's software inventory may involve removing the package identifier and source information of the new software package from the inventory.
[0082] After a user has successfully debugged any software package in a target software warehouse (i.e., a private type) whose environment is a development environment, and wants to migrate the software package to a new software warehouse whose environment is a pre-release environment, or if a user wants to migrate any software package in a target software warehouse whose environment is a pre-release environment to a new software warehouse whose environment is a release environment in order to release the software package, the user can operate the software package management module of the management application in the client, edit the package identifier of the software package to be migrated and the warehouse identifier of the new software warehouse, and send a migration request to the server. Accordingly, the server determines the target software warehouse and the new software warehouse where the software package to be migrated is located in response to the migration request, and migrates the software package to be migrated from the target software warehouse to the new software warehouse. Specifically, when the environment to which the new software warehouse belongs is a release environment, migrating the software package to be migrated to the new software warehouse indicates that the software package is on the shelf and can be used by other users.
[0083] Furthermore, when the user no longer needs the target software warehouse, they can also operate the management application to send a warehouse deletion request for the target software warehouse to the server. In response, the server obtains the warehouse information (such as the warehouse URL) from the warehouse deletion request and deletes the target software warehouse corresponding to the warehouse information.
[0084] That is, the server-side management method for private software warehouses is different from the management method for proxy software warehouses, such as Figure 6 As shown, private software repository management can include repository lifecycle management and package management. Lifecycle management includes creating a software repository, configuring repository properties, and deleting a repository. Package management includes uploading private software packages, deleting them (i.e., removing them from the repository), and migrating them (including adding them to the repository). Private software packages can include wheel packages and source code packages. Wheel packages are a binary distribution format for Python (an assembly language), often available as .whl files, and are used for quick installation of Python libraries. Source distributions (sdist) are the raw code distribution format for Python libraries, typically available as .tar, .gz, or .zip files. They contain the complete source code, resource files, and metadata of the library and require local compilation or interpretation by the user.
[0085] like Figure 7 As shown, software repository management for proxy-type applications can include lifecycle management, cache management, and inventory management. Lifecycle management includes creating a software repository, configuring repository login information, and deleting a repository. Cache management includes enabling the cache function and configuring cache parameters. Inventory management includes creating and updating inventories, and generating download records for software packages in the inventories.
[0086] It is understandable that Figure 6 and Figure 7 For illustration only and not for limitation. Figure 6 and Figure 7 For detailed implementation of each management link shown, please refer to the relevant description above.
[0087] Therefore, the server performs corresponding processing in response to the warehouse creation request for the target software warehouse, and performs corresponding processing in response to the warehouse update request for the target software warehouse, which meets the user's diverse management needs for software warehouses and realizes comprehensive and efficient management of software warehouses.
[0088] Furthermore, considering that in actual applications, the software warehouse may be inaccessible due to network factors and other reasons, based on this, in some implementations, such as Figure 6 and Figure 7As shown, software repository lifecycle management can also include health monitoring. Specifically, the method further includes: monitoring the health status of any software repository according to a monitoring cycle corresponding to the software repository; and if the health status indicates that the software repository is unhealthy, adding a preset flag to the software repository, wherein the preset flag is used to indicate that the software repository is inaccessible.
[0089] Specifically, for any software warehouse, a detection instruction is sent to the software warehouse based on the warehouse address of the software warehouse according to the detection cycle of the software warehouse, and the health status of the software warehouse is determined based on the received response data. In addition, when the health status indicates that the software warehouse is unhealthy, a preset mark is added to the software warehouse, so that when it is necessary to match the target software package from the warehouse combination containing the software warehouse, the software warehouse is skipped, that is, the target software package is matched from the multiple software warehouses in a healthy state according to the priority order of the multiple software warehouses in the warehouse combination. The specific content of the response data can be set as needed in actual application. For example, when the response data is 00, it indicates that the software warehouse is in a healthy state, that is, an accessible state; when the response data is 11, it indicates that the software warehouse is in an unhealthy state, that is, an inaccessible state. It should be noted that the detection cycle of each software warehouse can be uniformly preset or specified by the user when creating the software warehouse.
[0090] Therefore, by detecting the health status of the software warehouse, it is possible to promptly discover the software warehouse that is in an inaccessible state and repair it in a timely manner, thereby providing access services to users.
[0091] Taking into account that in actual applications, different users have different responsibilities in the enterprise and different access rights to the software warehouse, based on this, in some implementations, the method may also include: in response to a user management request for a target user, performing configuration operations on the attributes of the target user, wherein the attributes of the target user include at least one of the role of the target user, the permissions of the target user, and the user group to which the target user belongs. The role is used to characterize the identity of the target user, and the permissions are used to characterize the operating scope of the target user. Any user group includes at least one user.
[0092] In some embodiments, the user management module includes a permissions configuration function. An administrator can pre-grant user management permissions to certain users (e.g., department managers, project managers, team leaders, etc.). When a user with user management permissions wishes to manage other users in a project team or department, they can operate the user management module in the management application on the terminal device to edit the target user's attributes and enter user management instructions through the user management interface. In response to the user management instruction, the client sends a user management request to the server based on the target user's attributes. Accordingly, the server responds to the user management request and configures at least one of the target user's role, permissions, and user group to which the target user belongs, based on the target user's attributes included in the user management request. The user role represents the target user's identity (or level) and can include standard users, advanced users, and other roles. Users with different roles can have different permissions. Permissions restrict the scope of operations, for example, whether a user can create or update a software repository, which interfaces a user can call, and which interfaces a user can access. User groups can be groups such as project teams and departments, and each user group includes at least one user. User management requests can be used to request to add a target user or to request to change the attributes of an already added target user.
[0093] Therefore, by configuring the user's role, permissions, user group, etc., not only effective user management is achieved, but also orderly access to the software warehouse is guaranteed.
[0094] Corresponding to the application scenarios and methods of the methods provided in the above embodiments of the present application, the embodiments of the present application also provide a software warehouse management method, which can be applied to Figure 1 The client shown, such as Figure 8 As shown, the method includes the following steps S801 and S802.
[0095] Step S801: In response to a download instruction for a target software package, a download request is sent to a server, where the download request is used to request downloading of the target software package.
[0096] Step S802: Receive a target software package sent by the server, wherein the target software package is matched by the server from multiple software repositories in the combined repository in response to the target software package being located in the combined repository, according to the priority order of the multiple software repositories in the combined repository, the multiple software repositories being associated with each other, and any software repository including at least one software package.
[0097] The specific implementation of step S801 and step S802 can be found in the relevant description above, and the repeated parts will not be repeated here.
[0098] In the software repository management method provided in the embodiments of the present application, by setting up a combined repository, it is sufficient to maintain the combined repository, without having to maintain each software repository within the combined repository one by one, thereby reducing the complexity of repository maintenance. By setting the priorities of multiple software repositories within the combined repository, the target software packages required for download by the client can be matched from these multiple repositories according to the priorities, ensuring the orderliness of the matching process and avoiding version conflicts and other issues within the combined repository.
[0099] Corresponding to the application scenario and method of the method provided in the embodiment of the present application, the embodiment of the present application also provides a software warehouse management device, which can be applied to Figure 1 The server shown, such as Figure 9 As shown, the device includes:
[0100] The receiving module 901 is configured to receive a download request sent by a client, wherein the download request is used to request downloading of a target software package.
[0101] The matching module 902 is configured to match the target software package from multiple software repositories in the combined repository in response to the target software package being located in the combined repository, according to the priority order of the multiple software repositories in the combined repository, wherein the multiple software repositories are associated with each other and any software repositories includes at least one software package.
[0102] The sending module 903 is configured to send the target software package to the client.
[0103] In some embodiments, the download request includes the package identifier of the target software package, and the matching module 902 is specifically used to: for a software warehouse corresponding to any priority in the priority order, match the package identifier of the target software package with the package identifier of at least one software package contained in the software warehouse; if the software warehouse contains a successfully matched package identifier, determine the software package corresponding to the successfully matched package identifier as the target software package.
[0104] In some embodiments, the package identifier includes a package name and a package version, and the matching module 902 is further specifically configured to: for any software package among the at least one software package, if the package name of the software package is consistent with the package name of the target software package and the package version of the software package is consistent with the package version of the target software package, determine that the software repository contains a successfully matched package identifier; or, if the package name of the software package is consistent with the package name of the target software package and the package version of the software package is inconsistent with the package version of the target software package, send a request failure message to the client; or, if the package name of the at least one software package is inconsistent with the package name of the target software package and the package version of the at least one software package is inconsistent with the package version of the target software package, determine that the software repository does not contain a successfully matched package identifier.
[0105] In some embodiments, the matching module 902 is further used to: match the target software package from the software warehouse corresponding to the next priority when the software warehouse does not contain a successfully matched package identifier and there is a next priority in the priority order; or, send a request failure message for the download request to the client when the software warehouse does not contain a successfully matched package identifier and the current priority is the last priority in the priority order.
[0106] In some embodiments, the multiple software warehouses include private-type software warehouses and proxy-type software warehouses, the priority of the private-type software warehouse is higher than the priority of the proxy-type software warehouse, the private-type software warehouse is used to store customized software packages, and the proxy-type software warehouse is used to store software packages downloaded from associated websites.
[0107] In some embodiments, the download request includes a client identifier of the client, and the matching module 902 is specifically used to: query the permission information of the client based on the client identifier; and when the permission information indicates that the client has the software download permission of the combined warehouse, obtain the target software package from the multiple software warehouses in the combined warehouse according to the priority order of the multiple software warehouses.
[0108] In some embodiments, the download request includes the warehouse address corresponding to the target software package, and the device also includes a determination module for obtaining the target warehouse identifier associated with the warehouse address corresponding to the target software package from the association relationship between the warehouse address and the warehouse identifier; when there are multiple target warehouse identifiers, determining that the target software package is located in a combined warehouse.
[0109] In some embodiments, the device also includes a warehouse management module for creating the target software warehouse in response to a warehouse creation request for the target software warehouse, configuring the properties of the target software warehouse, and, if the target software warehouse belongs to a combined warehouse, adding the target software warehouse to the corresponding combined warehouse and configuring the priority of the target software warehouse; and / or, in response to a warehouse update request for the target software warehouse, storing the software packages to be stored in the target software warehouse, or deleting the software packages to be deleted from the target software warehouse, or, if the type of the target software warehouse is a private type, migrating the software packages to be migrated in the target software warehouse to a new software warehouse, or, if the type of the target software warehouse is a proxy type and the software packages in the target software warehouse are changed, updating the software inventory of the target software warehouse.
[0110] In some embodiments, the device also includes a user management module for performing configuration operations on the attributes of the target user in response to a user management request for the target user, wherein the attributes of the target user include at least one of the role of the target user, the permissions of the target user, and the user group to which the target user belongs. The role is used to characterize the identity of the target user, and the permissions are used to characterize the operating scope of the target user. Any user group includes at least one user.
[0111] In some embodiments, the device also includes a detection module for detecting the health status of any software warehouse according to the detection cycle corresponding to the software warehouse; when the health status indicates that the software warehouse is unhealthy, adding a preset mark to the software warehouse, wherein the preset mark is used to indicate that the software warehouse is inaccessible.
[0112] The functions of each module in each device in the embodiments of the present application can be found in the corresponding description in the above method, and have corresponding beneficial effects, which will not be repeated here.
[0113] Corresponding to the application scenario and method of the method provided in the embodiment of the present application, the embodiment of the present application also provides a software warehouse management device, which can be applied to Figure 1 The client shown, such as Figure 10 As shown, the device includes:
[0114] The sending module 1001 is configured to send a download request to a server in response to a download instruction for a target software package, wherein the download request is used to request downloading of the target software package.
[0115] The receiving module 1002 is configured to receive the target software package sent by the server, wherein the target software package is matched by the server from multiple software repositories in the combined repository in accordance with the priority order of the multiple software repositories in the combined repository in response to the target software package being located in the combined repository, wherein the multiple software repositories are associated with each other, and any software repository includes at least one software package.
[0116] The functions of each module in each device of the embodiment of the present application can be referred to the corresponding description in the above method, and have corresponding beneficial effects, which will not be repeated here. In addition, the device embodiments described above are merely schematic, wherein the modules described as separate components may or may not be physically separated, and the components illustrated as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application solution.
[0117] Figure 11 FIG. 1 is a block diagram of an electronic device for implementing an embodiment of the present application. Figure 11 As shown, the electronic device includes: a memory 1101 and a processor 1102. The memory 1101 stores a computer program that can be executed on the processor 1102. When the processor 1102 executes the computer program, the method of the above embodiment is implemented. The number of memory 1101 and processor 1102 can be one or more. In a specific implementation, the electronic device may also include a communication interface 1103 for communicating with external devices and exchanging data.
[0118] In a specific implementation, if the memory 1101, processor 1102, and communication interface 1103 are implemented independently, the memory 1101, processor 1102, and communication interface 1103 can be connected to each other via a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 11 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0119] Optionally, in a specific implementation, if the memory 1101 , the processor 1102 , and the communication interface 1103 are integrated on a chip, the memory 1101 , the processor 1102 , and the communication interface 1103 may communicate with each other through an internal interface.
[0120] An embodiment of the present application provides a computer-readable storage medium storing a computer program, which implements the method provided in the embodiment of the present application when the program is executed by a processor.
[0121] An embodiment of the present application provides a computer program product, including a computer program, which implements the method provided in the embodiment of the present application when executed by a processor.
[0122] An embodiment of the present application also provides a chip, which includes a processor for calling and executing instructions stored in the memory from the memory, so that a communication device equipped with the chip executes the method provided in the embodiment of the present application.
[0123] An embodiment of the present application also provides a chip, including: an input interface, an output interface, a processor and a memory. The input interface, the output interface, the processor and the memory are connected through an internal connection path. The processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the method provided in the embodiment of the application.
[0124] It should be understood that the processor described above may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor. It is worth noting that the processor may be a processor that supports the Advanced RISC Machines (ARM) architecture.
[0125] Furthermore, optionally, the aforementioned memory may include read-only memory and random access memory. The memory may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory may include read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which serves as an external cache memory. By way of example and not limitation, many forms of RAM are available. For example, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM) and direct memory bus random access memory (DR RAM).
[0126] In the above embodiments, all or part of the embodiments may be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another.
[0127] In the description of this specification, the reference terms "one embodiment," "some embodiments," "example," "specific example," or "some examples" mean that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials, or characteristics described may be combined in any appropriate manner in any one or more embodiments or examples. In addition, those skilled in the art may combine and integrate different embodiments or examples described in this specification, as well as features of different embodiments or examples, unless they are mutually inconsistent.
[0128] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. Throughout the description of this application, "plurality" means two or more, unless otherwise specifically defined.
[0129] Any process or method described in the flowchart or otherwise described herein can be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a specific logical function or process. The scope of the preferred embodiments of the present application includes other implementations in which the functions may be performed in a different order than shown or discussed, including performing the functions substantially simultaneously or in reverse order depending on the functions involved.
[0130] The logic and / or steps described in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, apparatus or device (such as a computer-based system, a system including a processor, or other system that can fetch instructions from and execute instructions on an instruction execution system, apparatus or device), or used in conjunction with such instruction execution systems, apparatuses or devices.
[0131] It should be understood that various parts of the present application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the above embodiment method can be completed by instructing the relevant hardware through a program, which can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.
[0132] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing module, or each unit may exist physically separately, or two or more units may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or in the form of software functional modules. If the aforementioned integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may also be stored in a computer-readable storage medium. The storage medium may be a read-only memory, a magnetic disk, or an optical disk, etc.
[0133] The above is merely an exemplary embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various modifications or substitutions within the technical scope described in this application, and such modifications or substitutions should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A software warehouse management method, the method comprising: Receive a download request sent by a client, wherein the download request is used to request downloading a target software package, and the download request includes a package identifier of the target software package, wherein the package identifier includes a package name and a package version; In response to a target software package being located in a combined warehouse, for a software warehouse corresponding to any priority in a priority order of multiple software warehouses in the combined warehouse, matching the package identifier of the target software package with the package identifier of at least one software package contained in the software warehouse, wherein the multiple software warehouses include a private type software warehouse and a proxy type software warehouse, the priority of the private type software warehouse being higher than the priority of the proxy type software warehouse, the private type software warehouse being used to store customized software packages, and the proxy type software warehouse being used to store downloaded software packages; the multiple software warehouses are associated, each software warehouse includes at least one software package, and the multiple software warehouses include software packages having the same package identifier but different package contents; For any software package among the at least one software package, if the package name of the software package is consistent with the package name of the target software package and the package version of the software package is consistent with the package version of the target software package, determining that the software repository contains a successfully matched package identifier, determining the software package corresponding to the successfully matched package identifier as the target software package, and sending the target software package to the client; If a package name of any one of the at least one software package is consistent with a package name of the target software package and a package version of the software package is inconsistent with a package version of the target software package, sending a request failure message to the client; If the package name of the at least one software package is inconsistent with the package name of the target software package, and the package version of the at least one software package is inconsistent with the package version of the target software package, determining that the software warehouse does not include a successfully matched package identifier; If the software warehouse does not contain a successfully matched package identifier and there is a next priority in the priority order, matching the target software package from the software warehouse corresponding to the next priority, and sending the target software package to the client; And, in response to a warehouse update request for a target software warehouse, the software packages to be stored are stored in the target software warehouse, or the software packages to be deleted are deleted from the target software warehouse, or, if the type of the target software warehouse is a private type, the software packages to be migrated in the target software warehouse are migrated to a new software warehouse, or, if the type of the target software warehouse is a proxy type and the software packages in the target software warehouse are changed, the software inventory of the target software warehouse is updated.
2. The method according to claim 1, wherein The method further comprises: In a case where the software warehouse does not include a successfully matched package identifier and the current priority is the last priority in the priority sequence, request failure information for the download request is sent to the client.
3. The method according to claim 1, wherein The download request includes a client identifier of the client, and in response to the target software package being located after the combined repository, the method further includes: Querying the permission information of the client according to the client identifier; In a case where the permission information indicates that the client has the software download permission of the combined repository, a package identifier is matched in the software repository.
4. The method according to claim 1, wherein The download request includes the warehouse address corresponding to the target software package, and the method further includes: Obtaining the target warehouse identifier associated with the warehouse address corresponding to the target software package from the association relationship between the warehouse address and the warehouse identifier; In the case that there are multiple target warehouse identifiers, it is determined that the target software package is located in a combined warehouse.
5. The method according to claim 1 or 3, wherein: The method further comprises: In response to a warehouse creation request for a target software warehouse, the target software warehouse is created, properties of the target software warehouse are configured, and, if the target software warehouse belongs to a combined warehouse, the target software warehouse is added to the corresponding combined warehouse and a priority of the target software warehouse is configured.
6. The method according to claim 1 or 3, wherein: The method further comprises: In response to a user management request for a target user, a configuration operation is performed on the attributes of the target user, wherein the attributes of the target user include at least one of the role of the target user, the permissions of the target user, and the user group to which the target user belongs. The role is used to characterize the identity of the target user, and the permissions are used to characterize the operating scope of the target user. Any user group includes at least one user.
7. The method according to claim 1 or 3, wherein: The method further comprises: For any software warehouse, detecting the health status of the software warehouse according to the detection cycle corresponding to the software warehouse; In a case where the health status indicates that the software warehouse is unhealthy, a preset mark is added to the software warehouse, wherein the preset mark is used to indicate that the software warehouse is inaccessible.
8. A software warehouse management method, the method comprising: In response to a download instruction for a target software package, sending a download request to a server, wherein the download request is used to request downloading the target software package, and the download request includes a package identifier of the target software package, wherein the package identifier includes a package name and a package version; Receive the target software package or request failure information sent by the server, wherein the target software package is obtained by the server in response to the target software package being located in the combined warehouse, matching the package identifier of the target software package with the package identifier of at least one software package contained in the software warehouse in a priority order of multiple software warehouses in the combined warehouse, and when the software warehouse contains a successfully matched package identifier; or, when the software warehouse does not contain a successfully matched package identifier and there is a next priority in the priority order, matching the target software package from the software warehouse corresponding to the next priority; the request failure information The sending is performed when the package name of any software package in the software warehouse corresponding to any of the priorities is consistent with the package name of the target software package, and the package version of the software package is inconsistent with the package version of the target software package, the multiple software warehouses include private type software warehouses and proxy type software warehouses, the priority of the private type software warehouse is higher than the priority of the proxy type software warehouse, the private type software warehouse is used to store customized software packages, and the proxy type software warehouse is used to store downloaded software packages; the multiple software warehouses are associated, any software warehouse includes at least one software package, and the multiple software warehouses include software packages with the same package identifier but different package contents; In response to an update operation on a target software warehouse, a warehouse update request is sent to the server, wherein the update request is used to request the server to store the software package to be stored in the target software warehouse, or to delete the software package to be deleted from the target software warehouse, or, if the type of the target software warehouse is a private type, to migrate the software package to be migrated in the target software warehouse to a new software warehouse, or, if the type of the target software warehouse is a proxy type and the software package in the target software warehouse is changed, to update the software inventory of the target software warehouse.
9. A software warehouse management system, comprising: The client is configured to send a download request to the server in response to a download instruction for the target software, and receive the target software or request failure information sent by the server; and, in response to an update operation on the target software warehouse, sending a warehouse update request to the server; The server is configured to, upon determining, based on the download request, that a target software package to be downloaded is located in a combined repository, match, for a software repository corresponding to any priority in a priority order of multiple software repositories in the combined repository, a package identifier of the target software package with a package identifier of at least one software package contained in the software repository; for any software package in the at least one software package, if the package name of the software package is consistent with the package name of the target software package and the package version of the software package is consistent with the package version of the target software package, determine that the software repository contains a successfully matched package identifier, determine the software package corresponding to the successfully matched package identifier as the target software package, and send the target software package to the client; If a package name of any one of the at least one software package is consistent with a package name of the target software package and a package version of the software package is inconsistent with a package version of the target software package, sending a request failure message to the client; If the package name of the at least one software package is inconsistent with the package name of the target software package, and the package version of the at least one software package is inconsistent with the package version of the target software package, determining that the software warehouse does not include a successfully matched package identifier; If the software warehouse does not contain a successfully matched package identifier and there is a next priority in the priority order, matching the target software package from the software warehouse corresponding to the next priority, and sending the target software package to the client; And, in response to a warehouse update request for a target software warehouse, the software package to be stored is stored in the target software warehouse, or the software package to be deleted is deleted from the target software warehouse, or, in a case where the type of the target software warehouse is a private type, the software package to be migrated in the target software warehouse is migrated to a new software warehouse, or, in a case where the type of the target software warehouse is a proxy type and the software package in the target software warehouse is changed, the software inventory of the target software warehouse is updated; the multiple software warehouses include private type software warehouses and proxy type software warehouses, the priority of the private type software warehouse is higher than the priority of the proxy type software warehouse, the private type software warehouse is used to store customized software packages, and the proxy type software warehouse is used to store downloaded software packages, and the multiple software warehouses include software packages with the same package identifier and different package contents.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory, wherein the processor implements the method according to any one of claims 1 to 8 when executing the computer program.
11. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
12. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Installation package detection method and device, equipment, and medium
CN113722704A
Software package installation method and device, computing equipment and readable storage medium
CN115576570A
Software management method and device based on target script, equipment and storage medium
CN119938127A