A container image update method and system for cloud-edge application collaboration
By performing deduplication operations at the file level and data block level, using hash values to build indexes, and replacing duplicate files and data blocks, the problems of duplicate data screening in the container image update method in the prior art are solved, and the problem of excessive granularity of duplicate data screening, large amount of network transmission data, and limited edge device computing and storage resources, achieving efficient container image update and startup, alleviating the concurrency pressure in the cloud.
Patent Information
- Application Number
- CN202210797456.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-08
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2042-07-08
AI Technical Summary
The existing multi-version container image update method of edge devices has problems such as too large duplicate data screening, large amount of network transmission data, and limited edge device computing and storage resources, resulting in low container startup efficiency and high concurrency pressure on cloud management servers.
By performing deduplication operations at the file level and data block level, using hash values to build indexes, replacing duplicate files and data blocks, reducing the amount of data transmission, and rebuilding images through indexes on edge devices, reducing the number of interactions with the cloud.
It effectively reduces the amount of data transmitted by container images, saves cloud-edge network resources, improves container startup efficiency, alleviates concurrent pressure in the cloud, and saves storage and computing resources of edge devices.
Smart Images

Figure CN115357254B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer application systems, and in particular to a container image update method and system for cloud-edge application collaboration. Background Art
[0002] Container technology is a process-level virtualization technology. The container image packages the application and its dependent library files, operating environment, etc. Relying on container technology, lightweight release and iteration of applications can be achieved through the deployment and instantiation of container images. With the rapid development of cloud technology, typical container products such as Docker and Rocket have been widely used in the application practices of enterprises, governments, banks and other institutions. At the same time, driven by edge computing and Internet of Things technologies, container technology has gradually moved from the cloud native ecosystem to the edge. Due to its lightweight and platform-independent nature, containers are highly adaptable to the application needs of massive heterogeneous edge devices.
[0003] However, during the iteration process of containerized applications, due to the complex network environment of edge devices and the high network requirements for image transmission, existing methods are even not available in weak network and narrowband environments. At the same time, the number of edge devices is huge, and the incremental coefficient of the amount of data transmitted by massive devices not only doubles the network data transmission volume, but also creates a huge load on the edge image deployment devices in the cloud.
[0004] Since container images package application dependencies such as operating system library files and middleware, there is a large amount of duplicate data in container images of different applications and in container images of different versions of the same application. The industry and academia have proposed a large number of solutions in the fields of storage and transmission of duplicate data in container images. For example, in the container image library, duplicate files are eliminated through the hash value of the image file to save storage space; in the process of edge container deployment, the image file is replaced by the edge container image index, and the image is rebuilt on the edge device side through the shared file library to reduce the amount of data transmission.
[0005] The existing edge device multi-version container image update method may have the following problems: (1) The granularity of duplicate data screening is too large. Multi-version container images based on image layer deduplication and file deduplication still have a large amount of duplicate data. As the incremental coefficient of the massive edge devices doubles, the total amount of network transmission data cannot be ignored, which causes a huge waste of network resources of the edge host. (2) By transmitting the index to rebuild the file image, when the computing and storage resources of the edge host are limited, if the local meta-file library is small, it is difficult to ensure that the files required for the index exist. If they are missing, they need to be retrieved from the image library, which affects the efficiency of container startup. If the local meta-file library is large, the storage resource consumption is large and the retrieval process generates a large computing overhead. (3) In the scenario of synchronous update of container images of massive edge host devices, if the amount of container image data transmission cannot be minimized, the huge number of edge devices will cause high concurrency pressure on the cloud container image management server.
[0006] In summary, in order to solve the load on cloud edge devices caused by the large number of edge devices, this invention introduces an image update method for cloud-edge application collaboration, which deduplicates operations at the file level and also deduplicates data block level, alleviating the pressure of server concurrency; at the same time, there is no need to interact with the image management server multiple times to obtain the actual files, thereby improving the startup efficiency of the container. Summary of the invention
[0007] The purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art, provide a container image update method and system for cloud-edge application collaboration, and alleviate the concurrency pressure on the cloud.
[0008] In order to achieve the above object, the present invention adopts the following technical solutions:
[0009] A container image update method for cloud-edge application collaboration, characterized by comprising the following steps:
[0010] Mounting the release version container image through the container image management server, mounting the historical version container image of the release version container image, and obtaining the file index of the historical version container image;
[0011] Performing a hash operation on all files of the release version container image to obtain a first hash value, constructing a release version container image file index based on the obtained first hash value, performing a file deduplication operation on the release version container image in combination with the historical version container image file index, and replacing duplicate files of the release version container image with file identifiers;
[0012] Obtain byte stream data blocks from the files that are not hit in the historical version container image by using a block algorithm, perform a hash operation on the byte stream data blocks to obtain a second hash value, build a historical version container image data block index based on the obtained second hash value, obtain byte stream data blocks from the files that are not replaced with the file identifier in the released version container image by using a block algorithm, perform a hash operation on the byte stream data blocks to obtain a third hash value, and perform a data block deduplication operation on the released version container image based on the obtained third hash value;
[0013] The container image management server updates the historical version container image library and updates the historical version container image file index library;
[0014] Perform redundancy operations on the historical version container image file index and the historical version container image data block index, package them with the release version container image, and transmit them to the edge host;
[0015] The edge host receives the release version container image, mounts the release version container image, and mounts the historical version container image of the release version container image;
[0016] The edge host checks whether the release version container image has the file identifier, and if so, replaces the file with the file corresponding to the historical version container image; checks whether the release version container image has the data block identifier, and if so, replaces the data block with the data block corresponding to the historical version container image;
[0017] Verify the release version container image, deploy the image to the container runtime environment, delete the local historical version container image, and update the local historical version container image library.
[0018] Preferably, the container image update method for cloud-edge application collaboration is characterized in that the historical version container image of the released version container image is mounted, and the file index of the historical version container image is obtained, specifically:
[0019] Based on the release version container image meta-identifier, the corresponding historical version container image is queried and mounted in the historical version container image library, and the corresponding historical version container image file index is extracted from the historical version container image file index library.
[0020] Preferably, the container image update method for cloud-edge application collaboration is characterized in that the release version container image is deduplicated in combination with the historical version container image file index, specifically:
[0021] The first hash value is queried in the historical version container image file index, and if a hit is found, the file corresponding to the released version container image is replaced with the file identifier, and the file identifier is marked as hit in the file index of the historical version container image.
[0022] Preferably, the container image update method for cloud-edge application collaboration is characterized in that a data block deduplication operation is performed on the release version container image based on the obtained third hash value, specifically:
[0023] The third hash value is queried in the historical version container image data block index, and if a hit is found, the byte stream data block corresponding to the released version container image is replaced with a data block identifier, and the data block identifier is marked as hit in the historical version container image data block index.
[0024] Preferably, the container image update method for cloud-edge application collaboration is characterized by updating the historical version container image library and updating the historical version container image file index library, specifically:
[0025] The historical version container image is replaced with the released version container image in the historical version container image library; and the historical version container image file index is replaced with the released version container image file index in the historical version container image file index library.
[0026] Preferably, the container image update method for cloud-edge application collaboration is characterized in that redundancy operations are performed on the historical version container image file index and the historical version container image data block index, including:
[0027] The file index that does not match in the historical version container image file index is deleted, and the data block index that does not match in the historical version container image data block index is deleted.
[0028] Preferably, the container image update method for cloud-edge application collaboration is characterized in that the historical version container image of the released version container image is locally mounted, specifically:
[0029] The edge host queries and mounts the corresponding historical version container image in the local historical version container image library based on the meta-identifier of the released version container image.
[0030] Preferably, the container image update method for cloud-edge application collaboration is characterized in that, if it exists, the corresponding file of the historical version container image is used for replacement, specifically: based on the file identifier, the file index of the historical version container image is queried, the file corresponding to the file identifier is obtained in the historical version container image, and the file identifier is replaced;
[0031] If it exists, the data block corresponding to the historical version container image is used to replace it, specifically: based on the data block identifier, the data block index of the historical version container image is queried, the data block corresponding to the data block identifier is obtained in the historical version container image, and the data block identifier is replaced.
[0032] Preferably, the container image update method for cloud-edge application collaboration is characterized by updating the local historical version container image library, specifically: replacing the historical version container image with the released version container image in the local historical version container image library.
[0033] A container image update system for cloud-edge application collaboration, characterized by comprising the following modules:
[0034] A server container image processing module is used to mount the release version container image through the container image management server, mount the historical version container image of the release version container image, and obtain the file index of the historical version container image;
[0035] The server file processing module is used to perform a hash operation on all files of the release version container image to obtain a first hash value, construct a release version container image file index based on the obtained first hash value, perform a file deduplication operation on the release version container image in combination with the historical version container image file index, and replace duplicate files of the release version container image with file identifiers;
[0036] The server data block processing module is used to obtain byte stream data blocks by using a block algorithm for the files that are not hit in the historical version container image, perform a hash operation on the byte stream data blocks to obtain a second hash value, build a historical version container image data block index based on the obtained second hash value, obtain byte stream data blocks by using a block algorithm for the files that are not replaced with the file identifier in the released version container image, perform a hash operation on the byte stream data blocks to obtain a third hash value, and perform a data block deduplication operation on the released version container image based on the obtained third hash value;
[0037] The server historical version management module is used to update the historical version container image library and the historical version container image file index library;
[0038] The edge host container image processing module is used to receive the release version container image, mount the release version container image, verify the release version container image, and deploy the image to the container operating environment;
[0039] An edge host file processing module, used to check whether the release version container image has the file identifier, and if so, replace it with the file corresponding to the historical version container image;
[0040] The edge host data management module is used to check whether the data block identifier exists in the released version container image, and if so, replace it with the corresponding data block of the historical version container image;
[0041] The edge host historical version management module is used to extract the corresponding historical version container image from the local historical version container image library according to the release version container image meta-identifier, delete the local historical version container image, and update the local historical version container image library.
[0042] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0043] (1) The present invention performs deduplication operations not only at the file level but also at the byte stream data block level for duplicate data of multi-version edge container images, which can greatly compress the amount of data required to transmit the published container images, save cloud-edge network resources, and alleviate the concurrency pressure of the edge container management server in the cloud.
[0044] (2) In the present invention, the edge host can rebuild the release version container image by combining the file index, data block index, and the release version container image obtained after file deduplication and data block deduplication, and the local historical version container image, without having to interact with the image management server multiple times to obtain missing files, and the container startup efficiency is high;
[0045] (3) In the present invention, since the edge device does not need to maintain a local meta-file library, the storage resources of the edge device are greatly saved; since during the reconstruction of the release version image, only the historical version container image needs to be retrieved through the index, the computing resources of the edge device are greatly saved.
[0046] In summary, the method proposed in the present invention exchanges the computing, storage, and network resource overheads of massive edge devices for only one computing overhead of the container image management server, and alleviates the concurrency pressure on the cloud. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0048] Figure 1This is a flow chart of a container image update method for cloud-edge application collaboration according to an embodiment of the present invention.
[0049] Figure 2 This is a model diagram of a container image update system for cloud-edge application collaboration according to an embodiment of the present invention.
[0050] Figure 3 This is a structural diagram of a container image update embodiment for cloud-edge application collaboration according to an embodiment of the present invention. DETAILED DESCRIPTION
[0051] In order to enable those skilled in the art to better understand the solution of the present application, the following will be combined with the accompanying drawings and drawings in the embodiments to further describe the technical solutions in the embodiments of the present application in detail, but the implementation of the present invention is not limited thereto. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative technology are within the scope of protection of this application.
[0052] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
[0053] like Figure 1 As shown, this embodiment provides a container image update method for cloud-edge application collaboration, including the following steps:
[0054] S1. A user publishes a container image through a container image management server. The container image management server mounts the released version container image, mounts a historical version container image of the released version container image, and obtains a file index of the historical version container image.
[0055] Further, the historical version container image of the released version container image is mounted, and the file index of the historical version container image is obtained, specifically:
[0056] Based on the release version container image meta-identifier, the corresponding historical version container image is queried and mounted in the historical version container image library, and the corresponding historical version container image file index is extracted from the historical version container image file index library.
[0057] It is understandable that users can publish Docker images to multiple Raspberry Pis, edge gateways, and smart terminals through the container image management server. After the container image management server receives the update container image request issued by the user, the container image processing module in the container image management server will locally mount the release version Docker image sent by the user, and call the server historical version management module to extract the corresponding historical version Docker image mounted locally from the historical version container image library through the meta-identifier, and extract the historical version Docker image file index from the historical version container image file index library.
[0058] S2. Perform a hash operation on all files of the release version container image to obtain a first hash value, build a release version container image file index based on the obtained first hash value, perform a file deduplication operation on the release version container image in combination with the historical version container image file index, and replace duplicate files of the release version container image with file identifiers.
[0059] Furthermore, the release version container image is deduplicated based on the historical version container image file index, specifically:
[0060] The first hash value is queried in the historical version container image file index, and if a hit is found, the file corresponding to the released version container image is replaced with the file identifier, and the file identifier is marked as hit in the file index of the historical version container image.
[0061] Furthermore, the container image management service file processing module calculates the first hash value of the released version Docker image file through the SHA-1 algorithm, which is used to provide message integrity protection, and builds the released version container image file index based on the obtained first hash value. The purpose of building the index is to avoid the need to perform hash operation on this version container image file again when the next container version is released. After building the file index, the first hash value is queried in the historical version container image file index. If a hit is found, the file corresponding to the released version container image is replaced with a file identifier, which contains a SHA-1 digest, and the file is marked as hit in the historical version container image file index.
[0062] S3. Obtain byte stream data blocks from the files that are not hit in the historical version container image through a block algorithm, perform a hash operation on the byte stream data blocks to obtain a second hash value, build a historical version container image data block index based on the obtained second hash value, obtain byte stream data blocks from the files that are not replaced with the file identifier in the released version container image through a block algorithm, perform a hash operation on the byte stream data blocks to obtain a third hash value, and perform a data block deduplication operation on the released version container image based on the obtained third hash value.
[0063] Further, a data block deduplication operation is performed on the release version container image based on the obtained third hash value, specifically:
[0064] The third hash value is queried in the historical version container image data block index, and if a hit is found, the byte stream data block corresponding to the released version container image is replaced with a data block identifier, and the data block identifier is marked as hit in the historical version container image data block index.
[0065] Specifically, the server data block processing module blocks the files that are not hit in the historical version Docker image through the AE block algorithm. The block algorithm generates variable-length content blocks based on the extreme values of the byte stream data blocks, which can effectively deal with the byte drift problem caused by the addition, deletion, and modification of the file content. SHA-1 operation is performed on the data blocks to obtain a second hash value, and a historical version container image data block index is constructed based on the obtained second hash value. For the files that are not replaced with the file identifier in the released version Docker image, byte stream data blocks are also obtained through the AE block algorithm, and a hash operation is performed on the byte stream data blocks to obtain a third hash value. Based on the obtained third hash value, a data block deduplication operation is performed on the released version container image, and the hit data blocks are replaced with data block identifiers in the released version container image and marked in the historical version container image data block index.
[0066] S4. The container image management server updates the historical version container image library and updates the historical version container image file index library.
[0067] Furthermore, update the historical version container image library and the historical version container image file index library, specifically:
[0068] The historical version container image is replaced with the released version container image in the historical version container image library; and the historical version container image file index is replaced with the released version container image file index in the historical version container image file index library.
[0069] Furthermore, the server historical version management module updates the historical version container image library and the historical version container image file index library, replaces the historical version container image with the released version container image in the historical version container image library, and replaces the historical version container image file index with the released version container image file index in the historical version container image file index library.
[0070] S5. Perform redundancy elimination operations on the historical version container image file index and the historical version container image data block index, package them with the release version container image, and transmit them to the edge host machine.
[0071] Furthermore, performing redundancy reduction operations on the historical version container image file index and the historical version container image data block index includes:
[0072] The file index that does not match in the historical version container image file index is deleted, and the data block index that does not match in the historical version container image data block index is deleted.
[0073] Furthermore, the server container image processing module performs redundant operations on the historical version container image file index and the historical version container image data block index, including: deleting the file index that does not hit in the historical version container image file index, deleting the data block index that does not hit in the historical version container image data block index, and packaging the release version image for transmission to each Raspberry Pi, edge gateway, and smart terminal, such as Figure 3 shown.
[0074] S6. The edge host receives the release version container image, mounts the release version container image, and mounts the historical version container image of the release version container image.
[0075] Furthermore, the historical version container image of the released version container image is locally mounted, specifically:
[0076] The edge host queries and mounts the corresponding historical version container image in the local historical version container image library based on the meta-identifier of the released version container image.
[0077] Furthermore, in each Raspberry Pi, edge gateway and smart terminal, the edge host container image processing module receives and locally mounts the historical version container image of the released version container image, and the edge host queries and mounts the corresponding historical version container image in the local historical version container image library based on the released version container image meta-identifier.
[0078] S7. The edge host checks whether the release version container image has the file identifier. If so, the file is replaced with the file corresponding to the historical version container image. The edge host checks whether the release version container image has the data block identifier. If so, the data block is replaced with the data block corresponding to the historical version container image.
[0079] Furthermore, if it exists, the file corresponding to the historical version container image is used for replacement, specifically: based on the file identifier, the file index of the historical version container image is queried, the file corresponding to the file identifier is obtained in the historical version container image, and the file identifier is replaced.
[0080] If it exists, the data block corresponding to the historical version container image is used to replace it, specifically: based on the data block identifier, the data block index of the historical version container image is queried, the data block corresponding to the data block identifier is obtained in the historical version container image, and the data block identifier is replaced.
[0081] Furthermore, the edge host file processing module queries the historical version container image file index based on the file identifier, obtains the file corresponding to the file identifier in the historical version container image, and replaces the file identifier; if it exists, the corresponding data block of the historical version container image is used to replace it, specifically: based on the data block identifier, the historical version container image data block index is queried, the data block corresponding to the data block identifier is obtained in the historical version container image, and the data block identifier is replaced; the edge host data block processing module checks whether the released version container image has the data block identifier, and if it exists, the corresponding data block of the historical version container image is used to replace it.
[0082] S8. Verify the release version container image, deploy the image to the container runtime environment, delete the local historical version container image, and update the local historical version container image library.
[0083] Furthermore, update the local historical version container image library, specifically:
[0084] The historical version container image is replaced with the released version container image in the local historical version container image library.
[0085] Furthermore, the edge host image processing module verifies the release version container image to ensure the integrity and accuracy of the release version container image, and then deploys the image to the container operating environment. The edge host historical version management module deletes the local historical version container image, and finally replaces the historical version container image with the release version container image in the local historical version container image library and updates the local historical version container image library.
[0086] Based on the above analysis, it can be seen that the container image update of the present invention not only deduplicates the file level, but also deduplicates the byte stream data blocks, compressing the amount of data required to transmit the container image and saving cloud-edge network resources; at the same time, the computing overhead of a large number of edge devices is exchanged for the computing, storage, and network resource overhead of the container image management server only once, alleviating the concurrency pressure on the cloud.
[0087] like Figure 2 As shown, another embodiment of the present invention further provides a container image update system for cloud-edge application collaboration, which can be used to execute the above-mentioned container image update method for cloud-edge application collaboration. The system includes the following modules:
[0088] A server container image processing module is used to mount the release version container image through the container image management server, mount the historical version container image of the release version container image, and obtain the file index of the historical version container image;
[0089] The server file processing module is used to perform a hash operation on all files of the release version container image to obtain a first hash value, construct a release version container image file index based on the obtained first hash value, perform a file deduplication operation on the release version container image in combination with the historical version container image file index, and replace duplicate files of the release version container image with file identifiers;
[0090] The server data block processing module is used to obtain byte stream data blocks by using a block algorithm for the files that are not hit in the historical version container image, perform a hash operation on the byte stream data blocks to obtain a second hash value, build a historical version container image data block index based on the obtained second hash value, obtain byte stream data blocks by using a block algorithm for the files that are not replaced with the file identifier in the released version container image, perform a hash operation on the byte stream data blocks to obtain a third hash value, and perform a data block deduplication operation on the released version container image based on the obtained third hash value;
[0091] The server historical version management module is used to update the historical version container image library and the historical version container image file index library;
[0092] The edge host container image processing module is used to receive the release version container image, mount the release version container image, verify the release version container image, and deploy the image to the container operating environment;
[0093] An edge host file processing module, used to check whether the release version container image has the file identifier, and if so, replace it with the file corresponding to the historical version container image;
[0094] The edge host data management module is used to check whether the data block identifier exists in the released version container image, and if so, replace it with the corresponding data block of the historical version container image;
[0095] The edge host historical version management module extracts the corresponding historical version container image from the local historical version container image library according to the release version container image meta-identifier, deletes the local historical version container image, and updates the local historical version container image library.
[0096] It should be noted that a container image update system for cloud-edge application collaboration of the present invention corresponds one-to-one to a container image update method for cloud-edge application collaboration of the present invention. The technical features and beneficial effects described in the embodiment of the above-mentioned container image update method for cloud-edge application collaboration are applicable to an embodiment of a container image update system for cloud-edge application collaboration. For specific contents, please refer to the description in the embodiment of the method of the present invention, which will not be repeated here. This is hereby declared.
[0097] In addition, in the above-mentioned implementation of a container image update system for cloud-edge application collaboration, the logical division of each module is only an example. In actual applications, the above-mentioned functions can be assigned to different modules as needed, for example, for the configuration requirements of the corresponding hardware or the convenience of software implementation. That is, the internal structure of the container image system for cloud-edge application collaboration is divided into different modules to complete all or part of the functions described above.
[0098] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0099] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0100] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.
Claims
1. A container image update method for cloud-edge application collaboration, characterized in that: The steps include: Mounting the release version container image through the container image management server, mounting the historical version container image of the release version container image, and obtaining the file index of the historical version container image; Performing a hash operation on all files of the release version container image to obtain a first hash value, constructing a release version container image file index based on the obtained first hash value, performing a file deduplication operation on the release version container image in combination with the file index of the historical version container image, and replacing duplicate files of the release version container image with file identifiers; Obtain byte stream data blocks from the files that are not hit in the historical version container image by using a block algorithm, perform a hash operation on the byte stream data blocks to obtain a second hash value, build a historical version container image data block index based on the obtained second hash value, obtain byte stream data blocks from the files that are not replaced with the file identifier in the released version container image by using a block algorithm, perform a hash operation on the byte stream data blocks to obtain a third hash value, and perform a data block deduplication operation on the released version container image based on the obtained third hash value; The data block deduplication operation is performed on the release version container image based on the obtained third hash value, specifically: Querying the third hash value in the historical version container image data block index, and if a match is found, replacing the byte stream data block corresponding to the released version container image with the data block identifier, and marking the data block identifier as a match in the historical version container image data block index; The container image management server updates the historical version container image library and updates the historical version container image file index library; Perform redundancy operations on the file index of the historical version container image and the data block index of the historical version container image, package them with the release version container image, and transmit them to the edge host; The edge host receives the release version container image, mounts the release version container image, and mounts the historical version container image of the release version container image; The edge host checks whether the release version container image has the file identifier, and if so, replaces the file with the file corresponding to the historical version container image; checks whether the release version container image has the data block identifier, and if so, replaces the data block with the data block corresponding to the historical version container image; Verify the release version container image, deploy the image to the container runtime environment, delete the local historical version container image, and update the local historical version container image library.
2. According to the container image update method for cloud-edge application collaboration according to claim 1, it is characterized in that: The historical version container image of the released version container image is mounted, and the file index of the historical version container image is obtained, specifically: Based on the meta-identifier of the released version container image, the corresponding historical version container image is searched and mounted in the historical version container image library, and the file index of the corresponding historical version container image is extracted from the file index library of the historical version container image.
3. According to the container image update method for cloud-edge application collaboration according to claim 1, it is characterized in that: The file deduplication operation is performed on the release version container image in combination with the file index of the historical version container image, specifically: The first hash value is queried in the file index of the historical version container image, and if a hit is found, the file corresponding to the released version container image is replaced with the file identifier, and the file identifier is marked as hit in the file index of the historical version container image.
4. According to the method for updating container images for cloud-edge application collaboration according to claim 1, it is characterized in that: Update the historical version container image library and the historical version container image file index library, specifically: The historical version container image is replaced with the released version container image in the historical version container image library; and the file index of the historical version container image is replaced with the released version container image file index in the historical version container image file index library.
5. According to the method for updating container images for cloud-edge application collaboration according to claim 1, it is characterized in that: The file index of the historical version container image and the data block index of the historical version container image are subjected to redundancy elimination operations, including: The file index that does not match in the file index of the historical version container image is deleted, and the data block index that does not match in the data block index of the historical version container image is deleted.
6. A container image update method for cloud-edge application collaboration according to claim 1, characterized in that: Mount the historical version container image of the released version container image, specifically: The edge host queries and mounts the corresponding historical version container image in the local historical version container image library based on the meta-identifier of the released version container image.
7. A container image update method for cloud-edge application collaboration according to claim 1, characterized in that: If it exists, the file corresponding to the historical version container image is used to replace it, specifically: based on the file identifier, the file index of the historical version container image is searched, the file corresponding to the file identifier is obtained in the historical version container image, and the file identifier is replaced; If it exists, the data block corresponding to the historical version container image is used to replace it, specifically: based on the data block identifier, the data block index of the historical version container image is queried, the data block corresponding to the data block identifier is obtained in the historical version container image, and the data block identifier is replaced.
8. The container image update method for cloud-edge application collaboration according to claim 1 is characterized in that: Updating the local historical version container image library specifically includes: replacing the historical version container image with the released version container image in the local historical version container image library.
9. A container image update system for cloud-edge application collaboration, characterized in that: Includes the following modules: A server container image processing module is used to mount the release version container image through the container image management server, mount the historical version container image of the release version container image, and obtain the file index of the historical version container image; The server file processing module is used to perform a hash operation on all files of the release version container image to obtain a first hash value, construct a release version container image file index based on the obtained first hash value, perform a file deduplication operation on the release version container image in combination with the file index of the historical version container image, and replace duplicate files of the release version container image with file identifiers; The server data block processing module is used to obtain byte stream data blocks from the files that are not hit in the historical version container image through a block algorithm, perform a hash operation on the byte stream data blocks to obtain a second hash value, and build a historical version container image data block index based on the obtained second hash value; obtain byte stream data blocks from the files that are not replaced with the file identifier in the release version container image through a block algorithm, perform a hash operation on the byte stream data blocks to obtain a third hash value, and perform a data block deduplication operation on the release version container image based on the obtained third hash value; perform a data block deduplication operation on the release version container image based on the obtained third hash value, specifically: Querying the third hash value in the historical version container image data block index, and if a match is found, replacing the byte stream data block corresponding to the released version container image with the data block identifier, and marking the data block identifier as a match in the historical version container image data block index; The server historical version management module is used to update the historical version container image library and the historical version container image file index library; The edge host container image processing module is used to receive the release version container image, mount the release version container image, verify the release version container image, and deploy the image to the container operating environment; An edge host file processing module, used to check whether the release version container image has the file identifier, and if so, replace it with the file corresponding to the historical version container image; The edge host data management module is used to check whether the data block identifier exists in the released version container image, and if so, replace it with the corresponding data block of the historical version container image; The edge host historical version management module is used to extract the corresponding historical version container image from the local historical version container image library according to the meta-identifier of the released version container image, delete the local historical version container image, and update the local historical version container image library.
Citation Information
Patent Citations
Edge computing-oriented container mirror image construction method
CN111324360A
Cloud side cooperation system and cloud side cooperation method based on native container technology
CN112559133A