Mirror image downloading method and device, edge mirror image server and edge computing cluster

By deploying edge image servers in the edge computing cluster to cache and manage images, the problem of time-consuming image downloads from CDN servers to the edge computing cluster is solved, enabling fast image acquisition and virtual machine creation, thus improving the user experience.

CN116260817BActive Publication Date: 2026-04-17BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
Filing Date
2021-12-09
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

In edge computing clusters, downloading images from content delivery network (CDN) servers takes a long time, affecting virtual machine creation time and resulting in a poor user experience.

Method used

Deploy edge image servers in the edge computing cluster, connect via intranet communication, cache and manage images, directly return target images to edge computing nodes, and cache images locally to reduce download requests from CDN servers.

Benefits of technology

By caching images locally, edge computing nodes can quickly obtain images, shorten virtual machine creation time, and improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116260817B_ABST
    Figure CN116260817B_ABST
Patent Text Reader

Abstract

This disclosure provides an image download method, apparatus, edge image server, and edge computing cluster. The image download method includes: receiving a first download request from an edge computing node for a target image, the first download request including an identifier of the target image; wherein the edge image server and the edge computing node are connected via an intranet; and, based on the identifier of the target image, returning the target image to the edge computing node if the edge image server has the target image cached. When the edge image server stores the target image, returning the target image to the edge computing node via the intranet enables the edge computing node to obtain the image quickly, thereby facilitating earlier virtual machine creation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of edge computing technology, and in particular to an image download method, apparatus, edge image server, and edge computing cluster. Background Technology

[0002] In related technologies, before creating a virtual machine, the compute nodes in the edge computing cluster download images from a Content Delivery Network (CDN) server. However, downloading images from a CDN server is limited by the shared network bandwidth between the edge computing cluster and the CDN server, which takes a long time to complete, resulting in a longer virtual machine creation time and impacting user experience. Summary of the Invention

[0003] To address or at least partially address the aforementioned technical problems, this disclosure provides an image download method, apparatus, edge image server, and edge computing cluster.

[0004] In a first aspect, embodiments of this disclosure provide an image download method applied to an edge image server, the method comprising:

[0005] The system receives a first download request from an edge computing node for a target image, the first download request including the identifier of the target image; wherein the edge image server and the edge computing node are connected via intranet communication.

[0006] Based on the identifier of the target image, if the target image is cached on the edge image server, the target image is returned to the edge computing node.

[0007] Optionally, the method further includes:

[0008] If the edge image server does not cache the target image, the edge image server sends a second download request, including the identifier of the target image, to the CDN server;

[0009] Receive the target image returned by the CDN server, and return the target image to the edge computing node.

[0010] Optionally, before receiving the first download request for the target image from the edge computing node, the method further includes: obtaining a list of full images;

[0011] Based on the list of full images and the images already cached locally on the edge image server, new images are determined, wherein the new images are images that exist in the full images but are not cached locally.

[0012] The newly added image is downloaded from the CDN server so that the edge image server can cache the newly added image.

[0013] Optionally, before downloading the new image from the CDN server, the method further includes:

[0014] The list of full images is sent to the CDN server so that the CDN server can pre-cache the full images.

[0015] Optionally, the method further includes:

[0016] If a first preset condition is met, the first cached image is cleared, wherein the first preset condition includes reaching a preset time and / or the edge image server's storage capacity usage exceeds a preset threshold.

[0017] Optionally, before clearing the first cache image, the method further includes:

[0018] Get the identifier of the full image;

[0019] Based on the identifier of the full image and the image cached locally on the edge image server, expired images are determined, wherein the expired image is an image that does not exist in the full image but is cached locally;

[0020] The expired image is identified as the first cached image;

[0021] And / or,

[0022] Based on the local image cache time, images whose cache time reaches the first duration are identified as early images;

[0023] The early image is identified as the first cached image.

[0024] Optionally, the method further includes: the first preset condition is that the storage capacity usage exceeds a preset threshold, and the first cache image is the earlier image;

[0025] The alarm count is incremented by one each time the storage capacity usage exceeds a preset threshold and the early image is cleared.

[0026] If the number of alarms reaches the alarm count threshold, the storage capacity of the edge mirror server will be increased.

[0027] Secondly, embodiments of this disclosure provide a mirror download method, the method being applied to a CDN server, the CDN server being communicatively connected to an edge mirror server, the method comprising:

[0028] Receive a second download request, including the identifier of the target image, sent by the edge image server;

[0029] If the target image is cached on the CDN server, the target image is returned to the edge image server.

[0030] Thirdly, embodiments of this disclosure provide an image download device applied to an edge image server, the device comprising:

[0031] The first download request receiving unit is configured to receive a first download request from an edge computing node for a target image, wherein the first download request includes an identifier of the target image; and wherein the edge image server and the edge computing node are connected via an intranet communication network.

[0032] The first target image return unit is used to return the target image to the edge computing node based on the identifier of the target image, provided that the target image is cached on the edge image server.

[0033] Fourthly, embodiments of this disclosure provide a mirror download device applied to a CDN server, the device comprising:

[0034] The second download request receiving unit is used to receive a second download request sent by the edge image server, which includes the identifier of the target image;

[0035] The second target image return unit is used to return the target image to the edge image server when the CDN server has the target image cached there.

[0036] Fifthly, embodiments of this disclosure provide an edge mirror server, including: a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, it implements the image download method applied to the edge mirror server as described in any of the preceding claims.

[0037] Sixthly, embodiments of this disclosure provide a CDN server, including: a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, it implements the image download method applied to the CDN server as described above.

[0038] In a seventh aspect, embodiments of this disclosure provide an edge computing cluster, including edge computing nodes and an edge image server as described above; the edge computing nodes and the edge image server are connected via intranet communication; the edge computing nodes are used to generate a first download request for a target image.

[0039] Eighthly, embodiments of this disclosure provide a computer storage medium storing a computer program that, when executed by a processor, implements the image download method as described in any of the preceding claims.

[0040] The technical solution provided in this disclosure has the following advantages compared with the prior art:

[0041] In the solution provided in this embodiment, an edge image server is deployed in the edge computing cluster and connected to the edge computing nodes via an intranet. When an edge computing node needs to load a target image to create a virtual machine, the edge computing node sends a first download request, including the identifier of the target image, to the edge image server. If the edge image server stores the target image, it returns the target image to the edge computing node via the intranet, enabling the edge computing node to obtain the image quickly and thus create the virtual machine earlier. Attached Figure Description

[0042] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0043] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0044] Figure 1 This is a schematic diagram of the structure of an edge computing cluster provided in an embodiment of this disclosure;

[0045] Figure 2 This is a flowchart of an image download method applied to an edge image server provided in an embodiment of this disclosure;

[0046] Figure 3 This is a flowchart of a method for storing newly added images provided in some embodiments of this disclosure;

[0047] Figure 4 This is a flowchart of an image download method applied to a CDN server provided in an embodiment of this disclosure;

[0048] Figure 5 This is a schematic diagram of the structure of an image download device applied to an edge image server provided in some embodiments of this disclosure;

[0049] Figure 6 This is a schematic diagram of the structure of an image download device applied to a CDN server provided in some embodiments of this disclosure;

[0050] Figure 7 This is a schematic diagram of the structure of an edge mirror server provided in an embodiment of this disclosure. Detailed Implementation

[0051] To better understand the above-described objectives, features, and advantages of this disclosure, the present disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. It is to be understood that the described embodiments are only some, not all, of the embodiments of this disclosure. The specific embodiments described herein are merely for explaining this disclosure and are not intended to limit it. All other embodiments obtained by those skilled in the art based on the described embodiments of this disclosure are within the scope of protection of this disclosure.

[0052] It should be noted that in this article, relational terms such as “first” and “second” are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0053] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.

[0054] This disclosure provides an image download method applied to an edge image server in an edge computing cluster, enabling the target image to be quickly sent to the edge computing nodes in the edge computing cluster, thereby allowing the edge computing nodes to obtain the target image more quickly and create virtual machines faster.

[0055] Before introducing the image download method provided in the embodiments of this disclosure, the edge computing cluster in the embodiments of this disclosure will be introduced first.

[0056] Figure 1 This is a schematic diagram of the structure of an edge computing cluster provided in an embodiment of this disclosure, as shown below. Figure 1 As shown, the edge computing cluster 100 provided in this embodiment includes an edge computing node 101 and an edge mirror server 102.

[0057] Edge computing node 101 is used to receive image creation requests sent by user terminals, create virtual machines based on image creation requests, and use the created virtual machines to provide services to user terminals.

[0058] In some embodiments of this disclosure, after receiving a virtual machine creation request from a user terminal, edge computing node 101 first starts a virtual machine importer (VM-Importer) locally based on the virtual machine creation request. Then, edge computing node 101 (more specifically, the VM-Importer within edge computing node 101) generates a first download request based on the identifier of the target image in the virtual machine creation request and sends the first download request to edge image server 102 to request edge image server 102 to provide a target image for creating the virtual machine. After receiving the target image returned by edge image server 102, edge computing node 101 creates a virtual machine based on the target image, allocates corresponding computing resources to the virtual machine, and then starts the corresponding services.

[0059] Edge image server 102 is used to store and manage virtual machine images, and to query the corresponding target image according to the first download request and return it to edge computing node 101.

[0060] Compared to the edge computing cluster 100 in the prior art, the edge computing cluster 100 provided in this disclosure embodiment adds an edge image server 102 for caching and managing images, and enables the edge computing node 101 to send the first download request to the edge image server 102, instead of the computing node 101 sending the download request to the CDN server as in the prior art.

[0061] It should be noted that in some embodiments of this disclosure, the edge computing cluster 100 may include, in addition to the aforementioned computing node 101 and edge mirror server 102, a management node (Master node), load balancer node, and other nodes used to implement edge computing functions, as found in existing edge computing clusters 100. It should also be noted that in embodiments of this disclosure, the nodes in the edge computing cluster 100 are connected via an intranet.

[0062] Figure 2 This is a flowchart of an image download method applied to an edge image server provided in this embodiment of the disclosure. The image download method provided in this embodiment of the disclosure is executed by the aforementioned edge image server. Figure 2 As shown, the image download method provided in this embodiment includes steps S201-S202.

[0063] Step S201: Receive the first download request from the edge computing node for the target image. The first download request includes the identifier of the target image.

[0064] In some embodiments of this disclosure, after receiving a virtual machine creation request, the edge computing node in the edge computing cluster first starts a virtual machine loading client locally. Subsequently, the virtual machine loading client in the edge computing node creates a first download request based on the identifier of the target image to be loaded in the virtual machine creation request and sends it to the edge image server. The first download request includes the identifier of the target image.

[0065] After receiving the first download request from the edge computing node, the edge image server parses the first download request and obtains the identifier of the target image in the first download request.

[0066] Step S202: Based on the identifier of the target image, if the target image is cached on the edge image server, return the target image to the edge computing node.

[0067] In some embodiments of this disclosure, the edge image server stores an image list, which includes the identifiers and storage addresses of images stored locally on the edge image server. After obtaining the identifier of the target image, the edge image server compares the identifier of the target image with the identifiers of the images stored in the image list to determine whether the target image is stored locally.

[0068] If the edge image server has the target image stored locally, the edge image server determines the storage address of the target image based on the image list, reads the target image according to the storage address, and returns the target image to the edge computing node.

[0069] Using the image download method provided in this disclosure, when an edge computing node needs to load a target image to create a virtual machine, the edge computing node sends a first download request, including the identifier of the target image, to the edge image server. If the edge image server stores the target image, the edge image server returns the target image to the edge computing node via the intranet, enabling the edge computing node to obtain the image quickly and thus create the virtual machine earlier.

[0070] Optionally, in some embodiments of this disclosure, the image download method may include steps S203-S205 in addition to the aforementioned steps S201 and S202.

[0071] Step S203: If the edge mirror server does not cache the target image, the edge mirror server sends a second download request, including the identifier of the target image, to the CDN server.

[0072] In some embodiments of this disclosure, if the edge image server determines that it does not have the target image cached locally, the edge image server generates a second download request based on the identifier of the target image and sends the second download request to the CDN server. The CDN server is a content storage server located close to the edge computing node and storing at least a portion of the images.

[0073] After receiving the second download request, the CDN server extracts the identifier of the target image from the second download request and queries whether the target image is cached locally based on the identifier.

[0074] If the CDN server has the target image cached locally, it returns the target image to the edge image server. If the CDN server does not store the target image locally, it generates a third-party download request based on the target image's identifier and sends this request to the origin server. The origin server is the root server that stores all full images; all potentially used images are stored on the origin server.

[0075] Upon receiving a third download request, the origin server extracts the identifier of the target image from the request, locates the target image in its local storage based on the identifier, and returns the target image to the CDN server. The CDN server, upon receiving the target image, stores it locally and simultaneously returns it to the edge image server.

[0076] Step S204: Receive the target image returned by the CDN server.

[0077] Step S205: Return the target image to the edge computing node.

[0078] After receiving the target image from the CDN server, the edge image server caches the target image in its local storage to achieve local caching of the target image. To quickly locate the aforementioned image to be loaded in subsequent use, the edge image server can also add the target image's identifier and storage address to the image list.

[0079] In addition, the edge image server returns the target image to the edge computing node so that the edge computing node can generate virtual machines based on the target image.

[0080] Using the aforementioned steps S203-S205, if the edge image server does not have the target image cached locally, it sends a second download request to the CDN server to obtain the target image and cache it locally. In subsequent applications, if the edge computing node requests the same target image from the edge image server again, the edge image server can directly retrieve the target image from its local cache and return it to the edge computing node.

[0081] In other embodiments of this disclosure, if the edge image server does not cache the target image locally, it can directly generate return information and send it to the edge computing node. Upon receiving the return message, the edge computing node can directly send a download request to the CDN server to obtain the target image.

[0082] In some embodiments of this disclosure, if the CDN server cannot be connected, the edge computing server may also send a second download request to the origin server to request the origin server to download the image to be loaded.

[0083] As described above, in the image sending method provided in this disclosure, whether the edge image server stores the target image locally directly affects the speed at which the edge computing node obtains the target image. Therefore, in some embodiments of this disclosure, it is also necessary to consider how to enable the edge image server to cache newly added images as early as possible.

[0084] Figure 3 This is a flowchart illustrating a method for storing newly added images provided in some embodiments of this disclosure. For example... Figure 3 As shown, in some embodiments of this disclosure, the edge mirror server can obtain a new image using steps S301-S303.

[0085] Step S301: Obtain a list of full images.

[0086] The edge mirror server periodically retrieves a list of full images, which includes the identifier and creation time of the full images stored on the origin server.

[0087] The origin server is the root server that stores all full images; all versions of images are stored on the origin server. When the origin server receives a newly created image, it adds the image's identifier and creation time to the list of full images.

[0088] In this embodiment, the edge mirror server periodically obtains the full image list in two ways. The first method is that the edge mirror server periodically sends a list retrieval request to the origin server, requesting the origin server to send the full image list to the edge mirror server. The second method is that the origin server actively sends the full image list to the edge mirror server according to a set period.

[0089] Step S302: Determine the new image based on the list of full images and the images already cached locally on the edge image server.

[0090] In this embodiment of the disclosure, after obtaining the list of full images, the edge image server can determine the new image based on the identifier and creation time in the list of full images, as well as the images already cached locally on the edge image server. The new image is an image newly added to the full image list but still cached locally.

[0091] Step S303: Download the new image from the CDN server so that the edge image server can cache the new image.

[0092] After a new image is identified, the edge image server can generate a download request based on the image's identifier and send it to the CDN server. If the CDN server already stores the new image, it can distribute it to the edge image server. If the CDN server does not store the new image, it generates a download request based on the image's identifier and sends it to the origin server.

[0093] After receiving a mirror download request, the origin server retrieves the new mirror based on its identifier and returns it to the CDN server. Upon receiving the new mirror, the CDN server stores it locally and forwards it to the edge mirror server, enabling the edge mirror server to retrieve and cache the new mirror locally.

[0094] In this embodiment of the disclosure, to address the issue of concurrent downloads of newly added images, the edge image server temporarily names the downloaded image file as a *.tmp file, and only one *.tmp file with the same filename exists at any given time. Only after the download of the new image is complete does the edge computing server rename it with the actual image name.

[0095] By using the aforementioned steps S301-S303, the edge image server can obtain the newly added image earlier and cache it locally, so as to quickly add the image and distribute it to the edge computing node when the edge computing node requests to download the new image.

[0096] Optionally, in some embodiments of this disclosure, in addition to obtaining new images using the aforementioned steps S301-S303, the edge image server may also execute step S304 before executing the aforementioned step S303.

[0097] Step S304: Send the list of full images to the CDN server so that the CDN server can pre-cache the full images.

[0098] In some embodiments of this disclosure, by sending a list of full images to the CDN server, the CDN server can determine the identifier of the image not stored locally based on the identifier in the full image list and the image stored locally, and send a download request to the origin server based on the identifier of the image not stored locally, requesting the origin server to send the image not stored locally to the CDN server, so that the CDN server stores the full images, thereby speeding up the speed at which the edge image server downloads and obtains new images from the CDN server.

[0099] In a specific embodiment, the edge mirror server can execute the aforementioned step S304 during the daily low-traffic period (e.g., in the early morning of each day) to trigger the CDN server to update the full image of the local storage.

[0100] In some embodiments of this disclosure, in addition to adding locally cached images using the aforementioned steps S301-S303, the edge image server can also perform the removal of locally cached images, specifically including step S304.

[0101] Step S304: If the first preset condition is met, clear the first cache image.

[0102] The first preset condition may include reaching a preset time, or the edge mirror server storage capacity usage exceeding a preset threshold.

[0103] For example, in some embodiments of this disclosure, the edge mirror server may perform a clearing operation of the first cached image every 10 minutes. As another example, the edge mirror server may monitor the storage capacity usage of the cached image in real time and determine whether the storage capacity usage exceeds a preset threshold. If the storage capacity usage of the edge mirror server exceeds the preset threshold, the operation of clearing the first cached image is performed.

[0104] In this embodiment of the disclosure, the first cached image may be an expired image cached in the edge image server. An expired image is an image that does not exist in the full image set but is cached locally on the edge image server. Correspondingly, before executing step S304, the edge image server may execute steps S305-S307 to determine the first cached image.

[0105] Step S305: Obtain the identifier of the full image.

[0106] Step S306: Determine expired images based on the identifier of the full image and the images already cached locally on the edge image server.

[0107] Step S307: Determine the expired image as the first cached image.

[0108] In other embodiments of this disclosure, the first cached image may be an early image cached in an edge image server. An early image is an image whose cache time has reached a first duration.

[0109] Correspondingly, before executing step S304, the edge mirror server can also execute steps S308-S309.

[0110] Step S308: Based on the local image cache time, determine the image whose cache time has reached the first duration as an early image.

[0111] Step S309: Identify the early image as the first cached image.

[0112] By employing the aforementioned steps S305-S307 or S308-S309, and by using expired or early images as the first cached images in a timely manner, and performing the deletion operation in step S304, the images already stored on the edge image server can be kept within a certain capacity range, ensuring that there is sufficient remaining storage space locally, thus avoiding the problem of subsequent acquired images not being able to be cached.

[0113] In some preferred embodiments of this disclosure, the edge mirror server may, upon reaching a set time (e.g., every 10 minutes as described above), execute steps S305-S307, designating expired images stored locally as first cached images and performing the deletion operation in step S304 on the expired images. After deleting the expired images, the edge mirror server then determines whether the usage of local storage capacity exceeds a preset threshold. If the usage of local storage capacity still exceeds the preset threshold, the edge mirror server executes steps S308-S309, identifying early images whose cache time has reached a first duration as first cached images and performing the deletion operation in step S304 on the early images.

[0114] The aforementioned preferred method for clearing the first cached image first expands the remaining storage space of the edge image server by deleting expired images. Only when the storage capacity usage of the edge image service still exceeds a preset threshold after deleting expired images is the deletion operation performed on the earlier images among the non-expired images. This method reduces the probability of non-expired images being deleted.

[0115] In practical applications, when the first preset condition is that the storage capacity usage exceeds a preset threshold and the first cached image is an early image, the edge image server executes step S304 to delete the early image. However, even after the edge image server deletes some early images, the aforementioned early images may still be requested for download by edge computing nodes as target images. In this case, the edge image server needs to execute the aforementioned steps S203-S205 to download the target image (i.e., the deleted early image) from the CDN server and return it to the edge computing node.

[0116] In some embodiments of this disclosure, in order to prevent certain target images from being repeatedly identified as early images and thus deleted, the edge image server may also perform steps S310-S311.

[0117] Step S310: Increment the alarm count by one each time the storage capacity usage exceeds the preset threshold and the early image is cleared.

[0118] Step S311: If the number of alarms reaches the alarm count threshold, increase the storage capacity of the edge mirror server.

[0119] In this embodiment of the disclosure, if the number of alarms reaches the alarm count threshold, it indicates that the edge mirror server has performed multiple deletions of earlier images. Multiple deletions of earlier images indicate insufficient storage capacity on the edge mirror server. In this case, the storage capacity of the edge mirror server can be increased to make the image caching service provided by the edge mirror server more stable.

[0120] In addition to providing the aforementioned image download method for edge image servers, this disclosure also provides an image download method for CDN servers.

[0121] Figure 4 This is a flowchart of an image download method applied to a CDN server provided in an embodiment of this disclosure. Figure 4 As shown, the image download method applied to the CDN server includes steps S401-S402. It should be noted that in this embodiment of the disclosure, the CDN server and the edge image server are communicatively connected.

[0122] Step S401: Receive a second download request from the edge mirror server, which includes the identifier of the target image.

[0123] In some embodiments of this disclosure, if the edge image server does not cache the target image locally, the edge image server generates a second download request based on the identifier of the target image and sends the second download request to the CDN server.

[0124] Step S402: If the target image is cached on the CDN server, return the target image to the edge image server.

[0125] After receiving the second download request, the CDN server extracts the identifier of the target image from the second download request and queries whether the target image is cached locally based on the identifier.

[0126] If the CDN server has the target image cached locally, the CDN server will return the target image to the edge image server.

[0127] Using the image download method provided in this embodiment, after receiving a second download request including the identifier of the target image from an edge image server, the CDN server checks whether it has cached the target image. If the CDN server has cached the target image, it returns the target image to the edge image server so that the edge image server can obtain and cache the target image.

[0128] In some embodiments of this disclosure, when the CDN server does not cache the target image, the CDN server can generate a third download request based on the identifier of the target image and send the third download request to the origin server. The origin server is the root server that stores the full image; all images that may be used are stored on the origin server.

[0129] Upon receiving a third download request, the origin server extracts the identifier of the target image from the request, locates the target image in its local storage based on the identifier, and returns the target image to the CDN server. The CDN server, upon receiving the target image, stores it locally and simultaneously returns it to the edge image server.

[0130] In some embodiments of this disclosure, the edge mirror server can also send a list of full images to the CDN server. After receiving the list of full images, the CDN server determines the identifier of the images not stored locally based on the identifiers of the full images in the list and the images stored locally. Based on the identifiers of the unstored images, the CDN server sends a download request to the origin server, requesting the origin server to send the unstored images to the CDN server, so that the CDN server stores the full images, thereby speeding up the speed at which the edge mirror server downloads and obtains new images from the CDN server.

[0131] In addition to the aforementioned image download method, some embodiments of this disclosure also provide an image download apparatus for use with an edge image server.

[0132] Figure 5 This is a schematic diagram of the structure of an image download device applied to an edge image server, provided in some embodiments of this disclosure. Figure 5The image download device 500 shown can be understood as a part of the functional modules in the aforementioned edge image server.

[0133] like Figure 5 As shown, the image download device for an edge image server provided in this embodiment includes a first download request receiving unit 501 and a first target image return unit 502.

[0134] The first download request receiving unit 501 is used to receive a first download request from the edge computing node for the target image. The first download request includes the identifier of the target image. The edge image server and the edge computing node are connected via intranet communication.

[0135] The first target image return unit 502 is used to return the target image to the edge computing node based on the identifier of the target image, provided that the target image is cached on the edge image server.

[0136] In some embodiments of this disclosure, the image download apparatus further includes a second download request generation unit and a target image receiving unit. The second download request generation unit is used to send a second download request, including an identifier of the target image, to the CDN server when the edge image server does not cache the target image. The target image receiving unit is used to receive the target image returned by the CDN server and to return the target image to the edge computing node.

[0137] In some embodiments of this disclosure, the image download device further includes a first full image information acquisition unit, a new image determination unit, and a new image download unit. The first full image acquisition unit is used to acquire a list of full images. The new image determination unit is used to determine a new image based on the list of full images and the images already cached locally on the edge image server, wherein the new image is an image that exists in the full image list but is not cached locally. The new image download unit is used to download the new image from the CDN server so that the edge image server can cache the new image.

[0138] In some embodiments of this disclosure, the image download apparatus further includes a full image information sending unit. The full image information sending unit is used to send a list of full images to a CDN server, so that the CDN server can pre-cache the full images.

[0139] In some embodiments of this disclosure, the image download device further includes an image deletion unit. The image deletion unit is used to clear the first cached image when a first preset condition is met, wherein the first preset condition includes reaching a preset time, and / or the storage capacity usage of the edge image server exceeds a preset threshold.

[0140] In some embodiments of this disclosure, the image download device further includes a first cached image determination unit. The first cached image determination unit acquires the identifier of the full image; determines expired images based on the identifier of the full image and the images already cached locally on the edge image server, wherein an expired image is an image that does not exist in the full image but is cached locally; and determines the expired image as the first cached image. Alternatively, based on the image caching time of the local image, determines images whose caching time has reached a first duration as early images, and determines the early images as the first cached images.

[0141] In some embodiments of this disclosure, the image download device further includes an alarm count counting unit and a storage capacity adjustment unit. The alarm count counting unit increments the alarm count by one each time storage capacity usage exceeds a preset threshold and an earlier image is cleared. The storage capacity adjustment unit increases the storage capacity of the edge image server when the alarm count reaches the alarm count threshold.

[0142] In addition to the aforementioned image download method, some embodiments of this disclosure also provide an image download device for CDN servers. Figure 6 This is a schematic diagram of the structure of an image download device applied to a CDN server provided in some embodiments of this disclosure. Figure 6 The image download device 600 shown can be understood as a part of the functional modules in the aforementioned CDN server.

[0143] like Figure 6 As shown, the image download device for CDN servers provided in this embodiment includes a second download request receiving unit 601 and a second target image return unit 602.

[0144] The second download request receiving unit 601 is used to receive a second download request sent by the edge mirror server, which includes the identifier of the target image;

[0145] The second target image return unit 602 is used to return the target image to the edge image server when the target image is cached on the CDN server.

[0146] In some embodiments of this disclosure, the image download device applied to a CDN server may further include a second full image information acquisition unit and a full image caching unit. The second full image information acquisition unit is used to acquire a list of full images sent by the edge image server. The full image caching unit is used to cache the full images according to the list of full images.

[0147] This disclosure also provides an edge mirror server, which includes a processor and a memory. The memory stores a computer program, and when the computer program is executed by the processor, it can implement the image download method of the above embodiments applied to the edge mirror server.

[0148] Example, Figure 7 This is a schematic diagram of the structure of an edge mirror server provided in an embodiment of this disclosure. The edge mirror server provided in this embodiment is deployed in an edge computing cluster and communicates with the computing nodes in the edge computing cluster through a dedicated network.

[0149] The following is a detailed reference. Figure 7 It shows a schematic diagram of a structure suitable for implementing an edge mirror server in the embodiments of this disclosure. Figure 7 The edge mirror server shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments disclosed herein.

[0150] like Figure 7 As shown, the edge mirror server 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory ROM 702 or a program loaded from a storage device 708 into a random access memory RAM 703. The RAM 703 also stores various programs and data required for the operation of the edge server 700. The processing device 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0151] Typically, the following devices can be connected to I / O interface 705: input devices 706 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 707 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 708 including, for example, magnetic tapes, hard disks, etc.; and communication devices 709. Communication device 709 allows edge mirror server 700 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 An edge mirror server 700 with various devices is shown; however, it should be understood that implementation or possession of all the devices shown is not required. More or fewer devices may be implemented alternatively.

[0152] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 709, or installed from storage device 708, or installed from ROM 702. When the computer program is executed by processing device 701, it performs the functions defined in the methods of embodiments of this disclosure.

[0153] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0154] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0155] The aforementioned computer-readable medium may be included in the aforementioned server; or it may exist independently and not assembled into the server.

[0156] The aforementioned computer-readable medium carries one or more programs that, when executed by the server, cause the edge image server to: receive a first download request from an edge computing node for a target image, the first download request including an identifier of the target image; wherein the edge image server and the edge computing node are connected via an intranet communication connection; and, if the edge image server has the target image cached, return the target image to the edge computing node based on the identifier of the target image.

[0157] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0158] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0159] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.

[0160] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0161] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include, based on electrical connections of one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0162] This disclosure also provides a CDN server, which includes a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, it can implement the image download method of the above embodiments applied to CDN.

[0163] This disclosure also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement the image download method of any of the above method embodiments. The execution method and beneficial effects are similar, and will not be described again here.

[0164] This disclosure also provides an edge computing cluster, which includes edge computing nodes and the aforementioned edge image server. The edge computing nodes are used to generate a first download request for a target image.

[0165] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0166] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A mirror download method, characterized in that, Applied to edge mirror servers, the method includes: The system receives a first download request from an edge computing node for a target image, the first download request including the identifier of the target image; wherein, the edge computing cluster includes the edge image server and the edge computing node, the edge image server and the edge computing node being connected via intranet communication; Based on the identifier of the target image, if the target image is cached on the edge image server, the target image is returned to the edge computing node; if the target image is not cached on the edge image server, the edge image server sends a second download request including the identifier of the target image to the CDN server. Receive the target image returned by the CDN server, and return the target image to the edge computing node; If the target image is not stored locally by the CDN server, the target image is obtained by the CDN server generating a third download request based on the identifier of the target image and sending the third download request to the origin server.

2. The method according to claim 1, characterized in that, Before receiving the first download request for the target image from the edge computing node, the method further includes: Get a list of all images; Based on the list of full images and the images already cached locally on the edge image server, new images are determined, wherein the new images are images that exist in the full images but are not cached locally. The newly added image is downloaded from the CDN server so that the edge image server can cache the newly added image.

3. The method according to claim 2, characterized in that, Before downloading the newly added image from the CDN server, the method further includes: The list of full images is sent to the CDN server so that the CDN server can pre-cache the full images.

4. The method according to claim 1, characterized in that, The method further includes: If a first preset condition is met, the first cached image is cleared, wherein the first preset condition includes reaching a preset time and / or the edge image server's storage capacity usage exceeds a preset threshold.

5. The method according to claim 4, characterized in that, Before clearing the first cache image, the method further includes: Get the identifier of the full image; Based on the identifier of the full image and the image cached locally on the edge image server, expired images are determined, wherein the expired image is an image that does not exist in the full image but is cached locally; The expired image is identified as the first cached image; And / or, Based on the local image cache time, images whose cache time reaches the first duration are identified as early images; The early image is identified as the first cached image.

6. The method according to claim 5, characterized in that, The method further includes: The first preset condition is that the storage capacity usage exceeds a preset threshold, and the first cache image is the earlier image; The alarm count is incremented by one each time the storage capacity usage exceeds a preset threshold and the early image is cleared. If the number of alarms reaches the alarm count threshold, the storage capacity of the edge mirror server will be increased.

7. A mirror download method, characterized in that, The method is applied to a CDN server, which is communicatively connected to an edge mirror server. The method includes: Receive a second download request, including the identifier of the target image, sent by the edge image server; If the target image is cached on the CDN server, the target image is returned to the edge image server; If the target image is not stored locally on the CDN server, a third download request is generated based on the identifier of the target image and sent to the origin server. The target image is received from the origin server, stored locally, and returned to the edge image server. The second download request is initiated by the edge image server when it receives the first download request for the target image from the edge computing node, and the edge image server does not have the target image cached. The edge computing cluster includes the edge image server and the edge computing node, and the edge image server and the edge computing node are connected through intranet communication.

8. A mirror download device, characterized in that, The device, applied to an edge mirror server, includes: The first download request receiving unit is used to receive a first download request from an edge computing node for a target image, the first download request including the identifier of the target image; wherein, the edge computing cluster includes the edge image server and the edge computing node, the edge image server and the edge computing node are connected via intranet communication; The first target image return unit is used to return the target image to the edge computing node based on the identifier of the target image, provided that the target image is cached on the edge image server. The second download request generation unit is used to send a second download request, including the identifier of the target image, to the CDN server when the edge image server does not cache the target image. The third target image return unit is used to receive the target image returned by the CDN server and return the target image to the edge computing node; It also includes: if the target image is not stored locally by the CDN server, the target image is obtained by the CDN server generating a third download request based on the identifier of the target image and sending the third download request to the origin server.

9. A mirror download device, characterized in that, The device, applied to a CDN server, includes: The second download request receiving unit is used to receive a second download request sent by the edge image server, which includes the identifier of the target image. The second target image return unit is used to return the target image to the edge image server when the CDN server has the target image cached there. It also includes: when the target image is not stored locally on the CDN server, generating a third download request based on the identifier of the target image, sending the third download request to the origin server, receiving the target image returned by the origin server, storing the target image locally, and simultaneously returning the target image to the edge image server; The second download request is initiated by the edge image server when it receives the first download request for the target image from the edge computing node, and the edge image server does not have the target image cached. The edge computing cluster includes the edge image server and the edge computing node, and the edge image server and the edge computing node are connected through intranet communication.

10. An edge mirror server, characterized in that, include: A memory and a processor, wherein the memory stores a computer program that, when executed by the processor, implements the image download method as described in any one of claims 1-6.

11. A CDN server, characterized in that... include: A memory and a processor, wherein the memory stores a computer program that, when executed by the processor, implements the image download method as described in claim 7.

12. An edge computing cluster, characterized in that, This includes edge computing nodes and the edge mirror server as described in claim 10.

13. A computer storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the image download method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Method and device for setting up Web front-end local development environment

    CN103092581A

  • Method and device for downloading application program files

    CN104901979A

  • Cloud host creation method and device and cloud service system

    CN108076078A

  • Working method of CDN network system based on satellite communication

    CN112713924A