Method and system for accelerating mirror image loading of AIGC application container in edge scene

Through P2P technology and adaptive backpack caching algorithm, the loading process of AIGC application container image is optimized, which solves the problems of long loading time and limited storage space in edge scenarios, realizes efficient data transmission and cache management, and improves the AIGC application Quality of service.

CN119211210APending Publication Date: 2024-12-27PIO CLOUD COMPUTING (SHANGHAI) CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411218169.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

In edge scenarios, AIGC application container image loading time is long, resulting in a decline in service quality. The existing container deployment framework image size is large and difficult to download, and the edge node storage space is limited, making it difficult to quickly load images of different applications.

Method used

Using P2P technology to build an edge networking system, optimize the container startup process through mirror description files and file data separation, utilize weight calculation and adaptive backpack cache algorithms, optimize data transmission and cache management, reduce dependence on the cloud, and make full use of edge nodes 的带宽资源。

Benefits of technology

Accelerate the loading time of AIGC application container image, improve service quality, reduce bandwidth requirements, improve cache efficiency, and ensure the efficiency and reliability of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119211210A_ABST
    Figure CN119211210A_ABST
Patent Text Reader

Abstract

The invention discloses a method and system for accelerating loading of an AIGC application container mirror image in an edge scene, and the method comprises the steps: S1, building an edge networking system, and setting a container mirror image comprising a mirror image description file and file data on a cloud; s2, when an edge node creates a container, judging whether a mirror image description file corresponding to a container mirror image exists locally or not, if yes, mounting a container file system according to the file, and executing S4, otherwise, executing S3; s3, calculating the weight according to the communication state between the edge node and other nodes and the storage state of the edge node, confirming the other nodes according to the weight, downloading the mirror image description file if the other nodes exist, and otherwise, downloading the mirror image description file from the cloud; and S4, the container is started, after the edge node receives an access request for the file data in the container, other edge nodes are confirmed according to the weight, if yes, the file data are downloaded, and otherwise, the file data are downloaded from the cloud and returned to the container for calling. According to the invention, the loading of the container mirror image can be accelerated by utilizing the bandwidth resource of the edge node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of container images, and in particular relates to a method and system for accelerating the loading of AIGC application container images in edge scenarios. Background Art

[0002] In recent years, AIGC (Artificial Intelligence Generated Content) technology has received more and more attention. Its outstanding creative ability can meet the diverse needs of users and has become an important driving force in the field of digital creativity. However, under the traditional cloud computing model, users' demand for AIGC services is difficult to be met in real time. In addition, it is difficult to effectively protect the privacy data used by AIGC in the cloud computing model. In order to solve the above problems, more and more AIGC applications have begun to embrace edge computing and migrate to edge scenarios.

[0003] Compared with cloud computing, edge computing has three main advantages: (1) edge nodes are closer to users, which can significantly reduce the response delay of user requests; (2) edge nodes are responsible for processing most routine requests, and only some complex requests need to be processed by cloud servers, reducing the computing burden on the cloud; (3) privacy data in user requests does not need to be uploaded to the cloud for processing, effectively ensuring user privacy. The main deployment method of AIGC applications is to package them into container images through container technology and load them on nodes for deployment. However, the network conditions of different edge nodes in edge scenarios vary greatly, and network connectivity with the cloud is difficult to ensure, which makes it difficult to shorten the container image loading time of AIGC applications, resulting in a loss of application service quality. In addition, AIGC technology is in a rapid development stage, with new technologies constantly emerging. AIGC applications often need to be constantly updated to keep up with the technological frontier, which makes the impact of image loading time on application service quality more significant.

[0004] At the same time, the existing container deployment framework has the following shortcomings in the AIGC container deployment process:

[0005] 1. Container images are large in size and can only be downloaded from image repositories. It is difficult to quickly complete the download of images in edge network environments.

[0006] 2. The storage space of edge nodes is limited. In order to respond to changes in user needs in a timely manner, it is necessary to repeatedly load images of different applications, further reducing the service capacity of the nodes. Summary of the invention

[0007] In view of the above problems, the present invention proposes a method and system for accelerating the loading of AIGC application container images in edge scenarios. To solve the above technical problems, the technical solutions adopted by the present invention are as follows:

[0008] The method for accelerating the loading of AIGC application container images in edge scenarios includes the following steps:

[0009] S1, constructing an edge networking system including edge nodes and a cloud based on P2P technology, wherein the cloud is provided with an online node list and a container image, wherein the container image includes an image description file and file data, and each edge node is provided with a file cache list for recording the file data cache status and a file storage list for recording the image description file storage status;

[0010] S2, when an online edge node needs to create a container, determine whether the edge node has an image description file corresponding to the container image locally. If so, mount the container file system according to the image description file and execute step S4, otherwise, execute step S3;

[0011] S3, calculate the weight according to the communication status between the current edge node and other edge nodes in the online node list and the storage status of the edge node, and confirm whether there are corresponding image description files for other edge nodes in the online node list according to the weight size. If so, download the image description file; otherwise, download the image description file from the cloud, and mount the container file system according to the downloaded image description file;

[0012] S4, start the container. After the edge node receives the access request for the file data in the container, it confirms whether the file data exists on other edge nodes in the online node list in order from large to small according to the weights obtained in step S3. If so, download the file data; otherwise, download the file data from the cloud, and then return the downloaded file data to the container call.

[0013] In step S3, the communication status includes the network delay and network rate between edge nodes, and the storage status includes the data volume, cache space and number of connections. The data volume refers to the total storage space occupied by all file data currently on the edge node, the cache space refers to the size of the storage space used by the edge node for data caching, and the number of connections refers to the number of edge nodes to which the edge node has currently established connections.

[0014] The calculation formula of the weight is:

[0015]

[0016] In the formula, w i,j represents the weight of edge node j relative to edge node i, l i,jrepresents the normalized value of the network delay between edge node i and edge node j in the online node list, v i,j represents the normalized value of the network rate between edge node i and edge node j in the online node list, d i represents the normalized value of the data volume of edge node i, s i represents the normalized value of the cache space of edge node i, c i represents the normalized value of the number of connections of edge node i, and i≠j, θ l ,θ v ,θ d ,θ s ,θ c These are adjustment parameters.

[0017] The value of the adjustment parameter is θ l =0.2,θ v =0.5,θ d =0.15,θ s =0.05,θ c =0.1.

[0018] In step S3, after the current edge node downloads the image description file from other edge nodes or the cloud, the downloaded image description file is saved locally, and the file storage list of the current edge node is updated synchronously.

[0019] In step S4, after the current edge node downloads file data from other edge nodes or the cloud, it decides whether to add the downloaded file data to the local cache of the edge node and update the file cache list based on the preset adaptive backpack cache algorithm.

[0020] The step of determining whether to add the downloaded file data to the local cache of the edge node and updating the file cache list based on the preset adaptive backpack cache algorithm includes the following steps:

[0021] ①, according to the arrival time of the file data, the popularity calculation method, and the number of nodes that the edge node is connected to and has the file data, the calculation methods of time value, popularity value, and node value of the edge node are constructed respectively;

[0022] The calculation formula of the time value is:

[0023]

[0024] In the formula, t now Indicates the current time, t r Indicates the time when the file data arrives at the edge node;

[0025] The calculation formula of the popularity value is:

[0026] v2=pop f ;

[0027] In the formula, pop f Indicates the popularity of file data;

[0028] The calculation formula of the node value is:

[0029]

[0030] In the formula, num f Indicates the number of edge nodes that the edge node is connected to that already have file data. limit Indicates the maximum number of connections of the edge node;

[0031] ②, according to the method of step ①, calculate the time value, popularity value and node value of each file data and downloaded file data in the file cache list of the current edge node;

[0032] ③, calculate the comprehensive value of each file data based on the data obtained in step ②;

[0033] The calculation formula of the comprehensive value is:

[0034] v all =θ1*v1+θ2*v2+θ3*v3;

[0035] In the formula, θ1, θ2 and θ3 all represent weight parameters;

[0036] ④, according to the size of the file data f Confirm the weight of each file data and downloaded file data in the file cache list of the edge node;

[0037] ⑤. Build a file weight list based on the weight of each file data obtained in step ④. Build a file value list based on the comprehensive value obtained in step ③. Use the dynamic programming algorithm to solve the file weight list and the file value list to obtain the optimized cache list. Update the file cache list and the cache of the current edge node based on the optimized cache list.

[0038] An AIGC application container image loading system in an accelerated edge scenario is applied to an edge networking system including an edge node and a cloud, wherein the cloud is provided with:

[0039] Format conversion storage module: used to store container images, where the container images are converted based on the original images in the image library, and each container image includes an image description file and corresponding file data;

[0040] Node information storage module: used to store an online node list, where the online node list is used to record online edge nodes in the edge networking system;

[0041] File sending module: used to receive requests from edge nodes and send corresponding image description files or file data according to the requests from edge nodes;

[0042] Each edge node has:

[0043] Data loading module: used to determine whether there is a corresponding image description file in the file storage module when creating a container at the edge node. If so, mount the container file system according to the image description file, otherwise, start the request sending module; or when the edge node receives an access request, determine whether there is corresponding file data in the cache module. If so, load the file data and return it to the container call, otherwise start the request sending module;

[0044] File storage module: used to store the file storage list and corresponding image description file that record the storage status of the image description file on the edge node, and update the file storage list and image description file according to the image description file downloaded by the request sending module;

[0045] Cache module: used to store the file cache list and corresponding file data that record the file data cache status on the edge node, and update the file cache list and file data based on the preset adaptive backpack cache algorithm and the file data downloaded by the request sending module;

[0046] Request sending module: used to calculate the weight according to the communication status between the current edge node and other edge nodes in the online node list and the storage status of the edge node, and to build connections with other edge nodes in the online node list in descending order of weight, and to determine whether there are corresponding image description files or file data in other edge nodes. If so, download the image description file or file data; otherwise, send a request to download the image description file or file data to the file sending module in the cloud.

[0047] Beneficial effects of the present invention:

[0048] 1. In view of the characteristics of containerized deployment of AIGC applications in edge scenarios, a new container image deployment process is designed for AIGC container images. Metadata is extracted to form an image description file, so that the container can be started without downloading all the data. By optimizing the amount of data required for container startup, the bandwidth requirement for AIGC application container deployment is reduced; AIGC container images are stored and distributed at a finer granularity, making full use of the bandwidth resources of edge nodes, thereby accelerating the loading of container images and ultimately improving the service quality of AIGC applications in edge scenarios;

[0049] 2. We designed an environment-aware intelligent networking algorithm that comprehensively calculates the properties of nodes and selects high-quality nodes in the edge network for networking. This algorithm can form a reliable and efficient data transmission network between edge nodes, thereby accelerating the loading speed of AIGC application container images by utilizing the idle bandwidth of edge nodes when loading container images, thus ensuring the efficiency and reliability of data transmission in the network.

[0050] 3. An adaptive knapsack cache algorithm is designed specifically for edge network scenarios, which improves the efficiency of AIGC application container image file caching in edge scenarios. The modeling of the knapsack problem is introduced into the cache system, and dynamic programming is used to solve the cache replacement problem, thereby improving the hit rate of the cache system. Frequently used data is placed in the local cache, so that the download process can be skipped and loaded directly the next time it is used, without the need to download again. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0052] Figure 1 The figure is a schematic diagram of the image format conversion process of the present invention.

[0053] Figure 2 It is a schematic diagram of the structure of the present invention. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] Container is a virtualization technology that provides a lightweight and portable way to encapsulate and deploy applications. Compared with traditional virtual machines, containers are more efficient because they share the operating system kernel and avoid the extra overhead of virtual machines. Containers contain applications and all their runtime dependencies, allowing applications to maintain consistency in different environments and have good isolation. In container technology, an image is a read-only template that contains all the files, dependencies, and configuration information required to run a container, similar to a lightweight virtual machine snapshot. Image layers are multiple read-only layers that make up an image, and each layer represents a file system change (such as adding, modifying, or deleting files). These layers are combined together through a joint file system, so that images can reuse existing layers while effectively reducing storage space and speeding up the image building process.

[0056] Container Runtime is the runtime environment for managing and executing containerized applications. It is responsible for handling lifecycle management tasks such as creating, starting, stopping, and destroying containers to ensure that containers can run efficiently and reliably in a cloud computing environment. Unlike container orchestration tools, container runtimes focus on handling the underlying operations of containers, including mounting file systems, configuring networks, isolating processes, and more. Common container runtimes include Docker Runtime, containerd, and more. These runtime technologies provide an abstraction layer that allows developers to more easily create and manage containers without having to pay too much attention to the underlying system details.

[0057] Edge computing is a distributed computing framework that brings applications closer to data sources, such as IoT devices or local edge servers. This proximity to data sources can bring significant business benefits: faster insights, shorter response times, and increased bandwidth availability.

[0058] P2P (Peer-to-Peer) is a distributed network architecture in which individual nodes (devices or users) communicate and share resources directly with each other without relying on a centralized server. Each node can either act as a client to request resources or as a server to provide resources, aiming to achieve more efficient resource allocation and better network resilience.

[0059] The Knapsack Problem is one of the classic combinatorial optimization problems in computer science. The core of the problem is to select a group of items in a knapsack of limited capacity so that the total value of the items is maximized, while the total weight of the items does not exceed the capacity of the knapsack. The Knapsack Problem is widely used in fields such as resource allocation and portfolio optimization, and is usually solved by dynamic programming or heuristic algorithms.

[0060] A method for accelerating the loading of AIGC application container images in edge scenarios includes the following steps:

[0061] S1, constructing an edge networking system including edge nodes and a cloud based on P2P technology, wherein the cloud is provided with an online node list and a container image, wherein the container image includes an image description file and file data, and each edge node is provided with a file cache list for recording the file data cache status and a file storage list for recording the image description file storage status;

[0062] The edge networking system includes several edge nodes and a cloud. Starting any edge node can realize the communication connection between the edge node and the cloud. An online node list is provided on the cloud. The online node list records which edge nodes in the edge networking system are online. The online edge nodes can be connected to other edge nodes in the online node list. At the same time, the online node list can also be dynamically adjusted according to the network connection speed to adapt to changes in network conditions and optimize transmission performance. Through this system, a file data transmission network can be formed between edge nodes running in edge scenarios, making full use of the idle bandwidth of edge nodes, and accelerating the data loading process through networking between edge nodes when loading container images.

[0063] The original container image file is composed of several image layers. When calling, the image layers need to be stacked from bottom to top in order to mount the container's file system and start the container. Figure 1 As shown, the method for building the container image is as follows:

[0064] ①, decompress the image layers in the original image in the traditional format from bottom to top to restore the file system of the container;

[0065] ②, traverse every file and folder in the file system, record their metadata, use the SHA256 hash function to calculate the summary of each file, and build the image description file corresponding to the original image based on the metadata of all the recorded files;

[0066] ③. Create an index for each file based on the summary obtained in step ② and save all files separately.

[0067] According to the above steps, the converted new image format, i.e. the container image, consists of two parts: the image description file and the file data. When loading the image data later, you only need to download the corresponding image description file to start the application container, and the file data can be loaded on demand according to the access requirements of the process in the container.

[0068] The online node list includes an online edge node ID and an IP address corresponding to the edge node.

[0069] The file cache list is located in the cache space of the edge node, and specifically includes a container image ID, a file data index, and a file data cache address.

[0070] The file storage list is stored in the hard disk space of the edge node, and specifically includes the container image ID and the file storage address for recording the image description file.

[0071] S2, when an online edge node needs to create a container, determine whether the edge node has an image description file corresponding to the container image locally. If so, mount the container file system according to the image description file and execute step S4, otherwise, execute step S3;

[0072] The edge node determines whether the corresponding file storage address is stored in the local file storage list of the edge node based on the container image ID, and calls the image description file under the address to load the container. When an edge node needs to load an image and the image is not stored locally, it will first try to obtain the required image description file from other edge nodes in the edge networking system. If the required image description file cannot be obtained from other edge nodes, a download request will be sent to the cloud.

[0073] S3, calculate the weight according to the communication status between the current edge node and other edge nodes in the online node list and the storage status of the edge node, and confirm whether there are corresponding image description files in other edge nodes in the online node list according to the weights. If so, download the image description file; otherwise, download the image description file from the cloud, and mount the container file system according to the downloaded image description file, including the following steps:

[0074] S3.1, calculating the weight according to the communication status between the current edge node and other edge nodes in the online node list and the storage status of the edge node;

[0075] The communication status includes the network delay and network rate between edge nodes, and the storage status includes data volume, cache space and number of connections. The data volume refers to the total storage space occupied by all file data of the edge node, the cache space refers to the storage space size used by the edge node for data caching, and the number of connections refers to the number of edge nodes that the edge node has currently established connections with. The corresponding calculation formula is:

[0076]

[0077] In the formula, w i,j represents the weight of edge node j relative to edge node i, l u,j represents the normalized value of the network delay between edge node i and edge node j in the online node list, v i,jrepresents the normalized value of the network rate between edge node i and edge node j in the online node list, d i represents the normalized value of the data volume of edge node i, s i represents the normalized value of the cache space of edge node i, c i represents the normalized value of the number of connections of edge node i, and i≠j, θ l ,θ v ,θ d ,θ s ,θ c All represent adjustment parameters. In this embodiment, θ l =0.2,θ v =0.5,θ d =0.15,θ s =0.05,θ c =0.1. The values ​​of the above parameters are obtained based on the edge scenario performance test experiment. The main steps of the edge scenario performance test experiment are as follows:

[0078] 1. Set up the experimental environment: 10 virtual machines simulate edge servers, and 1 virtual machine simulates the cloud image warehouse. The network delay between every two edge servers is set to 50ms, and the bandwidth is limited to 100Mbps. The network delay from the cloud to the edge server is set to 300ms, and the total bandwidth is limited to 100Mbps.

[0079] 2. Run performance tests: Use test scripts to simulate real load scenarios and deploy multiple AIGC applications on each edge server.

[0080] 3. Measure performance data: For each deployment operation, record the total time required for deployment. At the same time, while the system is running, record the total number of cache accesses and cache hits.

[0081] 4. Organize the experimental results: After the experiment is completed, collect the data on each edge server. Classify and organize the deployment time data of each AIGC application and take the average. Add up the total cache access times and cache hit times of each edge server to get the total cache access times and cache hit times of the entire system. The shorter the deployment time, the better the parameters in the edge networking algorithm used in this experiment. Therefore, the cache hit rate (cache hit times / total cache access times) can be calculated from the total cache access times and cache hit times. The higher the cache hit rate, the better the parameters in the adaptive backpack cache algorithm used in this experiment.

[0082] S3.2, confirm whether the image description file corresponding to the container image exists on the corresponding edge node in descending order of weight. If yes, download the image description file and save it to the current edge node; otherwise, download the image description file corresponding to the container image from the cloud and save it locally;

[0083] This part is mainly responsible for loading and starting the converted AIGC application container. The traditional image format requires the image file to be fully downloaded before the container's file system can be mounted. This application only uses the image description file to mount the file system and start the container.

[0084] S3.3, the current edge node mounts the container file system according to the image description file obtained in step S3.2, and executes step S4;

[0085] S4, start the container. After the edge node receives the access request for the file data in the container, it confirms whether the file data exists on other edge nodes in the online node list in descending order of the weights obtained in step S3. If so, download the file data. Otherwise, download the file data from the cloud, and then return the downloaded file data to the container call, including the following steps:

[0086] S4.1, start the container, the edge node queries whether the corresponding file data exists in the local cache according to the received access request, if it exists, return the local file data to the container call, if not, according to the weight obtained in step S3, confirm whether the file data exists on the edge node in descending order of weight, if it exists, download the file data, otherwise, download the file data from the cloud;

[0087] Similarly, when an edge node needs to load an image and the image is not stored locally, it will first try to obtain the required file data from other edge nodes in the edge networking system. This strategy helps reduce dependence on the cloud, reduce network bandwidth consumption, and improve the speed and efficiency of file transfer. If the required file data is stored in the connected edge nodes, it will be downloaded directly from these edge nodes, thereby speeding up the image loading speed and reducing the bandwidth load on the cloud server. Only when the required image cannot be obtained from the connected edge node will a request be made to the cloud to load the image. Through this dual strategy, the idle bandwidth between edge nodes can be fully utilized, and the file data can be downloaded smoothly when the edge node cannot provide the file data, thereby ensuring reliability.

[0088] S4.2, based on a preset adaptive backpack cache algorithm, determine whether to add the file data downloaded in step S4.1 to the local cache of the edge node, and synchronously update the file cache list of the current edge node;

[0089] The adaptive knapsack cache algorithm is used to manage the data cache on the edge node, introduces the concepts of item weight and value in the knapsack problem into cache management, models the cache replacement problem as a knapsack problem, and uses a dynamic programming algorithm to solve the problem, thereby improving the cache access efficiency and realizing a more efficient cache system. Specifically, the algorithm includes the following steps:

[0090] ①, according to the arrival time of the file data, the popularity calculation method, and the number of nodes that the edge node is connected to and has the file data, the calculation methods of time value, popularity value, and node value of the edge node are constructed respectively;

[0091] The calculation formula for the time value of file data is:

[0092]

[0093] Where, t now Indicates the current time, t r Indicates the time when the file data arrives at the edge node.

[0094] The calculation formula for the popularity value of file data is:

[0095] v2=pop f ;

[0096] In the formula, pop f Indicates the popularity of file data. Popularity is a prior art and will not be described in detail in this embodiment.

[0097] The calculation formula of the node value of the edge node is:

[0098]

[0099] In the formula, num f Indicates the number of edge nodes that the edge node is connected to that already have file data. limit Indicates the maximum number of connections for this edge node.

[0100] ②, according to the method of step ①, calculate the time value, popularity value and node value of the edge node for each file data in the file cache list of the edge node and the file data downloaded in step S4.1;

[0101] ③, calculate the comprehensive value of the file data based on the data obtained in step ②;

[0102] The calculation formula of the comprehensive value is:

[0103] v all =θ1*v1+θ2*v2+θ3*v3;

[0104] Wherein, θ1, θ2 and θ3 all represent weights. In this embodiment, θ1=0.2, θ2=0.5, θ3=0.3.

[0105] ④, according to the size of the file data f Calculate the weight of each file data in the file cache list of the edge node and the file data downloaded in step S4.1;

[0106] w=size f .

[0107] ⑤, construct a file weight list based on the weight of each file data obtained in step ④, construct a file value list based on the comprehensive value obtained in step ③, use the dynamic programming algorithm to solve the file weight list and the file value list to obtain the optimized cache list, and update the file cache list and cache of the current edge node based on the optimized cache list;

[0108] The file weight list includes a file data index and a file weight, the file value list includes a file data index and a comprehensive file value, and the optimized cache list includes a file data index. The file cache list and the file data in the cache space of the current edge node are updated based on the file data index in the optimized cache list.

[0109] By allocating a certain amount of storage space on the edge node to store highly popular file data, local storage resources can be effectively utilized, reducing the need for frequent downloads from remote nodes or the cloud, thereby improving the response speed of image loading. When an edge node needs to load a certain file data, it will first query the local cache based on the file summary recorded in the image description file. If the required file data already exists in the cache, the file data in the local cache will be directly returned. This can not only significantly reduce loading delays, but also reduce the burden on network bandwidth, improve the performance of the overall system and user experience. If the required file data does not exist in the local cache, it will request downloads from other parts of the edge networking system. After the file data is downloaded, it will decide whether to add the new file data to the local cache based on the preset algorithm. In addition, the usage of the cache space can be monitored, and expired or low-popularity file data can be cleaned up regularly to free up storage space and optimize resource utilization.

[0110] S4.3, returning the downloaded file data to the container call;

[0111] When the edge node of this application is first started, it first obtains the online node list from the cloud, then obtains the network status and various attributes of each node in the list, calculates the weight of the node, and connects them in descending order according to the weight. In this way, it is possible to comprehensively consider various indicators of the node and establish an efficient edge network environment.

[0112] The embodiment of the present application also provides an AIGC application container image loading system in an accelerated edge scenario, which is applied to an edge networking system including an edge node and a cloud, wherein the cloud is provided with:

[0113] Format conversion storage module: used to store container images, where the container images are converted based on the original images in the image library, and each container image includes an image description file and corresponding file data;

[0114] Node information storage module: used to store an online node list, where the online node list is used to record online edge nodes in the edge networking system;

[0115] File sending module: used to receive requests from edge nodes and send corresponding image description files or file data according to the requests from edge nodes;

[0116] like Figure 2 As shown, each edge node is equipped with:

[0117] Data loading module: used to determine whether there is a corresponding image description file in the file storage module when creating a container at the edge node. If so, mount the container file system according to the image description file, otherwise, start the request sending module; or when the edge node receives an access request, determine whether there is corresponding file data in the cache module. If so, load the file data and return it to the container call, otherwise start the request sending module;

[0118] File storage module: used to store the file storage list and the corresponding image description file that record the storage status of the image description file on the edge node, and update the file storage list and the image description file according to the image description file downloaded by the request sending module;

[0119] Cache module: used to store the file cache list and corresponding file data that record the file data cache status on the edge node, and update the file cache list and file data based on the preset adaptive backpack cache algorithm and the file data downloaded by the request sending module;

[0120] Request sending module: used to calculate the weight according to the communication status between the current edge node and other edge nodes in the online node list and the storage status of the edge node, and to build connections with other edge nodes in the online node list in descending order of weight, and to determine whether there are corresponding image description files or file data in other edge nodes. If so, download the image description file or file data; otherwise, send a request to download the image description file or file data to the file sending module in the cloud.

[0121] An embodiment of the present application also provides an electronic device, which includes a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the AIGC application container image loading method in the above-mentioned accelerated edge scenario are performed.

[0122] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method for loading an AIGC application container image in the accelerated edge scenario are executed. Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, etc. When the computer program on the storage medium is run, the embodiment of the method for loading an AIGC application container image in the accelerated edge scenario can be executed.

[0123] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for accelerating AIGC application container image loading in edge scenarios, characterized in that: The steps include: S1, constructing an edge networking system including edge nodes and a cloud based on P2P technology, wherein the cloud is provided with an online node list and a container image, wherein the container image includes an image description file and file data, and each edge node is provided with a file cache list for recording the file data cache status and a file storage list for recording the image description file storage status; S2, when an online edge node needs to create a container, determine whether the edge node has an image description file corresponding to the container image locally. If so, mount the container file system according to the image description file and execute step S4, otherwise, execute step S3; S3, calculate the weight according to the communication status between the current edge node and other edge nodes in the online node list and the storage status of the edge node, and confirm whether there are corresponding image description files for other edge nodes in the online node list according to the weight size. If so, download the image description file; otherwise, download the image description file from the cloud, and mount the container file system according to the downloaded image description file; S4, start the container. After the edge node receives the access request for the file data in the container, it confirms whether the file data exists on other edge nodes in the online node list in order from large to small according to the weights obtained in step S3. If so, download the file data; otherwise, download the file data from the cloud, and then return the downloaded file data to the container call.

2. The method for loading an AIGC application container image in an accelerated edge scenario according to claim 1 is characterized in that: In step S3, the communication status includes the network delay and network rate between edge nodes, and the storage status includes the data volume, cache space and number of connections. The data volume refers to the total storage space occupied by all file data currently on the edge node, the cache space refers to the size of the storage space used by the edge node for data caching, and the number of connections refers to the number of edge nodes to which the edge node has currently established connections.

3. The method for loading AIGC application container images in the accelerated edge scenario according to claim 1 or 2, characterized in that: The calculation formula of the weight is: In the formula, w i,j represents the weight of edge node j relative to edge node i, l i,j represents the normalized value of the network delay between edge node i and edge node j in the online node list, v i,j represents the normalized value of the network rate between edge node i and edge node j in the online node list, d i represents the normalized value of the data volume of edge node i, s i represents the normalized value of the cache space of edge node i, c i represents the normalized value of the number of connections of edge node i, and i≠j, θ l ,θ v ,θ d ,θ s ,θ c These are adjustment parameters.

4. The method for loading an AIGC application container image in an accelerated edge scenario according to claim 3 is characterized in that: The value of the adjustment parameter is θ l =0.2,θ v =0.5,θ d =0.15,θ s =0.05,θ c =0.

1.

5. The method for loading AIGC application container images in the accelerated edge scenario according to claim 1 is characterized in that: In step S3, after the current edge node downloads the image description file from other edge nodes or the cloud, the downloaded image description file is saved locally, and the file storage list of the current edge node is updated synchronously.

6. The method for loading an AIGC application container image in an accelerated edge scenario according to claim 1 is characterized in that: In step S4, after the current edge node downloads file data from other edge nodes or the cloud, it decides whether to add the downloaded file data to the local cache of the edge node and update the file cache list based on the preset adaptive backpack cache algorithm.

7. The method for loading AIGC application container images in the accelerated edge scenario according to claim 6 is characterized in that: The step of determining whether to add the downloaded file data to the local cache of the edge node and updating the file cache list based on the preset adaptive backpack cache algorithm includes the following steps: ①, according to the arrival time of the file data, the popularity calculation method, and the number of nodes that the edge node is connected to and has the file data, the calculation methods of time value, popularity value, and node value of the edge node are constructed respectively; The calculation formula of the time value is: Where, t now Indicates the current time, t r Indicates the time when the file data arrives at the edge node; The calculation formula of the popularity value is: v2=pop f ; In the formula, pop f Indicates the popularity of file data; The calculation formula of the node value is: In the formula, num f Indicates the number of edge nodes that the edge node is connected to that already have file data. limit Indicates the maximum number of connections of the edge node; ②, according to the method of step ①, calculate the time value, popularity value and node value of each file data and downloaded file data in the file cache list of the current edge node; ③, calculate the comprehensive value of each file data based on the data obtained in step ②; The calculation formula of the comprehensive value is: v all =θ1*v1+θ2*v2+θ3*v3; In the formula, θ1, θ2 and θ3 all represent weight parameters; ④, according to the size of the file data f Confirm the weight of each file data and downloaded file data in the file cache list of the edge node; ⑤. Build a file weight list based on the weight of each file data obtained in step ④. Build a file value list based on the comprehensive value obtained in step ③. Use the dynamic programming algorithm to solve the file weight list and the file value list to obtain the optimized cache list. Update the file cache list and the cache of the current edge node based on the optimized cache list.

8. An AIGC application container image loading system for accelerating edge scenarios, applied to an edge networking system including edge nodes and a cloud, characterized in that the cloud is provided with: Format conversion storage module: used to store container images, where the container images are converted based on the original images in the image library, and each container image includes an image description file and corresponding file data; Node information storage module: used to store an online node list, where the online node list is used to record online edge nodes in the edge networking system; File sending module: used to receive requests from edge nodes and send corresponding image description files or file data according to the requests from edge nodes; Each edge node has: Data loading module: used to determine whether there is a corresponding image description file in the file storage module when creating a container on the edge node. If so, mount the container file system according to the image description file; otherwise, start the request sending module; Or when the edge node receives an access request, it determines whether the cache module has corresponding file data. If so, it loads the file data and returns the container call, otherwise it starts the request sending module; File storage module: used to store the file storage list and corresponding image description file that record the storage status of the image description file on the edge node, and update the file storage list and image description file according to the image description file downloaded by the request sending module; Cache module: used to store the file cache list and corresponding file data that record the file data cache status on the edge node, and update the file cache list and file data based on the preset adaptive backpack cache algorithm and the file data downloaded by the request sending module; Request sending module: used to calculate the weight according to the communication status between the current edge node and other edge nodes in the online node list and the storage status of the edge node, and to build connections with other edge nodes in the online node list in descending order of weight, and to determine whether there are corresponding image description files or file data in other edge nodes. If so, download the image description file or file data; otherwise, send a request to download the image description file or file data to the file sending module in the cloud.

Citation Information

Cited By

  • Mirror image caching method and device, electronic equipment and storage medium

    CN120475036A

  • Mirror image pulling method and device of container node, electronic equipment and storage medium

    CN120540753A