TOC structure and system for lazy pulling of container image, and method

By using Bloom filter to map the hash value of sensitive metadata in the TOC structure, the problem of metadata exposure in the TOC index file in eStargz is solved, the safe transmission and efficient startup of container image data are realized, and the security and efficiency of container images are improved. efficiency.

WO2024183430A1PCT designated stage expired Publication Date: 2024-09-12CHINA TELECOM CLOUD TECH CO LTD

Patent Information

Application Number
PCT/CN2023/143206
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-12
Filing Date
2023-12-29
Publication Date
2024-09-12

AI Technical Summary

Technical Problem

The TOC index file in the eStargz solution exposes container image metadata, which poses security risks, and fine-grained data blocks need to be verified when the container is started, affecting efficiency.

Method used

Using the TOC structure, the hash value of sensitive metadata (such as file name and file size) is mapped through Bloom filter to reduce the exposure of metadata in the TOC index file, and the hash value is used for data verification to ensure container image data secure transmission.

Benefits of technology

It effectively reduces the exposure of metadata, improves the security of container image data, increases container startup speed, and avoids unauthorized access to sensitive information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023143206_12092024_PF_FP_ABST
    Figure CN2023143206_12092024_PF_FP_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of IT and software development. In particular, disclosed are a TOC structure and system for the lazy pulling of a container image, and a method. The TOC structure comprises a Manifest, a TOC file and a data file, wherein the Manifest is used for storing image information of a container image; a bloom filter is provided in the TOC file, and is used for mapping a data chunk; and the data file is a data chunk of the image information. For the problem of metadata being exposed from a TOC index file in eStargz, the present invention aims to provide a data verification method for lazy pulling of a container image, which method is used for reducing the exposure of the metadata. It is not necessary to directly store, in a TOC index file, sensitive information such as a file name and a file type that correspond to a chunk. Moreover, an image pulling party is supported to verify pulled chunk data by using a downloaded TOC file, such that the secure transmission of container image data is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

A TOC structure, system and method for delayed pulling of container images Technical Field

[0001] The present invention relates to the field of IT and software development technology, and in particular to a TOC structure, system, and method for delayed pulling of container images. Background Art

[0002] Containers are started using container images, which must be fully downloaded from a remote image repository before running the container. However, during startup, the container only reads a small portion of the image content and must wait until all container image data is downloaded before it can begin. This process leaves significant room for optimization.

[0003] Therefore, in recent years, the industry has proposed several delayed pull solutions, such as stargz and eStargz (extended stargz). These solutions divide the container image layer into fine-grained data blocks and prepare an additional index file, TOC, to record metadata and data summaries. During container startup, the necessary data blocks are pulled from the image repository on demand, eliminating the need to wait for the entire image data to be downloaded before starting, significantly improving container startup speed.

[0004] However, because eStartgz further divides image layers into more fine-grained data chunks, the on-demand pull phase of container startup requires verification of these chunk data through the TOC. The TOC index file records the chunk metadata (such as file name, file type, etc.) and corresponding summary information. Therefore, the TOC stored in the image repository has the risk of exposing container image metadata.

[0005] Summary of the Invention

[0006] In response to the problem of metadata exposure in TOC index files in eStargz, the purpose of the present invention is to propose a data verification method for pulling container images that reduces the delay in exposing metadata. It does not require sensitive information such as the file name and file type corresponding to the chunk to be directly stored in the TOC index file. At the same time, it supports the image puller to use the downloaded TOC file to verify the pulled chunk data, thereby ensuring the secure transmission of container image data.

[0007] The object of the present invention is to provide a TOC structure, comprising a manifest, a TOC file and a data file; the TOC file is connected to the manifest and the data file respectively;

[0008] The Manifest is used to store the image information of the container image; the TOC file is provided with a bloom filter; the data file is a data block of the image information;

[0009] The bloom filter is used to map the data block.

[0010] Furthermore, the data block includes several chunks and sensitive metadata corresponding to the several chunks.

[0011] Furthermore, the sensitive metadata includes file name and / or file size.

[0012] Furthermore, the bloom filter is used to map the chunk and the sensitive metadata corresponding to the chunk, specifically:

[0013] Calculate a hash value of the chunk and the sensitive metadata corresponding to the chunk, and then map the hash value to the bits of the bloom filter.

[0014] Furthermore, several chunks constitute the complete mirror information.

[0015] Furthermore, the image information includes image layers, snapshots, and toc.digest.

[0016] Furthermore, the TOC structure also includes Stargz; the Stargz is used to split the complete container image into several independent layers, and the independent layers are the image layers.

[0017] The present invention also provides a system for delayed pulling of container images, comprising any of the above-mentioned TOC structures.

[0018] Furthermore, the system also includes: an image repository, a container engine, and a container;

[0019] The image repository is used to store the TOC file and the data file;

[0020] The container engine is used to obtain the TOC file and the data file from the image repository; the container engine is also used to extract the image information of the container image of the container and place the container image into the manifest; the container engine is also used to combine the TOC file, the data file and the manifest into any of the TOC structures.

[0021] The present invention also provides a data verification method for pulling a container image to reduce the delay in exposing metadata, comprising:

[0022] Obtaining standard image information of a container image of a standard container, obtaining a chunk of the standard image information, obtaining sensitive metadata of the chunk, and establishing a TOC structure based on the standard image information, the chunk, and the sensitive metadata; the TOC structure is the TOC structure according to any one of claims 1 to 7;

[0023] Obtain a chunk to be verified and metadata to be verified, perform hash calculation on the chunk to be verified and the metadata to be verified to obtain a hash value, then compare the hash value with bits in the bloom filter in the TOC structure, and determine whether the chunk belongs to the standard container based on the comparison result.

[0024] The present invention also provides a method for pulling container image data by reducing the delay of exposing metadata, comprising constructing a TOC structure and verifying data; wherein the TOC structure is any of the TOC structures established based on the image information of the container image of the standard container;

[0025] The data verification includes obtaining a chunk to be verified and metadata to be verified, performing a hash calculation on the chunk to be verified and the metadata to be verified to obtain a hash value, then comparing the hash value with the bits in the bloom filter in the TOC structure, and determining whether the chunk belongs to the standard container based on the comparison result.

[0026] The beneficial effects of the present invention mainly include:

[0027] The present invention discloses a TOC structure, system and method for delayed pulling of container images.

[0028] Compared to the existing delayed container image pull solution eStargz, the TOC structure, system, and method disclosed in the present invention no longer expose some sensitive file metadata (such as file name, file size, etc.) in plain text in the TOC index file. Instead, they are one-way mapped to the bloom filter through hashing together with the chunk data. This can effectively reduce the effective information exposed to potential eavesdroppers on the image repository and communication channels, and improve the security of container image data.

[0029] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] FIG1 is a schematic diagram of the eStargz TOC structure and the TOC structure of the present invention;

[0031] FIG2 is a schematic diagram of a process for checking and pulling chunk data using the TOCC structure of the present invention. DETAILED DESCRIPTION

[0032] The technical solution of the present invention is further described below with reference to the accompanying drawings and embodiments.

[0033] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0034] It should be noted that the terms used herein are for describing particular embodiments only and are not intended to limit the exemplary embodiments according to the present invention.

[0035] FIG1 is a schematic diagram of the eStargz TOC structure and the TOC structure of the present invention.

[0036] The present invention provides a TOC structure, including a manifest, a TOC file and a data file; the TOC file is connected to the manifest and the data file respectively;

[0037] The Manifest is used to store the image information of the container image; the TOC file is provided with a bloom filter; the data file is a data block of the image information;

[0038] The bloom filter is used to map the data block.

[0039] It can be appreciated that this embodiment uses a bloom filter to quickly and efficiently map data blocks. A bloom filter is a highly space-efficient probabilistic data structure that utilizes bit arrays and hash functions to check whether an element is likely to be a member of a target set. This makes it very fast to find specific data blocks within large amounts of data. Due to the characteristics of a bloom filter, it can also help detect whether a data block has been modified. If the original data block has been modified, the bloom filter will produce a different result, allowing the data change to be immediately detected. The manifest file is used to store image information for the container image, including version information and other metadata. This facilitates version control, as different versions of the image can be easily viewed and managed. This structure allows for the easy addition of new data blocks or new images. Because bloom filters can be mapped to new data blocks, data storage can be easily expanded. Bloom filters also offer the advantage of preventing malicious attacks by helping to detect possible fraudulent activity or unauthorized data access. Compared to traditional file systems, the use of bloom filters in this embodiment can significantly reduce storage space usage because bloom filters are very compact data structures.

[0040] In some embodiments of the present application, the data block includes several chunks and sensitive metadata corresponding to the several chunks.

[0041] In some embodiments of the present application, the data block includes several chunks and sensitive metadata corresponding to the chunks. Such a design may bring multiple benefits.

[0042] It will be appreciated that, firstly, this embodiment divides a data block into multiple chunks and adds corresponding sensitive metadata, which increases the flexibility of data management. This design allows users to more conveniently process and analyze individual parts of a data block, which is particularly beneficial for large-scale data processing and analysis. Secondly, by subdividing a data block into multiple chunks, data backup and recovery can be performed more efficiently. In the event of data loss, only the lost chunk needs to be restored, rather than the entire data block, saving time and resources. Furthermore, this design helps improve data security. Sensitive metadata can include sensitive information such as personally identifiable information (PII) and personal health information (PHI). By managing sensitive metadata separately from the rest of the data block, this sensitive information can be better protected from unauthorized access. Finally, the correspondence between chunks and sensitive metadata enables more fine-grained permission control. For example, different access rights can be set based on the type or amount of data contained in each chunk, thereby more precisely controlling data access and use.

[0043] In some embodiments of the present application, the sensitive metadata includes file name and / or file size.

[0044] It will be appreciated that in this embodiment, the file name and file size can often provide clues about the file's contents. For example, a file named "payslip.xlsx" likely contains information related to payroll. By treating this type of information as sensitive metadata and encrypting or anonymizing it, user privacy can be protected. For files containing sensitive information, such as financial records and personal identity information, protecting their file names and sizes can prevent this information from being accessed by malicious attackers or unauthorized third parties. Many data breaches are caused by the accidental disclosure of sensitive information. Encrypting or anonymizing sensitive metadata can reduce this risk. In certain industries or regions, regulations require special handling of sensitive data to protect user privacy and security. For example, the EU's General Data Protection Regulation (GDPR) stipulates that the processing of personal data must obtain the user's explicit consent and provides additional protection for sensitive data. In certain cases, encrypting or anonymizing the file name and / or file size can reduce data processing time and resource consumption, thereby improving data processing efficiency.

[0045] In some embodiments of the present application, the bloom filter is used to map the chunk and the sensitive metadata corresponding to the chunk, specifically:

[0046] Calculate a hash value of the chunk and the sensitive metadata corresponding to the chunk, and then map the hash value to the bits of the bloom filter.

[0047] As you can understand, a Bloom filter is an extremely space-efficient probabilistic data structure. It uses a bit array and a series of hash functions to map input data to a series of positions within the bit array. This enables fast data retrieval at a relatively low space cost when processing large amounts of data. By mapping data to the bits in the Bloom filter, a data block can be quickly checked to see if it exists in a set. This provides real-time verification efficiency when processing large amounts of data, especially sensitive data. Bloom filters use bit arrays and hash functions to compress data, allowing them to store large amounts of data in a smaller storage space. This significantly saves storage space when processing large amounts of data. Bloom filters tolerate a certain false positive rate, meaning they may mistakenly detect non-existent data as present. However, they also have a low false negative rate, meaning they will not miss existing data. This makes them highly scalable when processing large amounts of data. The hash function of the Bloom filter makes it highly scalable. As the dataset grows, the Bloom filter simply adds more hash functions and bit arrays. This makes it highly scalable when processing large amounts of data.

[0048] In some embodiments of the present application, several chunks constitute the complete mirror information.

[0049] It is understandable that this embodiment divides the mirror information into multiple chunks, which can reduce the amount of data transmitted each time, reduce the pressure on network transmission, and improve transmission efficiency. If a chunk is lost or damaged during transmission, only the chunk can be retransmitted without retransmitting the entire mirror information, thereby reducing the amount of retransmitted data and improving the efficiency of error recovery. Chunks can be added or deleted as needed to meet different needs, such as increasing storage space or reducing storage pressure. Dividing the mirror information into multiple chunks can make each chunk of moderate size, avoiding the problem of low storage efficiency or waste of storage space caused by overly large or undersized data blocks. Multiple chunks can be operated and managed independently, such as for backup, recovery, migration, etc., to improve the flexibility of data management.

[0050] In some embodiments of the present application, the image information includes image layers, snapshots, and toc.digest.

[0051] It can be understood that, first of all, this embodiment can quickly and accurately obtain the status of a file or directory at a certain point in time by using the mirror layer. This is very useful when performing backup, recovery operations or troubleshooting. For example, if a system failure occurs, it can be quickly restored to the previous state by rolling back to the mirror layer. Secondly, the snapshot function can record the status of a file or directory at a certain point in time, and can easily compare the status at different time points. This can help users quickly identify which files or directories have changed within a specific time period. Finally, toc.digest is a checksum that can be used to verify the integrity of data. It can help users determine whether the mirror information has been tampered with or damaged. In summary, the use of mirror information can improve the security and reliability of data, as well as improve the efficiency of data management.

[0052] In some embodiments of the present application, the TOC structure further includes Stargz; the Stargz is used to split the complete container image into several independent layers, and the independent layers are the image layers.

[0053] It can be understood that this embodiment splits the complete container image into several independent layers, and only the changed parts can be transmitted or stored instead of the entire image. This greatly improves the efficiency of storage and transmission. When using Stargz, only the changed parts need to be read or decompressed from the storage, rather than the entire image. This can significantly reduce the startup time. Since Stargz splits the image into independent layers, each layer can be versioned separately. This makes version control more refined and flexible. If you need to update or roll back to a certain layer, you only need to operate the data of that layer, without operating the entire image. This makes update and rollback operations simpler and more efficient. Due to Stargz's layered storage mechanism, only the changed parts can be stored. For large container images, a large amount of storage space can be saved, thereby reducing storage costs. Due to Stargz's independent layer design, each layer can be used independently by other containers, improving the portability of the container. Since each layer can be independently versioned and permission managed, sensitive data can be better protected and unauthorized access can be avoided.

[0054] FIG2 is a schematic diagram of a process for checking and pulling chunk data using the TOCC structure of the present invention.

[0055] The present invention also provides a system for delayed pulling of container images, comprising any of the above-mentioned TOC structures.

[0056] In some embodiments of the present application, the system further includes: an image repository, a container engine, and a container;

[0057] The image repository is used to store the TOC file and the data file;

[0058] The container engine is used to obtain the TOC file and the data file from the image repository; the container engine is also used to extract the image information of the container image of the container and place the container image into the manifest; the container engine is also used to combine the TOC file, the data file and the manifest into any of the TOC structures.

[0059] It can be understood that the system for delayed pulling of container images in this embodiment appears to have the following advantages:

[0060] Flexibility: The system allows users to delay pulling container images when needed, rather than pulling them immediately at build time. This provides users with greater flexibility and control, allowing them to choose when to obtain container images based on actual needs.

[0061] Efficiency: By storing the metadata of the container image (TOC file and data files) in the image repository and extracting it when needed, you can avoid repeatedly building images, saving time and resources.

[0062] Scalability: The system can be easily scaled to handle multiple container images and can be configured and customized as needed.

[0063] Standardization: By using a common TOC structure and manifest, the standardization and consistency of container images can be ensured, thereby simplifying system management and maintenance.

[0064] Security: The system may also have security advantages, such as through the use of encryption technology to protect sensitive information in data files and manifests.

[0065] The present invention also provides a data verification method for pulling a container image to reduce the delay in exposing metadata, comprising:

[0066] Obtaining standard image information of a container image of a standard container, obtaining a chunk of the standard image information, obtaining sensitive metadata of the chunk, and establishing a TOC structure based on the standard image information, the chunk, and the sensitive metadata; the TOC structure is the TOC structure according to any one of claims 1 to 7;

[0067] Obtain a chunk to be verified and metadata to be verified, perform hash calculation on the chunk to be verified and the metadata to be verified to obtain a hash value, then compare the hash value with bits in the bloom filter in the TOC structure, and determine whether the chunk belongs to the standard container based on the comparison result.

[0068] It is understandable that this embodiment can detect whether the container image contains sensitive metadata through data verification, thereby reducing the risk of exposing this data. By comparing the hash value with the bits of the bloom filter in the TOC structure, it is possible to verify whether the chunk belongs to a standard container, thereby increasing the credibility of the data. This method uses hash calculation and bloom filter bit comparison to quickly and efficiently complete data verification, reducing processing time and optimizing performance. The method has a clear structure, is easy to understand and maintain, and facilitates iteration and optimization in subsequent development. In general, this method of this embodiment improves security, credibility, performance, and maintainability through data verification, hash calculation, and bloom filter bit comparison.

[0069] The present invention also provides a method for pulling container image data by reducing the delay of exposing metadata, comprising constructing a TOC structure and verifying data; wherein the TOC structure is any of the TOC structures established based on the image information of the container image of the standard container;

[0070] The data verification includes obtaining a chunk to be verified and metadata to be verified, performing a hash calculation on the chunk to be verified and the metadata to be verified to obtain a hash value, then comparing the hash value with the bits in the bloom filter in the TOC structure, and determining whether the chunk belongs to the standard container based on the comparison result.

[0071] It can be understood that this embodiment can reduce the time required to directly pull the complete image data by constructing a TOC structure and using data verification, thereby improving performance. If the image exists in the local cache, the step of downloading the complete image data from the source location can be skipped, thereby reducing network congestion and unnecessary network traffic. Through hash calculation and comparison, it can be ensured that the acquired data blocks belong to the expected container image, thereby enhancing data security. If certain data blocks are lost or damaged, it can be determined by checking the hash value and the bits of the bloom filter in the TOC structure, so that appropriate fault-tolerant processing measures can be taken. This method can be easily adapted to different container images and environments, and can also be expanded and optimized as needed. Therefore, this method of pulling container image data with reduced latency in exposing metadata can improve efficiency, security, fault-tolerant processing capabilities and flexibility.

[0072] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit the same. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solutions of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

[0073] The system provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the modules or steps in the embodiments of the present invention can be further decomposed or combined. For example, the modules in the above embodiment can be combined into one module or further divided into multiple sub-modules to complete all or part of the functions described above. The names of the modules and steps involved in the embodiments of the present invention are only for the purpose of distinguishing the modules or steps and are not to be regarded as improper limitations of the present invention.

[0074] Those skilled in the art should be able to appreciate that, in conjunction with the modules and method steps of each example described in the embodiments disclosed herein, it is possible to implement them with electronic hardware, computer software, or a combination of the two, and the programs corresponding to the software modules and method steps can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the art. In order to clearly illustrate the interchangeability of electronic hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in electronic hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.

Claims

1. A TOC structure, characterized in that: It includes a manifest, a TOC file and a data file; the TOC file is connected to the manifest and the data file respectively; The Manifest is used to store the image information of the container image; the TOC file is provided with a bloom filter; the data file is a data block of the image information; The bloom filter is used to map the data block.

2. The TOC structure according to claim 1, characterized in that: The data block includes a plurality of chunks and sensitive metadata corresponding to the plurality of chunks. Furthermore, the sensitive metadata includes file name and / or file size.

3. The TOC structure according to claim 2, characterized in that: The bloom filter is used to map the chunk and the sensitive metadata corresponding to the chunk, specifically: A hash value of the chunk and the sensitive metadata corresponding to the chunk is calculated, and then the hash value is mapped to a bit of the bloom filter.

4. The TOC structure according to claim 3, characterized in that: Several chunks constitute the complete image information.

5. The TOC structure according to claim 4, characterized in that: The image information includes image layers, snapshots, and toc.digest.

6. The TOC structure according to claim 5, characterized in that: The TOC structure also includes Stargz; the Stargz is used to split the complete container image into several independent layers, and the independent layers are the image layers.

7. A system for delayed pulling of container images, characterized in that: The TOC structure comprises the TOC structure according to any one of claims 1 to 6.

8. The system according to claim 7, characterized in that The system also includes: an image repository, a container engine, and a container; The image repository is used to store the TOC file and the data file; The container engine is used to obtain the TOC file and the data file from the image repository; The container engine is also used to extract the image information of the container image of the container and place the container image into the Manifest; the container engine is also used to assemble the TOC file, the data file and the Manifest into the TOC structure described in any one of claims 1-6.

9. A data verification method for pulling container images with reduced latency in exposing metadata, characterized in that: include: Obtaining standard image information of a container image of a standard container, obtaining a chunk of the standard image information, obtaining sensitive metadata of the chunk, and establishing a TOC structure according to the standard image information, the chunk, and the sensitive metadata; The TOC structure is the TOC structure according to any one of claims 1 to 7; A chunk to be checked and metadata to be checked are obtained, hash calculation is performed on the chunk to be checked and the metadata to be checked to obtain a hash value, and then the hash value is compared with the bits in the bloom filter in the TOC structure, and whether the chunk belongs to the standard container is determined according to the comparison result.

10. A method for pulling container image data with reduced latency in exposing metadata, characterized in that: The method comprises constructing a TOC structure and verifying data; wherein the TOC structure is a TOC structure according to any one of claims 1 to 7 established based on the image information of the container image of the standard container; The data verification includes obtaining a chunk to be verified and metadata to be verified, performing hash calculation on the chunk to be verified and the metadata to be verified to obtain a hash value, then comparing the hash value with the bits in the bloom filter in the TOC structure, and judging whether the chunk belongs to the standard container according to the comparison result.

Citation Information

Patent Citations

  • Method and apparatus for loading container image

    CN114661369A

  • Container mirror image acceleration method and application based on loading delay on demand

    CN116048728A

  • Mirror image file importing method and device, electronic equipment and storage medium

    CN116302210A

Cited By

  • Lightweight container storage method and system for edge computing scene

    CN122691720A