[go: up one dir, main page]

CN114448958A - Resource pool software downloading method and device and server - Google Patents

Resource pool software downloading method and device and server Download PDF

Info

Publication number
CN114448958A
CN114448958A CN202111599947.5A CN202111599947A CN114448958A CN 114448958 A CN114448958 A CN 114448958A CN 202111599947 A CN202111599947 A CN 202111599947A CN 114448958 A CN114448958 A CN 114448958A
Authority
CN
China
Prior art keywords
software
resource
resource pool
request
host
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111599947.5A
Other languages
Chinese (zh)
Inventor
姜少涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Cloud Technology Co Ltd
Original Assignee
China Telecom Cloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Cloud Technology Co Ltd filed Critical China Telecom Cloud Technology Co Ltd
Priority to CN202111599947.5A priority Critical patent/CN114448958A/en
Publication of CN114448958A publication Critical patent/CN114448958A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a resource pool software downloading method, a device and a server, wherein the resource pool software downloading method comprises the following steps: when a software request sent by a host is received, judging whether software resources corresponding to the software request exist in a resource pool agent or not; when the software resource corresponding to the software request does not exist in the resource pool agent, sending a request message of the software resource; and receiving yum the software resource fed back by the source, sending the fed back software resource to the host and storing the software resource to the resource pool agent. Therefore, the resource request of the host machine can be processed in a resource pool proxy mode, the software resource requested by the host machine only needs to be downloaded in the resource pool proxy, the software resource can be downloaded according to the requirement, the synchronous operation of each yum source mirror image is not needed, the redundant operation of creating the mirror image is reduced, namely, the resource cache can be established through the resource pool proxy, the capacity management is carried out on the resource pool, and the maximum sharing, the most efficient utilization and the most cost saving of the resource pool are realized.

Description

一种资源池软件下载方法、装置及服务器A resource pool software downloading method, device and server

技术领域technical field

本发明涉及云计算技术领域,具体涉及一种资源池软件下载方法、装置及服务器。The invention relates to the technical field of cloud computing, in particular to a method, device and server for downloading resource pool software.

背景技术Background technique

在云计算体系中,存储与计算资源集中放在公共的云资源池中,云资源池(也可称为资源池)可以将资源分散到不同地理位置的多个数据中心。现有的云资源池管理方式是集中管理yum源,在其中为每个云资源池创建完整镜像。具体的,yum源服务部署方案如附图1所示,在图1中,访问层为资源池宿主机(也可以称为宿主机),代理层为资源池代理,每个资源池部署一个,其为yum源访问入口;访问层和存储层共同构成yum源,在yum源可以为多机群设置,例如在每个yum服务器中存储不同版本的软件资源。In a cloud computing system, storage and computing resources are centralized in a public cloud resource pool, and the cloud resource pool (also referred to as a resource pool) can distribute resources to multiple data centers in different geographic locations. The existing cloud resource pool management method is to centrally manage the yum source, in which a complete image is created for each cloud resource pool. Specifically, the yum source service deployment scheme is shown in Figure 1. In Figure 1, the access layer is the resource pool host (also referred to as the host), the agent layer is the resource pool agent, and each resource pool is deployed with one, It is the access entry of the yum source; the access layer and the storage layer together constitute the yum source, and the yum source can be set for multiple clusters, for example, different versions of software resources are stored in each yum server.

云计算作为一种封闭场景式的应用,每个云资源池更新的内容是少量且较为固定的,与此同时,每个云资源池并不是使用全部的软件,公有云场景下,每个云资源池常用的软件更新只有少数,所以创建镜像存在大量冗余。Cloud computing is a closed-scenario application. The updated content of each cloud resource pool is small and relatively fixed. At the same time, each cloud resource pool does not use all software. In the public cloud scenario, each cloud There are only a few software updates commonly used in resource pools, so there is a lot of redundancy in creating mirrors.

发明内容SUMMARY OF THE INVENTION

有鉴于此,本发明实施例提供了一种资源池软件下载方法、装置及服务器,以解决为每个云资源池创建完整镜像存在冗余的问题。In view of this, embodiments of the present invention provide a resource pool software downloading method, device, and server to solve the problem of redundancy in creating a complete image for each cloud resource pool.

根据第一方面,本发明实施例提供了一种资源池软件下载方法,包括以下步骤:当接收到主机发送的软件请求时,判断资源池代理中是否存在与所述软件请求相对应的软件资源;当所述资源池代理中不存在与所述软件请求相对应的软件资源时,发送所述软件资源的请求消息;接收yum源反馈的所述软件资源,将反馈的所述软件资源发送至所述主机并保存至所述资源池代理。According to a first aspect, an embodiment of the present invention provides a method for downloading software in a resource pool, including the following steps: when a software request sent by a host is received, determining whether there is a software resource corresponding to the software request in the resource pool agent ; When there is no software resource corresponding to the software request in the resource pool agent, send the request message of the software resource; Receive the software resource fed back by the yum source, and send the software resource fed back to the host and save to the resource pool agent.

本发明实施例1提供的资源池软件下载方法,通过资源池代理的方式处理宿主机的资源请求,只需在资源池代理中下载宿主机请求的软件资源,实现软件资源的按需下载,由此不再需要进行每个yum源镜像的同步操作,减少创建镜像的冗余操作,同时可以有效的处理宿主机的请求,即通过资源池代理可以建立资源缓存,对资源池进行容量管理,实现资源池的最大化共享、最高效的利用、最节约成本。The resource pool software download method provided in Embodiment 1 of the present invention processes the resource request of the host by means of a resource pool proxy, and only needs to download the software resources requested by the host in the resource pool proxy, so as to realize the on-demand downloading of software resources, by This eliminates the need to synchronize each yum source image, reduces redundant operations for creating images, and can effectively handle requests from the host. The maximum sharing of resource pools, the most efficient utilization, and the most cost-saving.

结合第一方面,在第一方面第一实施方式中,资源池软件下载方法还包括:当所述资源池代理中存在与所述软件请求相对应的软件资源时,将所述资源池代理中的所述软件资源发送至所述主机。With reference to the first aspect, in the first embodiment of the first aspect, the method for downloading software in a resource pool further includes: when there is a software resource corresponding to the software request in the resource pool agent, downloading the resource pool agent into the resource pool agent. of the software resource to the host.

结合第一方面第一实时方式,在第一方面第二实施方式中,所述软件请求中包括请求版本信息,在将所述资源池代理中的所述软件资源发送至所述主机之前,还包括:获取所述资源池代理中的所述软件资源的保存版本信息;根据所述请求版本信息和所述保存版本信息,判断所述软件资源的保存版本是否低于请求版本;当所述保存版本低于所述请求版本时,发送所述软件资源的请求消息;接收yum源反馈的所述请求版本的所述软件资源,将所述请求版本的所述软件资源发送至所述主机并保存至所述资源池代理。With reference to the first real-time manner of the first aspect, in the second implementation manner of the first aspect, the software request includes request version information, and before sending the software resource in the resource pool agent to the host, further Including: obtaining the saved version information of the software resource in the resource pool agent; according to the requested version information and the saved version information, judging whether the saved version of the software resource is lower than the requested version; When the version is lower than the requested version, send a request message of the software resource; receive the software resource of the requested version fed back by the yum source, send the software resource of the requested version to the host and save it to the resource pool agent.

结合第一方面第二实施方式,在第一方面第三实施方式中,在将所述请求版本的所述软件资源发送至所述主机并保存至所述资源池代理之后,还包括:删除所述资源池代理中所述保存版本的所述软件资源。With reference to the second embodiment of the first aspect, in the third embodiment of the first aspect, after the software resource of the requested version is sent to the host and saved to the resource pool agent, the method further includes: deleting all the software resources the software resource of the saved version in the resource pool agent.

结合第一方面,在第一方面第四实施方式中,所述将所述软件资源保存至所述资源池代理包括:判断所述资源池代理是否已满;当所述资源池代理已满时,利用LRU算法将所述软件资源保存至所述资源池代理。With reference to the first aspect, in a fourth implementation manner of the first aspect, the saving the software resource to the resource pool agent includes: judging whether the resource pool agent is full; when the resource pool agent is full , using the LRU algorithm to save the software resource to the resource pool agent.

结合第一方面第四实施方式,在第一方面第五实施方式中,资源池软件下载方法还包括:当所述资源池代理未满时,将所述软件资源保存至所述资源池代理的空闲池中。With reference to the fourth implementation manner of the first aspect, in the fifth implementation manner of the first aspect, the method for downloading software in a resource pool further includes: when the resource pool agent is not full, saving the software resource to a database of the resource pool agent in the free pool.

结合第一方面第四实施方式,在第一方面第六实施方式中,所述利用LRU算法将所述软件资源保存至所述资源池代理包括:分别获取所述资源池代理中每个软件资源最后一次使用至当前时刻的间隔时长;利用反馈的所述软件资源替换所述间隔时长最长的软件资源。With reference to the fourth embodiment of the first aspect, in the sixth embodiment of the first aspect, the using the LRU algorithm to save the software resources to the resource pool agent includes: separately acquiring each software resource in the resource pool agent The interval duration from the last use to the current moment; the software resource with the longest interval duration is replaced with the feedback software resource.

根据第二方面,本发明实施例还提供了一种资源池软件下载装置,包括接收模块、判断模块、下载模块和发送模块,其中所述接收模块用于接收主机发送的软件请求;当接收到主机发送的软件请求时,所述判断模块用于判断资源池代理中是否存在与所述软件请求相对应的软件资源;所述下载模块用于当所述资源池代理中不存在与所述软件请求相对应的软件资源时,发送所述软件资源的请求消息;接收yum源反馈的所述软件资源,将反馈的所述软件资源保存至所述资源池代理;所述发送模块用于将反馈的所述软件资源并发送至所述主机。According to a second aspect, an embodiment of the present invention further provides a resource pool software downloading device, including a receiving module, a judging module, a downloading module and a sending module, wherein the receiving module is configured to receive a software request sent by a host; When a software request is sent by the host, the judging module is used to judge whether there is a software resource corresponding to the software request in the resource pool agent; When requesting a corresponding software resource, send a request message of the software resource; receive the software resource fed back by the yum source, and save the feedback software resource to the resource pool agent; the sending module is used to send the feedback of the software resource and sent to the host.

根据第三方面,本发明实施例还提供了一种服务器,包括存储器和处理器,所述存储器和所述处理器之间互相通信连接,所述存储器中存储有计算机指令,所述处理器通过执行所述计算机指令,从而执行第一方面或者第一方面的任意一种实施方式中所述的资源池软件下载方法。According to a third aspect, an embodiment of the present invention further provides a server, including a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor passes The computer instructions are executed, thereby executing the first aspect or the method for downloading resource pool software described in any implementation manner of the first aspect.

根据第四方面,本发明实施例提供了一种计算机可读存储介质,所述计算机可读存储介质存储计算机指令,所述计算机指令用于使所述计算机执行第一方面或者第一方面的任意一种实施方式中所述的资源池软件下载方法。According to a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where the computer-readable storage medium stores computer instructions, and the computer instructions are used to cause the computer to execute the first aspect or any one of the first aspect. A method for downloading resource pool software described in an embodiment.

附图说明Description of drawings

通过参考附图会更加清楚的理解本发明的特征和优点,附图是示意性的而不应理解为对本发明进行任何限制,在附图中:The features and advantages of the present invention will be more clearly understood by reference to the accompanying drawings, which are schematic and should not be construed as limiting the invention in any way, in which:

图1示出了yum源服务部署示意图;Figure 1 shows a schematic diagram of yum source service deployment;

图2为本发明实施例1中资源池软件下载方法的流程示意图;2 is a schematic flowchart of a method for downloading resource pool software in Embodiment 1 of the present invention;

图3为通过资源池代理下载软件的流程示意图;Fig. 3 is the schematic flow chart of downloading software through the resource pool agent;

图4为LRU版本更新算法流程示意图;Figure 4 is a schematic flowchart of the LRU version update algorithm;

图5为本发明实施例2中资源池软件下载装置的结构示意图。FIG. 5 is a schematic structural diagram of a resource pool software downloading apparatus in Embodiment 2 of the present invention.

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments These are some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the protection scope of the present invention.

实施例1Example 1

本发明实施例1提供了一种资源池软件下载方法。图1为本发明实施例1中资源池软件下载方法的流程示意图。如图1所示,本发明实施例1中资源池软件下载方法包括以下步骤:Embodiment 1 of the present invention provides a method for downloading resource pool software. FIG. 1 is a schematic flowchart of a method for downloading resource pool software in Embodiment 1 of the present invention. As shown in Figure 1, the method for downloading resource pool software in Embodiment 1 of the present invention includes the following steps:

S101:当接收到主机发送的软件请求时,判断资源池代理中是否存在与所述软件请求相对应的软件资源。S101: When a software request sent by a host is received, determine whether there is a software resource corresponding to the software request in the resource pool agent.

S102:当所述资源池代理中不存在与所述软件请求相对应的软件资源时,发送所述软件资源的请求消息。S102: When there is no software resource corresponding to the software request in the resource pool agent, send a request message for the software resource.

S103:接收yum源反馈的所述软件资源,将反馈的所述软件资源发送至所述主机并保存至所述资源池代理。S103: Receive the software resource fed back by the yum source, and send the fed back software resource to the host and save it to the resource pool agent.

进一步的,资源池软件下载方法还包括:当所述资源池代理中存在与所述软件请求相对应的软件资源时,将所述资源池代理中的所述软件资源发送至所述主机。Further, the method for downloading software in a resource pool further includes: when there is a software resource corresponding to the software request in the resource pool agent, sending the software resource in the resource pool agent to the host.

更进一步的,所述软件请求中包括请求版本信息,在将所述资源池代理中的所述软件资源发送至所述主机之前,还包括:获取所述资源池代理中的所述软件资源的保存版本信息;根据所述请求版本信息和所述保存版本信息,判断所述软件资源的保存版本是否低于请求版本;当所述保存版本低于所述请求版本时,发送所述软件资源的请求消息;接收yum源反馈的所述请求版本的所述软件资源,将所述请求版本的所述软件资源发送至所述主机并保存至所述资源池代理。Further, the software request includes request version information, and before sending the software resources in the resource pool agent to the host, it also includes: acquiring the information of the software resources in the resource pool agent. Save the version information; according to the requested version information and the saved version information, determine whether the saved version of the software resource is lower than the requested version; when the saved version is lower than the requested version, send the information of the software resource. request message; receive the software resource of the requested version fed back by the yum source, send the software resource of the requested version to the host and save it to the resource pool agent.

再进一步的,在将所述请求版本的所述软件资源发送至所述主机并保存至所述资源池代理之后,还包括:删除所述资源池代理中所述保存版本的所述软件资源。Still further, after sending the requested version of the software resource to the host and saving it to the resource pool agent, the method further includes: deleting the saved version of the software resource in the resource pool agent.

也就是说,在宿主机向资源池请求软件资源的时候,通过资源池代理转发其请求,建立yum源-->资源池代理-->资源池宿主机的请求路径。对于宿主机的软件资源请求,首先通过资源池代理,如果这其中有对应的软件资源,可直接返回宿主机;否则,通过资源代理池将资源请求转发到yum源,返回对应软件资源到资源代理池,资源代理池再返回宿主机的请求并将该软件资源缓存到资源代理池,以便下次请求时可直接通过资源代理池对请求进行处理。其具体实现流程如附图3所示。That is to say, when the host requests software resources from the resource pool, the request is forwarded through the resource pool proxy, and the request path of the yum source --> resource pool proxy --> resource pool host is established. For the software resource request of the host, first pass the resource pool proxy, if there are corresponding software resources, it can directly return to the host; otherwise, the resource request is forwarded to the yum source through the resource proxy pool, and the corresponding software resources are returned to the resource proxy The resource proxy pool then returns the host's request and caches the software resources in the resource proxy pool, so that the next request can be processed directly through the resource proxy pool. The specific implementation process is shown in FIG. 3 .

由此可见,不同于目前在资源池创建完整镜像的方式,由于该种方式创建的是完整的镜像,没办法区分资源池需要用到哪些软件资源,存在大量冗余的,没办法契合公有云场景。本发明实施例1提供的资源池软件下载方法,通过资源池代理的方式处理宿主机的资源请求,只需在资源池代理中下载宿主机请求的软件资源,实现软件资源的按需下载,由此不再需要进行每个yum源镜像的同步操作,减少创建镜像的冗余操作,同时可以有效的处理宿主机的请求,即通过资源池代理可以建立资源缓存,对资源池进行容量管理,实现资源池的最大化共享、最高效的利用、最节约成本。It can be seen that, unlike the current method of creating a complete image in the resource pool, because this method creates a complete image, there is no way to distinguish which software resources need to be used in the resource pool, there are a lot of redundancy, and there is no way to fit the public cloud. Scenes. The resource pool software download method provided in Embodiment 1 of the present invention processes the resource request of the host by means of a resource pool proxy, and only needs to download the software resources requested by the host in the resource pool proxy, so as to realize the on-demand downloading of software resources, by This eliminates the need to synchronize each yum source image, reduces redundant operations for creating images, and can effectively handle requests from the host. The maximum sharing of resource pools, the most efficient utilization, and the most cost-saving.

为了提高响应用户请求的效率,软件资源更新方式采用LRU算法。具体的,所述将所述软件资源保存至所述资源池代理包括以下方法:判断所述资源池代理是否已满;当所述资源池代理已满时,利用LRU算法将所述软件资源保存至所述资源池代理;当所述资源池代理未满时,将所述软件资源保存至所述资源池代理的空闲池中。In order to improve the efficiency of responding to user requests, the software resource update method adopts the LRU algorithm. Specifically, the saving of the software resources to the resource pool agent includes the following methods: judging whether the resource pool agent is full; when the resource pool agent is full, using an LRU algorithm to save the software resources to the resource pool agent; when the resource pool agent is not full, save the software resource to the free pool of the resource pool agent.

示例的,算法流程如附图3所示:缓存中将保留最近一段时间内经常使用的数据,而淘汰最近未常被使用的数据。在替换内容时只需找出最近最少使用的数据进行替换,LRU在缓存中维持一个内容列表,存储最近被使用的数据,当有数据被请求时,它将跃至第一位。如果被请求的数据在列表中,即在已缓存存储中(比如排在第K位),那么排在K之前的数据位置将向后移一位,没有内容会被淘汰。Illustratively, the algorithm flow is shown in FIG. 3: the data that is frequently used in the recent period of time will be retained in the cache, and the data that has not been frequently used recently will be eliminated. When replacing content, it is only necessary to find the least recently used data to replace. The LRU maintains a content list in the cache, storing the most recently used data. When data is requested, it will jump to the first place. If the requested data is in the list, i.e. in the cached storage (eg in the Kth position), then the data position before K will be moved back one place and no content will be eliminated.

为了更加详细的说明本发明实施例1的资源池软件下载方法,给出一个具体的示例。当资源池宿主机需要下载软件时,例如,请求下载python包,使用yum install python命令进行下载:In order to describe the resource pool software downloading method according to Embodiment 1 of the present invention in more detail, a specific example is given. When the resource pool host needs to download software, for example, to request to download a python package, use the yum install python command to download:

1、宿主机向资源池代理发起下载python包及其依赖包的请求;1. The host sends a request to the resource pool agent to download the python package and its dependent packages;

2、资源池代理判断本地是否有对应python包及其依赖包的缓存,如果有直接将资源返回给宿主机进行安装;如果没有继续执行下一步;2. The resource pool agent determines whether there is a local cache of the corresponding python package and its dependent packages, and if so, directly returns the resource to the host for installation; if not, proceed to the next step;

3、资源池代理向yum源获取对应的软件资源,下载后在本地缓存,并采用LRU算法对资源池进行更新,将宿主机请求的相关包返回给宿主机。3. The resource pool agent obtains the corresponding software resources from the yum source, caches them locally after downloading, uses the LRU algorithm to update the resource pool, and returns the relevant packages requested by the host to the host.

4、特殊情况:资源池代理在下载时如果发现本地存在旧版本的软件,则删除旧版本的软件,即只保留资源池内使用的最新的软件。4. Special circumstances: If the resource pool agent finds that there is an old version of the software locally during the download, it will delete the old version of the software, that is, only keep the latest software used in the resource pool.

由此可见,本发明实施例1提供的资源池按需下载软件的方法,通过资源池代理的方式处理宿主机的请求,实现对yum源更好的管理,在yum源执行更新操作之后,不再需要进行每个yum源镜像的同步操作,减少创建镜像的冗余操作,同时可以有效的处理宿主机的请求。通过增加资源池代理,大大减少资源池管理系统的计算时间,加快服务器的调用速度,提高资源池资源调用效率,同时提高每个服务器资源利用率。It can be seen that the method for downloading software on demand from the resource pool provided in Embodiment 1 of the present invention processes the request of the host by means of the resource pool proxy, so as to achieve better management of the yum source. After the yum source is updated, no It is then necessary to perform the synchronization operation of each yum source mirror to reduce the redundant operation of creating mirrors, and at the same time, it can effectively handle the request of the host. By adding the resource pool agent, the calculation time of the resource pool management system is greatly reduced, the calling speed of the server is accelerated, the resource calling efficiency of the resource pool is improved, and the resource utilization rate of each server is improved at the same time.

实施例2Example 2

本发明实施例2提供了一种资源池软件下载装置。图5为本发明实施例2中资源池软件下载装置的结构示意图。如图5所示,本发明实施例2中资源池软件下载装置包括接收模块20、判断模块21、下载模块22和发送模块23。Embodiment 2 of the present invention provides a resource pool software downloading apparatus. FIG. 5 is a schematic structural diagram of a resource pool software downloading apparatus in Embodiment 2 of the present invention. As shown in FIG. 5 , the resource pool software downloading apparatus in Embodiment 2 of the present invention includes a receiving module 20 , a judging module 21 , a downloading module 22 and a sending module 23 .

具体的,接收模块20,用于接收主机发送的软件请求;Specifically, the receiving module 20 is configured to receive a software request sent by the host;

判断模块21,当接收到主机发送的软件请求时,用于判断资源池代理中是否存在与所述软件请求相对应的软件资源;The judgment module 21, when receiving the software request sent by the host, is used to judge whether there is a software resource corresponding to the software request in the resource pool agent;

下载模块22,用于当所述资源池代理中不存在与所述软件请求相对应的软件资源时,发送所述软件资源的请求消息;接收yum源反馈的所述软件资源,将反馈的所述软件资源保存至所述资源池代理,The download module 22 is configured to send a request message for the software resource when there is no software resource corresponding to the software request in the resource pool agent; receive the software resource fed back by the yum source, and send all the feedback the software resource is saved to the resource pool agent,

发送模块23,用于将反馈的所述软件资源并发送至所述主机。The sending module 23 is configured to send the feedback software resource to the host.

上述资源池软件下载装置具体细节可以对应参阅图1至图4所示的实施例中相对应的相关描述和效果进行理解,此处不再赘述。The specific details of the above resource pool software downloading apparatus can be understood by referring to the corresponding descriptions and effects in the embodiments shown in FIG. 1 to FIG. 4 , and details are not repeated here.

实施例3Example 3

本发明实施例还提供了一种服务器,该服务器可以包括处理器和存储器,其中处理器和存储器可以通过总线或者其他方式连接。An embodiment of the present invention also provides a server, the server may include a processor and a memory, wherein the processor and the memory may be connected by a bus or in other ways.

处理器可以为中央处理器(Central Processing Unit,CPU)。处理器还可以为其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等芯片,或者上述各类芯片的组合。The processor may be a central processing unit (Central Processing Unit, CPU). The processor may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other Chips such as programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above types of chips.

存储器作为一种非暂态计算机可读存储介质,可用于存储非暂态软件程序、非暂态计算机可执行程序以及模块,如本发明实施例中的资源池软件下载方法相对应的程序指令/模块(例如,图5所示的接收模块20、判断模块21、下载模块22和发送模块23)。处理器通过运行存储在存储器中的非暂态软件程序、指令以及模块,从而执行处理器的各种功能应用以及数据处理,即实现上述方法实施例中的资源池软件下载方法。As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions corresponding to the resource pool software downloading method in the embodiment of the present invention/ modules (for example, the receiving module 20, the judging module 21, the downloading module 22 and the sending module 23 shown in FIG. 5). The processor executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory, that is, implements the resource pool software downloading method in the above method embodiments.

存储器可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储处理器所创建的数据等。此外,存储器可以包括高速随机存取存储器,还可以包括非暂态存储器,例如至少一个磁盘存储器件、闪存器件、或其他非暂态固态存储器件。在一些实施例中,存储器可选包括相对于处理器远程设置的存储器,这些远程存储器可以通过网络连接至处理器。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system and an application program required by at least one function; the storage data area may store data created by the processor, and the like. Additionally, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory may optionally include memory located remotely from the processor, such remote memory being connectable to the processor via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

所述一个或者多个模块存储在所述存储器中,当被所述处理器执行时,执行如图1-4所示实施例中的资源池软件下载方法。The one or more modules are stored in the memory, and when executed by the processor, execute the resource pool software downloading method in the embodiments shown in FIGS. 1-4 .

上述服务器具体细节可以对应参阅图1至图5所示的实施例中相对应的相关描述和效果进行理解,此处不再赘述。The specific details of the above server can be understood by referring to the corresponding descriptions and effects in the embodiments shown in FIG. 1 to FIG. 5 , and details are not repeated here.

本领域技术人员可以理解,实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)、随机存储记忆体(Random AccessMemory,RAM)、快闪存储器(Flash Memory)、硬盘(Hard Disk Drive,缩写:HDD)或固态硬盘(Solid-State Drive,SSD)等;所述存储介质还可以包括上述种类的存储器的组合。Those skilled in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. During execution, the processes of the embodiments of the above-mentioned methods may be included. Wherein, the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a flash memory (Flash Memory), a hard disk (Hard Disk) Drive, abbreviation: HDD) or solid-state drive (Solid-State Drive, SSD), etc.; the storage medium may also include a combination of the above-mentioned types of memories.

虽然结合附图描述了本发明的实施例,但是本领域技术人员可以在不脱离本发明的精神和范围的情况下作出各种修改和变型,这样的修改和变型均落入由所附权利要求所限定的范围之内。Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, various modifications and variations can be made by those skilled in the art without departing from the spirit and scope of the present invention, such modifications and variations falling within the scope of the appended claims within the limited range.

Claims (10)

1.一种资源池软件下载方法,其特征在于,包括:1. a resource pool software downloading method, is characterized in that, comprises: 当接收到主机发送的软件请求时,判断资源池代理中是否存在与所述软件请求相对应的软件资源;When receiving the software request sent by the host, determine whether there is a software resource corresponding to the software request in the resource pool agent; 当所述资源池代理中不存在与所述软件请求相对应的软件资源时,发送所述软件资源的请求消息;When there is no software resource corresponding to the software request in the resource pool agent, sending a request message for the software resource; 接收yum源反馈的所述软件资源,将反馈的所述软件资源发送至所述主机并保存至所述资源池代理。Receive the software resource fed back by the yum source, send the fed back software resource to the host and save it to the resource pool agent. 2.根据权利要求1所述的方法,其特征在于,还包括:2. The method of claim 1, further comprising: 当所述资源池代理中存在与所述软件请求相对应的软件资源时,将所述资源池代理中的所述软件资源发送至所述主机。When a software resource corresponding to the software request exists in the resource pool agent, the software resource in the resource pool agent is sent to the host. 3.根据权利要求2所述的方法,其特征在于,所述软件请求中包括请求版本信息,在将所述资源池代理中的所述软件资源发送至所述主机之前,还包括:3. The method according to claim 2, wherein the software request includes request version information, and before sending the software resource in the resource pool agent to the host, further comprising: 获取所述资源池代理中的所述软件资源的保存版本信息;Obtain the saved version information of the software resource in the resource pool agent; 根据所述请求版本信息和所述保存版本信息,判断所述软件资源的保存版本是否低于请求版本;According to the requested version information and the saved version information, determine whether the saved version of the software resource is lower than the requested version; 当所述保存版本低于所述请求版本时,发送所述软件资源的请求消息;When the saved version is lower than the requested version, send a request message for the software resource; 接收yum源反馈的所述请求版本的所述软件资源,将所述请求版本的所述软件资源发送至所述主机并保存至所述资源池代理。Receive the software resource of the requested version fed back by the yum source, send the software resource of the requested version to the host and save it to the resource pool agent. 4.根据权利要求3所述的方法,其特征在于,在将所述请求版本的所述软件资源发送至所述主机并保存至所述资源池代理之后,还包括:4. The method according to claim 3, wherein after sending the software resource of the requested version to the host and saving it to the resource pool agent, the method further comprises: 删除所述资源池代理中所述保存版本的所述软件资源。The software resource of the saved version in the resource pool agent is deleted. 5.根据权利要求1所述的方法,其特征在于,将反馈的所述软件资源保存至所述资源池代理包括:5. The method according to claim 1, wherein saving the feedback software resource to the resource pool agent comprises: 判断所述资源池代理是否已满;Determine whether the resource pool agent is full; 当所述资源池代理已满时,利用LRU算法将反馈的所述软件资源保存至所述资源池代理。When the resource pool agent is full, the LRU algorithm is used to save the feedback software resource to the resource pool agent. 6.根据权利要求5所述的方法,其特征在于,还包括:6. The method of claim 5, further comprising: 当所述资源池代理未满时,将反馈的所述软件资源保存至所述资源池代理的空闲池中。When the resource pool agent is not full, the feedback software resource is stored in the free pool of the resource pool agent. 7.根据权利要求5所述的方法,其特征在于,所述利用LRU算法将反馈的将所述软件资源保存至所述资源池代理包括:7. The method according to claim 5, wherein the saving the software resource fed back to the resource pool agent by using the LRU algorithm comprises: 分别获取所述资源池代理中每个软件资源最后一次使用至当前时刻的间隔时长;Respectively obtain the interval duration from the last use of each software resource in the resource pool agent to the current moment; 利用反馈的所述软件资源替换所述间隔时长最长的软件资源。The software resource with the longest interval duration is replaced with the feedback software resource. 8.一种资源池软件下载装置,其特征在于,包括:8. A resource pool software download device, characterized in that, comprising: 接收模块,用于接收主机发送的软件请求;The receiving module is used to receive the software request sent by the host; 判断模块,当接收到主机发送的软件请求时,用于判断资源池代理中是否存在与所述软件请求相对应的软件资源;The judgment module, when receiving the software request sent by the host, is used to judge whether there is a software resource corresponding to the software request in the resource pool agent; 下载模块,用于当所述资源池代理中不存在与所述软件请求相对应的软件资源时,发送所述软件资源的请求消息;接收yum源反馈的所述软件资源,将反馈的所述软件资源保存至所述资源池代理,A download module, configured to send a request message for the software resource when there is no software resource corresponding to the software request in the resource pool agent; receive the software resource fed back by the yum source, and send the feedback software resources are saved to the resource pool agent, 发送模块,用于将反馈的所述软件资源并发送至所述主机。A sending module, configured to send the feedback software resource to the host. 9.一种服务器,其特征在于,包括:9. A server, characterized in that, comprising: 存储器和处理器,所述存储器和所述处理器之间互相通信连接,所述存储器中存储有计算机指令,所述处理器通过执行所述计算机指令,从而执行权利要求1-7中任一项所述的资源池软件下载方法。A memory and a processor, the memory and the processor are connected in communication with each other, the memory stores computer instructions, and the processor executes any one of claims 1-7 by executing the computer instructions The described resource pool software download method. 10.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机指令,所述计算机指令用于使所述计算机执行权利要求1-7中任一项所述的资源池软件下载方法。10. A computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to cause the computer to execute the resource according to any one of claims 1-7 Pool software download method.
CN202111599947.5A 2021-12-24 2021-12-24 Resource pool software downloading method and device and server Pending CN114448958A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111599947.5A CN114448958A (en) 2021-12-24 2021-12-24 Resource pool software downloading method and device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111599947.5A CN114448958A (en) 2021-12-24 2021-12-24 Resource pool software downloading method and device and server

Publications (1)

Publication Number Publication Date
CN114448958A true CN114448958A (en) 2022-05-06

Family

ID=81364078

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111599947.5A Pending CN114448958A (en) 2021-12-24 2021-12-24 Resource pool software downloading method and device and server

Country Status (1)

Country Link
CN (1) CN114448958A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6195678B1 (en) * 1996-09-03 2001-02-27 Fujitsu Limited Remote resource management system for automatically downloading required files from application server depending on contents of selected files on requesting computer
CN101827077A (en) * 2009-03-02 2010-09-08 富士通株式会社 Data delivery system and data delivery method
CN101924820A (en) * 2010-02-09 2010-12-22 宇龙计算机通信科技(深圳)有限公司 A kind of method for downloading software, system and portable terminal
CN103560997A (en) * 2013-10-09 2014-02-05 北京奇虎科技有限公司 Application program download management method and device and download server
CN106713030A (en) * 2016-12-21 2017-05-24 无锡江南计算技术研究所 Software source management method based on safety management and control and software function management system
CN112416375A (en) * 2020-11-19 2021-02-26 深圳市德普光业科技有限公司 A software distribution and installation method, system and storage medium
CN112491980A (en) * 2020-11-13 2021-03-12 苏州浪潮智能科技有限公司 Cloud host service management method, system, terminal and storage medium
CN113342424A (en) * 2021-08-04 2021-09-03 北京拓课网络科技有限公司 Method and device for loading H5 resource and electronic equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6195678B1 (en) * 1996-09-03 2001-02-27 Fujitsu Limited Remote resource management system for automatically downloading required files from application server depending on contents of selected files on requesting computer
CN101827077A (en) * 2009-03-02 2010-09-08 富士通株式会社 Data delivery system and data delivery method
CN101924820A (en) * 2010-02-09 2010-12-22 宇龙计算机通信科技(深圳)有限公司 A kind of method for downloading software, system and portable terminal
CN103560997A (en) * 2013-10-09 2014-02-05 北京奇虎科技有限公司 Application program download management method and device and download server
CN106713030A (en) * 2016-12-21 2017-05-24 无锡江南计算技术研究所 Software source management method based on safety management and control and software function management system
CN112491980A (en) * 2020-11-13 2021-03-12 苏州浪潮智能科技有限公司 Cloud host service management method, system, terminal and storage medium
CN112416375A (en) * 2020-11-19 2021-02-26 深圳市德普光业科技有限公司 A software distribution and installation method, system and storage medium
CN113342424A (en) * 2021-08-04 2021-09-03 北京拓课网络科技有限公司 Method and device for loading H5 resource and electronic equipment

Similar Documents

Publication Publication Date Title
US11194719B2 (en) Cache optimization
US11914881B2 (en) Data migration method and apparatus
US8396936B2 (en) Computer system with cooperative cache
US20120278344A1 (en) Proximity grids for an in-memory data grid
CN103370917A (en) Message processing method and server
CN107026879B (en) A data caching method and background application system
CN108989113A (en) A kind of dispositions method and management server of server
WO2018040168A1 (en) Distributed-cache synchronization method, apparatus, and system
CN112929463A (en) Traffic proxy method, server and system based on DNS (Domain name System)
CN105959420A (en) Multi-client metadata synchronous update method and device
US9344363B2 (en) Information processing system, relay device, information processing device, and information processing method
CN112954008B (en) Distributed task processing method and device, electronic equipment and storage medium
US20200133883A1 (en) Asynchronous Tracking for High-Frequency and High-Volume Storage
CN112671871B (en) Mirror image distribution method and device, terminal equipment and storage medium
CN110741617A (en) Resource updating method and device, computer equipment and storage medium
CN103731396B (en) Resource access method, system and cache resources information push-delivery apparatus
CN114448958A (en) Resource pool software downloading method and device and server
CN117950587A (en) Model training method, device, electronic device and storage medium
CN115794319A (en) Edge computing storage service providing method, device, electronic equipment and medium
CN118474123A (en) Method and system for refreshing data
CN104618450B (en) The Web caching systems and method of a kind of WLAN
CN110581873A (en) A cross-cluster redirection method and monitoring server
CN114979104A (en) A system, method, computer device and storage medium for realizing serverless
CN103067496B (en) Client-cache mechanism management method and server
CN111327713B (en) DNS (Domain name Server) analysis method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20220506

RJ01 Rejection of invention patent application after publication