Mirror management methods, devices, electronic devices and storage media

By decoupling the basic business image layer and dynamic dependency components, a one-to-one mapping relationship is generated, and dependency components are loaded on demand. This solves the problems of high image management complexity and storage resource expansion, and achieves efficient image management and resource optimization.

CN120066532BActive Publication Date: 2026-11-17INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510236374.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2026-11-17
Estimated Expiration
2045-02-28

AI Technical Summary

Technical Problem

Existing technologies suffer from high complexity in image management, severe expansion of storage resources, low image transmission efficiency, high risk of version conflicts, difficulty in security updates, and serious storage redundancy.

Method used

By decoupling the basic business image layer and dynamic dependency components, a one-to-one mapping relationship is generated, and dependency components are loaded on demand to realize a dependency component resource library and dynamically build the training environment.

Benefits of technology

Optimize storage overhead, reduce operation and maintenance costs, improve platform response speed and iteration efficiency, avoid resource waste, ensure maximum resource utilization, and resolve multi-version dependency conflicts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120066532B_ABST
    Figure CN120066532B_ABST
Patent Text Reader

Abstract

This application discloses an image management method, apparatus, electronic device, and storage medium, relating to the field of cloud computing technology. This application decouples basic business images from dynamic dependency components, achieving orders-of-magnitude optimization of storage overhead, eliminating redundant storage of common dependencies, and reducing operational costs. Through a pre-configured basic image and on-demand loading mechanism for dependency components, startup latency is compressed, reducing the data transfer volume of a single environment update operation, thus improving platform response speed and iteration efficiency. The universal design of the basic business image ensures maximum resource utilization, avoiding resource waste caused by environmental differences. On-demand loading of dependency components further reduces unnecessary storage space occupation and improves overall system performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cloud computing technology, and in particular to image management methods, apparatus, electronic devices and storage media. Background Technology

[0002] In related technologies, AI (Artificial Intelligence) platforms commonly adopt containerized deployment solutions, which involve building independent container images to meet the dependency requirements of each large model that needs a customized training environment. The direct problem with this approach is the exponential expansion of storage resources. More seriously, when basic components need to be upgraded, maintenance personnel need to update all related images one by one, with operational complexity and error probability increasing linearly with the number of images. In the field of environment isolation technology, the Conda (an open-source package management and environment isolation tool) virtual environment solution has been attempted to optimize this problem. Theoretically, it can achieve dependency isolation between different models by creating multiple Conda environments within a single base image. However, in practical applications, it has been found that this solution leads to the base image size expanding to over 50GB and has the following drawbacks:

[0003] 1. Inefficient image transfer: When scheduling model training tasks, even if only a small portion of the dependencies in the environment are used, the entire giant image still needs to be loaded.

[0004] 2. Version conflict risk: Multiple Conda environments share the underlying system library. When the system library versions required by different environments are incompatible, it may cause runtime errors that are difficult to troubleshoot.

[0005] 3. Difficulty in security updates: Security patches in the base image require rebuilding all Conda environments, and the update process may break the dependencies of existing environments;

[0006] 4. Severe storage redundancy: Common dependencies between different Conda environments are repeatedly stored in the image, resulting in wasted storage space. Summary of the Invention

[0007] This application provides a mirror management method, apparatus, electronic device, and storage medium to at least solve the problem of high complexity in mirror management in related technologies.

[0008] This application provides an image management method, including:

[0009] Build a basic business image layer, which is used to provide basic components and general environment configuration to support the training of large models;

[0010] Obtain the target large model and at least one dependent component corresponding to the target large model, and generate a one-to-one mapping relationship based on the target large model and the dependent component corresponding to the target large model;

[0011] Based on the one-to-one mapping relationship, the installation packages of the dependent components corresponding to the target large model are determined, and a dependent component resource library is generated based on multiple dependent component installation packages.

[0012] In response to receiving a large model training request, the large model training request is parsed, and based on the parsing results, the installation package of the target dependent component is extracted from the dependent component resource library;

[0013] Install the target dependency component installation package on the basic business image layer to generate the target business image for training large models in response to large model training requests.

[0014] This application also provides a mirror management device, including:

[0015] The basic business image layer building module is used to build the basic business image layer, which provides basic components and general environment configuration to support large model training.

[0016] The large model configuration module is used to obtain the target large model and at least one dependent component corresponding to the target large model, and to generate a one-to-one mapping relationship based on the target large model and the dependent component corresponding to the target large model.

[0017] The dependency component resource library building module is used to determine the dependency component installation packages corresponding to the target large model based on a one-to-one mapping relationship, and generate a dependency component resource library based on multiple dependency component installation packages.

[0018] The request parsing module is used to respond to large model training requests, parse the large model training requests, and extract the target dependency component installation package from the dependency component resource library based on the parsing results.

[0019] The request and response module is used to install the target dependency component installation package on the basic business image layer, generate the target business image for training large models, and respond to large model training requests.

[0020] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for implementing a mirror management method when executing the computer program, including:

[0021] Build a basic business image layer, which is used to provide basic components and general environment configuration to support the training of large models;

[0022] Obtain the target large model and at least one dependent component corresponding to the target large model, and generate a one-to-one mapping relationship based on the target large model and the dependent component corresponding to the target large model;

[0023] Based on the one-to-one mapping relationship, the installation packages of the dependent components corresponding to the target large model are determined, and a dependent component resource library is generated based on multiple dependent component installation packages.

[0024] In response to receiving a large model training request, the large model training request is parsed, and based on the parsing results, the installation package of the target dependent component is extracted from the dependent component resource library;

[0025] Install the target dependency component installation package on the basic business image layer to generate the target business image for training large models in response to large model training requests.

[0026] This application also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of a mirror management method, including:

[0027] Build a basic business image layer, which is used to provide basic components and general environment configuration to support the training of large models;

[0028] Obtain the target large model and at least one dependent component corresponding to the target large model, and generate a one-to-one mapping relationship based on the target large model and the dependent component corresponding to the target large model;

[0029] Based on the one-to-one mapping relationship, the installation packages of the dependent components corresponding to the target large model are determined, and a dependent component resource library is generated based on multiple dependent component installation packages.

[0030] In response to receiving a large model training request, the large model training request is parsed, and based on the parsing results, the installation package of the target dependent component is extracted from the dependent component resource library;

[0031] Install the target dependency component installation package on the basic business image layer to generate the target business image for training large models in response to large model training requests.

[0032] This application also provides a computer program product, including a computer program, wherein when the computer program is executed by a processor, it implements the steps of an image management method, including:

[0033] Build a basic business image layer, which is used to provide basic components and general environment configuration to support the training of large models;

[0034] Obtain the target large model and at least one dependent component corresponding to the target large model, and generate a one-to-one mapping relationship based on the target large model and the dependent component corresponding to the target large model;

[0035] Based on the one-to-one mapping relationship, the installation packages of the dependent components corresponding to the target large model are determined, and a dependent component resource library is generated based on multiple dependent component installation packages.

[0036] In response to receiving a large model training request, the large model training request is parsed, and based on the parsing results, the installation package of the target dependent component is extracted from the dependent component resource library;

[0037] Install the target dependency component installation package on the basic business image layer to generate the target business image for training large models in response to large model training requests.

[0038] The image management method, apparatus, electronic device, and storage medium provided in this application decouple the basic business image and dynamic dependent components, thereby optimizing storage overhead by orders of magnitude, eliminating redundant storage of common dependencies, reducing operation and maintenance costs, and compressing startup latency through the pre-configuration of the basic image and the on-demand loading mechanism of dependent components. This reduces the amount of data transmitted during a single environment update operation, improving platform response speed and iteration efficiency. The universal design of the basic business image ensures maximum resource utilization and avoids resource waste caused by environmental differences. On-demand loading of dependent components further reduces unnecessary storage space occupation and improves overall system performance. Attached Figure Description

[0039] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0040] Figure 1 An application environment diagram of an image management method provided in this application embodiment;

[0041] Figure 2 A flowchart illustrating an image management method provided in an embodiment of this application;

[0042] Figure 3 A schematic diagram of module integration for an embodiment of the image management method provided in this application;

[0043] Figure 4 This application provides a schematic diagram of the basic business image construction process for an image management method.

[0044] Figure 5 A schematic diagram illustrating the workflow of a dynamically extended build engine for an image management method provided in this application embodiment;

[0045] Figure 6 A structural block diagram of a mirror management device provided in an embodiment of this application;

[0046] Figure 7 This is an internal structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0047] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0048] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0049] It should be noted that the terms "S1," "S2," etc., are used only for descriptive purposes and do not specifically refer to the order or sequence, nor are they intended to limit this application. They are merely for the convenience of describing the method of this application and should not be construed as indicating the sequential order of the steps. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.

[0050] With the rapid development of artificial intelligence technology, large-scale pre-trained models have become the core driving force for industry transformation. The field of large models is experiencing unprecedented rapid development and its popularity continues to rise. Many enterprises, institutions, organizations and universities have devoted themselves to the research, development and application of large models, regarding them as a key force to promote their own business innovation, enhance competitiveness and expand the boundaries of scientific research. Based on this, the demand for architectural innovation of enterprise-level AI platforms has emerged, that is, the platform needs to support the parallel training, evaluation and deployment of multiple large models at the same time, forming a complex technology integration system.

[0051] In a typical large-scale model production process, building the training environment is a fundamental technical challenge. Large models developed by different institutions exhibit significant technical differences: at the software level, different models have varying version requirements for deep learning frameworks such as PyTorch (an open-source deep learning framework). This fragmentation of the technical ecosystem necessitates a customized training environment for each large model. Related technologies address this by building independent container images to meet the dependency requirements of each model. Mainstream AI platforms commonly employ containerized deployment solutions. Taking Kubernetes (a cluster management system for containerized applications) cluster management as an example, when supporting N large models, the platform needs to maintain N independent images, each containing complete operations. The architecture, which includes system, base library, and model-specific dependencies, directly leads to an exponential increase in storage resources. A single image typically reaches 15-30GB in size, and supporting 50 models would generate nearly 1.5TB of image storage overhead. More seriously, when basic components (such as NVIDIA drivers) need upgrading, maintenance personnel must update all related images one by one, with operational complexity and error probability increasing linearly with the number of images. As the background technology suggests, the Conda virtual environment solution has been attempted to optimize this problem in the field of environment isolation technology. Theoretically, creating multiple Conda environments within a single base image can achieve dependency isolation between different models. For example, building a base image containing CUDA 12.1 and creating two environments within it: conda_env_A (containing PyTorch 2.2 + Python 3.10) and conda_env_B (containing PyTorch 2.4 + Python 3.11). However, in practical applications, this solution has been found to cause the base image size to balloon to over 50GB and has several drawbacks.

[0052] To address the technical challenges in managing large-scale model training images, such as image bloat, low update efficiency, and frequent version conflicts, this application provides an image management method, apparatus, electronic device, and storage medium. By decoupling the basic business image and dynamic dependency components, storage overhead is optimized by orders of magnitude, eliminating redundant storage of common dependencies and reducing operational costs. Through the pre-configuration of the basic image and the on-demand loading mechanism of dependency components, startup latency is compressed, reducing the amount of data transmitted during a single environment update operation and improving platform response speed and iteration efficiency. The universal design of the basic business image ensures maximum resource utilization and avoids resource waste caused by environmental differences. On-demand loading of dependency components enables precise scheduling and efficient reuse of multiple versions of dependency components, further reducing unnecessary storage space occupation and improving overall system performance.

[0053] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0054] The image management method provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with a data processing platform set on server 104 via a network. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. Server 104 can be implemented as a standalone server or a server cluster consisting of multiple servers.

[0055] The embodiments of this application provide, as follows: Figure 2 The image management method shown is applied to... Figure 1 Taking the terminal in the example, the explanation includes the following steps:

[0056] S1: Construct the basic business mirror layer, which is used to provide basic components and general environment configuration to support the training of large models.

[0057] It should be noted that the basic business image layer refers to the lowest level base image layer in the Docker image. As the foundation for training large models, the basic business image contains all the basic components and general environment configurations necessary for training large models. These basic components and general environment configurations include, but are not limited to, operating systems, Python interpreters, CUDA / cuDNN libraries, and commonly used data processing libraries (such as Pandas and NumPy). As a static base layer, the basic business image layer is the immutable infrastructure of the training environment.

[0058] In some specific implementations, such as Figure 4 As shown, building the basic business image layer includes:

[0059] Select the target operating system, load the kernel, and integrate the hardware drivers;

[0060] Based on the static compilation mechanism, cross-model common components are pre-configured to generate the basic business image layer. These cross-model common components include deep learning acceleration libraries, mathematical computing libraries, and distributed training frameworks. Static compilation refers to the process of compiling source code into machine code (i.e., executable code) and saving it as a binary file before the program is executed.

[0061] Specifically, a layered container image building technology is used to construct the basic business image, which includes an operating system kernel layer and a common dependency library layer. The operating system kernel layer selects the operating system required for training large models, trims unnecessary components, generates a minimal kernel, and integrates hardware drivers such as NVIDIA GPU drivers. For example, the operating system is built based on a customized Linux distribution, and hardware driver modules and security hardening components are integrated. The common dependency library layer pre-configures cross-model common deep learning acceleration libraries, mathematical calculation libraries, distributed training frameworks, and other components through static compilation, and ensures compatibility. Based on the operating system kernel layer and the common dependency library layer, the corresponding basic business image supporting the Docker container format is output, and a static base layer, namely the basic business image layer, is generated.

[0062] In the above implementation, by constructing a basic business mirror layer, it is ensured that all supported large models can run in a stable and consistent environment, avoiding training failures or performance degradation caused by environmental differences.

[0063] S2: Obtain the target large model and at least one dependent component corresponding to the target large model, and generate a one-to-one mapping relationship based on the target large model and the dependent component corresponding to the target large model.

[0064] It should be noted that large models refer to deep learning models with a parameter scale of over 10 billion, trained on massive amounts of data, and possessing the ability to understand, generate, and reason about natural language. These models are usually built from deep neural networks and are designed to improve the model's expressive power and predictive performance, enabling it to handle more complex tasks and data. The target large model refers to the machine learning model that the system supports running. Dependent components refer to the components required to build the training environment for large models.

[0065] In some specific implementations, obtaining the target large model and at least one dependent component corresponding to the target large model, and generating a one-to-one mapping relationship based on the target large model and the dependent component corresponding to the target large model includes:

[0066] Obtain multiple large models supported by the basic business image layer, as well as the unique identifier corresponding to the target large model. The unique identifier refers to the large model ID, which is used to identify the corresponding large model instance.

[0067] Obtain at least one dependent component corresponding to the target large model, as well as the attribute information of the dependent component, including detailed information such as component name and version number;

[0068] Based on the attribute information of the dependent components, the corresponding dependency items are generated, that is, the component name, version constraints and installation mode are integrated into the dependency items corresponding to the dependent components.

[0069] A one-to-one mapping is performed between the unique identifier corresponding to the target large model and the dependency item corresponding to the dependent component to generate a one-to-one mapping relationship between the target large model and the dependent component corresponding to the target large model;

[0070] After generating the one-to-one mapping, the method also includes:

[0071] Obtain the programming language version, deep learning framework version, and distributed training tool version corresponding to the target large model. That is, determine the runtime environment declaration by specifying the programming language version, deep learning framework version, and distributed training tool version.

[0072] Based on multiple one-to-one mapping relationships, as well as the programming language version, deep learning framework version, and distributed training tool version corresponding to the target large model, a large model configuration table is generated.

[0073] Specifically, the large model configuration table should include at least the model ID, runtime environment declaration, and a dependency list generated based on dependencies. It should employ a declarative configuration file in YAML (a readable data serialization format) to establish a precise mapping between the large model and its dependent components. The YAML configuration file should contain the following core fields:

[0074] model_profile:

[0075] model_id:qwen-72b

[0076] runtime:

[0077] Python 3.10.12

[0078] PyTorch: 2.2.2

[0079] dependencies:

[0080] -name:transformers

[0081] version: 4.41.2

[0082] install_mode:pip

[0083] -name:flash-attn

[0084] version: 2.5.8

[0085] install_mode:prebuilt

[0086] The installation mode (install_mode) supports pip, prebuilt (pre-compiled package), and source (source code compilation).

[0087] In the above implementation, by setting up a large model configuration table to record the mapping relationship between each supported large model and its required dependent components, it is possible to avoid rebuilding the entire image when the model dependencies change, and only update the corresponding entries of the configuration information. In this way, the training environment can be quickly configured and flexibly adjusted, simplifying the preparation of the training environment and effectively reducing the maintenance costs caused by changes in dependent components.

[0088] S3: Based on the one-to-one mapping relationship, determine the dependent component installation packages corresponding to the target large model, and generate a dependent component resource library based on multiple dependent component installation packages.

[0089] It should be noted that the dependency component repository includes multiple dependency component installation packages. Each dependency component installation package is stored in an independent tar.gz compressed format and comes with its corresponding metadata file.

[0090] In some specific implementations, generating a dependency component resource library based on multiple dependency component installation packages includes:

[0091] The standardized dependency component installation packages include metadata files for each dependency component. These metadata files contain compatibility identifiers, hash values, and the following core fields:

[0092] {

[0093] "checksum":"sha256:9a8b7c6d...",

[0094] "abi_compatibility":["numpy>=1.22.4,<2.0.0","pandas>=2.0.0"]

[0095] }

[0096] Based on the standardized installation packages of multiple dependent components, a dependency component resource library is generated.

[0097] In the above implementation, a dependency component resource library is constructed, which contains installation packages of different versions of all dependency components required to support large model training. These installation packages are pre-compiled and tested to ensure compatibility with the basic business image and training framework project. When training environment preprocessing is required based on the large model configuration module, the installation packages in the dependency component resource library will be extracted and installed on demand, thereby avoiding unnecessary resource waste and time consumption.

[0098] S4: In response to receiving a large model training request, parse the large model training request, and based on the parsing result, extract the target dependency component installation package from the dependency component resource library.

[0099] It should be noted that the large model training request includes the model ID, which is set by the user when uploading the large model training task. The parsing result of the large model training request includes the configuration required for the large model training task, such as the large model ID and its corresponding dependent components.

[0100] In some specific implementations, based on the parsing results, extracting the target dependency component installation package from the dependency component repository includes:

[0101] Obtain the parsing results of the large model training request, and the parsing results shall include at least the unique identifier of the large model;

[0102] Based on the large model configuration table, determine the dependencies corresponding to the unique identifier of the large model.

[0103] Based on the dependency component resource library, match and extract the installation packages of the target dependency components corresponding to the dependency items.

[0104] In some specific implementations, after extracting the target dependency component installation package from the dependency component repository, the method further includes:

[0105] Obtain the metadata file corresponding to the installation package of the target dependent component. The metadata file should include at least a compatibility identifier and a hash value.

[0106] The installation package of the target dependent components is verified based on the compatibility identifier and hash value.

[0107] Specifically, such as Figure 5 As shown, large model training requests are parsed by a dynamically extended build engine. This engine executes the following process when the training task starts: extracting dependencies from the configuration file based on the model ID specified when the task is submitted; initiating a batch query request to the dependency component repository to obtain the installation packages of the corresponding dependencies; retrieving the installation packages of the dependencies from the repository, obtaining the metadata files of the required dependencies, verifying the checksum (integrity check, based on hash value check), and performing compatibility checks based on the compatibility identifier; installing the dependency component packages sequentially on the basic business image to build the large model training environment; and outputting the target business image that meets the requirements for large model training.

[0108] In the above implementation, the dynamically extended building engine is responsible for dynamically building an isolated training environment based on the static base layer when the training task of a large model is started. The engine also enables the construction of the dynamic extension layer, thereby realizing the "static base layer + dynamic extension layer" architecture of the large model training environment. By loading dependent components on demand and isolating the environment, the efficiency of image management is improved, and the multi-model support capability and resource utilization efficiency of the AI ​​platform are enhanced.

[0109] In some specific implementations, the above method further includes:

[0110] Choose the target hash function, which can include SHA-256, MD5, etc., and can be selected according to actual needs;

[0111] The selected hash function is used to calculate the hash value of the original data corresponding to the required dependent components, generating a fixed-length hash value;

[0112] Map the original data to the hash value and store the resulting mapping relationship;

[0113] When integrity verification is required, the original data corresponding to the required dependent components is extracted, and the hash value of the original data is calculated using the target hash function selected above to obtain the current hash value calculation result.

[0114] The current hash value is calculated and compared with the received hash value to obtain the comparison result.

[0115] If the comparison results are inconsistent, the data integrity is determined to be low. The required dependent components are then retrieved again, and the integrity check is repeated until the integrity standard is met.

[0116] If the comparison results are consistent, the data integrity is considered high. At this point, a compatibility check is performed based on the compatibility flag to determine the final dependent component installation package.

[0117] In the above implementation, using a hash function to fully verify the data corresponding to the installation package of the dependent components can improve the accuracy of the target business image generation results used for training large models.

[0118] S5: Install the target dependency component installation package on the basic business image layer to generate the target business image for training large models in response to large model training requests.

[0119] It should be noted that the target business image refers to the large model training environment image, as described in the steps above, which involves using a dynamically extended build engine to parse and execute the task of installing the target dependency component installation package on the basic business image layer.

[0120] In some specific embodiments, the above method further includes:

[0121] Obtain the core code logic of the training framework corresponding to the target large model;

[0122] Based on the core code logic, training framework project files are generated to build the training framework project layer.

[0123] Specifically, such as Figure 3 As shown, the training framework project layer supports multiple programming languages ​​and frameworks to accommodate the preferences and needs of different developers. It is managed independently as a code repository, achieving physical isolation between the framework code and the base image. The training framework project module carries the core code logic for training large models. The flexibility of this module is crucial because with the rapid development of AI technology, new training algorithms and optimization strategies are constantly emerging, requiring frequent updates to adapt to the latest research results. By dynamically loading the training framework project as an independent module, it is possible to quickly iterate the framework code without affecting other components, thereby accelerating the application of new algorithms.

[0124] In the above implementation, the target business image is constructed and the corresponding training framework project file is selected to run the target business image to perform large model training tasks. A training framework project module containing the core code logic of large model training is created, which supports independent updates of the framework code to adapt to the latest training algorithms and optimization strategies. This improves the flexibility and scalability of image management and ensures efficient updates and maintenance.

[0125] The above-described image management method includes: constructing a basic business image layer, which is used to provide basic components and general environment configurations to support large model training; obtaining a target large model and at least one dependent component corresponding to the target large model, and generating a one-to-one mapping relationship based on the target large model and the dependent component corresponding to the target large model; determining the installation package of the dependent component corresponding to the target large model based on the one-to-one mapping relationship, and generating a dependent component resource library based on multiple dependent component installation packages; and in response to receiving a large model training request, parsing the large model training request, and extracting the target dependent component installation package from the dependent component resource library based on the parsing result. Install the target dependency component installation package on the basic business image layer to generate the target business image for training large models in response to large model training requests. The beneficial effects of this application include: (1) Efficient update and maintenance: Through modular design, this application decouples the static components and dynamic dependency components for building the large model training environment image, decomposes them into multiple independent and configurable components, so that when the model dependency is updated or the framework is upgraded, only the changed parts need to be accurately updated, avoiding the reconstruction of the entire image and the cumbersome process of copying large files, improving update efficiency, and also achieving order-of-magnitude optimization of storage overhead, eliminating the duplicate storage of common dependency components, and reducing Operation and maintenance costs; (2) Resource optimization and utilization: The universal design of the basic business image ensures the maximum utilization of resources and avoids resource waste caused by environmental differences. At the same time, the on-demand extraction mechanism of the dependent component resource package further reduces unnecessary storage space occupation and improves the overall system performance. The startup delay time is compressed by the basic image pre-setting and the dependent on-demand loading mechanism. At the same time, the time consumed by the framework update is also compressed. When the version of the model dependent component changes, the operation and maintenance personnel only need to maintain the large model configuration module without triggering the image reconstruction process, so as to achieve immediate effect. The on-demand loading mechanism of dependent components reduces the data transmission volume of a single environment update operation. (3) Flexibility and scalability: The introduction of the large model configuration module makes the configuration of the training environment more flexible and easier to expand. Whether it is adding new model support or adjusting the version of dependent components, it can be achieved by simply updating the configuration table without making major adjustments to the image structure. (4) By introducing a dynamic expansion building engine, it ensures that each large model training task uses an independent space, solves the problem of multi-version dependency conflict, and significantly improves the efficiency of image management, reduces image storage overhead, compresses the time consumption of dependent component updates, reduces the startup delay of training tasks, and improves the overall performance of the system.

[0126] It should be understood that, although Figures 2-5The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figures 2-5 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.

[0127] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0128] Embodiments of this application also provide a mirror management device, such as... Figure 6 As shown, it includes a basic business image layer building module, a large model configuration module, a dependent component resource library building module, a request parsing module, and a request response module.

[0129] The basic business image layer building module is used to build the basic business image layer, which provides basic components and general environment configuration to support large model training.

[0130] The large model configuration module is used to obtain the target large model and at least one dependent component corresponding to the target large model, and to generate a one-to-one mapping relationship based on the target large model and the dependent component corresponding to the target large model.

[0131] The dependency component resource library building module is used to determine the dependency component installation packages corresponding to the target large model based on a one-to-one mapping relationship, and generate a dependency component resource library based on multiple dependency component installation packages.

[0132] The request parsing module is used to respond to large model training requests, parse the large model training requests, and extract the target dependency component installation package from the dependency component resource library based on the parsing results.

[0133] The request and response module is used to install the target dependency component installation package on the basic business image layer, generate the target business image for training large models, and respond to large model training requests.

[0134] In this embodiment, the image management device further includes a training framework project layer construction module, which is used for:

[0135] Obtain the core code logic of the training framework corresponding to the target large model;

[0136] Based on the core code logic, training framework project files are generated to build the training framework project layer.

[0137] In this embodiment, constructing the basic service mirror layer includes:

[0138] Select the target operating system, load the kernel, and integrate the hardware drivers;

[0139] Based on a static compilation mechanism, pre-configured cross-model common components are used to generate a basic business image layer.

[0140] In this embodiment, obtaining the target large model and at least one dependent component corresponding to the target large model, and generating a one-to-one mapping relationship based on the target large model and the dependent component corresponding to the target large model includes:

[0141] Obtain the multiple large models supported by the basic business image layer, as well as the unique identifier corresponding to the target large model;

[0142] Obtain at least one dependent component corresponding to the target large model, as well as the attribute information of the dependent component;

[0143] Based on the attribute information of the dependent components, generate the corresponding dependencies for the dependent components;

[0144] A one-to-one mapping is performed between the unique identifier corresponding to the target large model and the dependency item corresponding to the dependent component to generate a one-to-one mapping relationship between the target large model and the dependent component corresponding to the target large model;

[0145] After generating the one-to-one mapping, the method also includes:

[0146] Obtain the programming language version, deep learning framework version, and distributed training tool version corresponding to the target large model;

[0147] Based on multiple one-to-one mapping relationships, as well as the programming language version, deep learning framework version, and distributed training tool version corresponding to the target large model, a large model configuration table is generated.

[0148] In this embodiment, generating a dependency component resource library based on multiple dependency component installation packages includes:

[0149] Standardize the installation packages of dependent components. The standardized installation packages of dependent components include metadata files corresponding to the dependent components.

[0150] Based on the standardized installation packages of multiple dependent components, a dependency component resource library is generated.

[0151] In this embodiment, based on the parsing results, the extraction of the target dependency component installation package from the dependency component resource library includes:

[0152] Obtain the parsing results of the large model training request, and the parsing results shall include at least the unique identifier of the large model;

[0153] Based on the large model configuration table, determine the dependencies corresponding to the unique identifier of the large model.

[0154] Based on the dependency component resource library, match and extract the installation packages of the target dependency components corresponding to the dependency items.

[0155] In this embodiment, the mirror management device further includes a verification module, which is used for:

[0156] Obtain the metadata file corresponding to the installation package of the target dependent component. The metadata file should include at least a compatibility identifier and a hash value.

[0157] The installation package of the target dependent components is verified based on the compatibility identifier and hash value.

[0158] For specific limitations regarding the image management device, please refer to the limitations on the image management method above, which will not be repeated here. Each module in the aforementioned image management device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0159] Embodiments of this application also provide an electronic device, which may be a server, and its internal structure diagram may be as follows. Figure 7 As shown, this electronic device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores arbitration control data. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements a mirror management method.

[0160] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0161] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in the image management method embodiments, including:

[0162] S1: Construct the basic business mirror layer, which is used to provide basic components and general environment configuration to support the training of large models;

[0163] S2: Obtain the target large model and at least one dependent component corresponding to the target large model, and generate a one-to-one mapping relationship based on the target large model and the dependent component corresponding to the target large model;

[0164] S3: Based on the one-to-one mapping relationship, determine the dependent component installation packages corresponding to the target large model, and generate a dependent component resource library based on multiple dependent component installation packages;

[0165] S4: In response to receiving a large model training request, parse the large model training request, and based on the parsing result, extract the target dependency component installation package from the dependency component resource library;

[0166] S5: Install the target dependency component installation package on the basic business image layer to generate the target business image for training large models in response to large model training requests.

[0167] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in the image management method embodiments at runtime, including:

[0168] S1: Construct the basic business mirror layer, which is used to provide basic components and general environment configuration to support the training of large models;

[0169] S2: Obtain the target large model and at least one dependent component corresponding to the target large model, and generate a one-to-one mapping relationship based on the target large model and the dependent component corresponding to the target large model;

[0170] S3: Based on the one-to-one mapping relationship, determine the dependent component installation packages corresponding to the target large model, and generate a dependent component resource library based on multiple dependent component installation packages;

[0171] S4: In response to receiving a large model training request, parse the large model training request, and based on the parsing result, extract the target dependency component installation package from the dependency component resource library;

[0172] S5: Install the target dependency component installation package on the basic business image layer to generate the target business image for training large models in response to large model training requests.

[0173] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0174] Embodiments of this application also provide a computer program product, which includes a computer program. When executed by a processor, the computer program implements the steps in the image management method embodiments, including:

[0175] S1: Construct the basic business mirror layer, which is used to provide basic components and general environment configuration to support the training of large models;

[0176] S2: Obtain the target large model and at least one dependent component corresponding to the target large model, and generate a one-to-one mapping relationship based on the target large model and the dependent component corresponding to the target large model;

[0177] S3: Based on the one-to-one mapping relationship, determine the dependent component installation packages corresponding to the target large model, and generate a dependent component resource library based on multiple dependent component installation packages;

[0178] S4: In response to receiving a large model training request, parse the large model training request, and based on the parsing result, extract the target dependency component installation package from the dependency component resource library;

[0179] S5: Install the target dependency component installation package on the basic business image layer to generate the target business image for training large models in response to large model training requests.

[0180] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the steps in the image management method embodiments, including:

[0181] S1: Construct the basic business mirror layer, which is used to provide basic components and general environment configuration to support the training of large models;

[0182] S2: Obtain the target large model and at least one dependent component corresponding to the target large model, and generate a one-to-one mapping relationship based on the target large model and the dependent component corresponding to the target large model;

[0183] S3: Based on the one-to-one mapping relationship, determine the dependent component installation packages corresponding to the target large model, and generate a dependent component resource library based on multiple dependent component installation packages;

[0184] S4: In response to receiving a large model training request, parse the large model training request, and based on the parsing result, extract the target dependency component installation package from the dependency component resource library;

[0185] S5: Install the target dependency component installation package on the basic business image layer to generate the target business image for training large models in response to large model training requests.

[0186] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in 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 beyond the scope of this application.

[0187] The foregoing has provided a detailed description of a mirror management method, apparatus, electronic device, and storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A mirror management method characterized by, include: Construct a basic business image layer, which is used to provide basic components and general environment configuration to support the training of large models; Obtain the target large model and at least one dependent component corresponding to the target large model. Based on the target large model and the dependent component corresponding to the target large model, generate a one-to-one mapping relationship, including: Obtain the multiple large models supported by the basic business image layer, and the unique identifier corresponding to the target large model; obtain at least one dependent component corresponding to the target large model, and the attribute information of the dependent component; Based on the attribute information of the dependent component, generate the dependency item corresponding to the dependent component; A one-to-one mapping is performed between the unique identifier corresponding to the target large model and the dependency item corresponding to the dependent component to generate a one-to-one mapping relationship between the target large model and the dependent component corresponding to the target large model; Based on the one-to-one mapping relationship, the dependent component installation packages corresponding to the target large model are determined, and a dependent component resource library is generated based on multiple dependent component installation packages. The dependent component resource library includes multiple dependent component installation packages, and each dependent component installation package is compressed and stored in an independent format. In response to receiving a large model training request, the large model training request is parsed through the dynamically extended build engine, and the target dependency component installation package is extracted from the dependency component resource library based on the parsing result; The step of extracting the target dependency component installation package from the dependency component resource library based on the parsing results includes: Obtain the parsing result of the large model training request, wherein the parsing result includes at least a unique identifier for the large model; Based on the large model configuration table, determine the dependencies corresponding to the unique identifier of the large model; Based on the dependent component resource library, match and extract the target dependent component installation package corresponding to the dependent item; The target dependent component installation package is subjected to integrity verification, and after the integrity verification passes, the target dependent component installation package is subjected to compatibility verification based on the compatibility identifier to determine the final target dependent component installation package. The target dependency component installation package is installed on the basic business image layer to generate a target business image for training a large model in response to the large model training request.

2. The mirror management method of claim 1, wherein, The method further includes: Obtain the core code logic of the training framework corresponding to the target large model; Based on the core code logic, training framework project files are generated to construct the training framework project layer.

3. The mirror management method according to claim 1, characterized in that, Building the basic business image layer includes: Select the target operating system, load the kernel, and integrate the hardware drivers; Based on a static compilation mechanism, pre-configured cross-model general components are used to generate the basic business image layer.

4. The mirror management method according to claim 1, characterized in that, Obtain the target large model and at least one dependent component corresponding to the target large model. Based on the target large model and the dependent component corresponding to the target large model, generate a one-to-one mapping relationship, including: After generating the one-to-one mapping relationship, the method further includes: Obtain the programming language version, deep learning framework version, and distributed training tool version corresponding to the target large model; based on the multiple one-to-one mapping relationships and the programming language version, deep learning framework version, and distributed training tool version corresponding to the target large model, generate a large model configuration table.

5. The mirror management method according to claim 1, characterized in that, Based on the installation packages of the aforementioned dependent components, a dependent component resource library is generated, including: The dependent component installation package is standardized, wherein the standardized dependent component installation package includes metadata files corresponding to the dependent components; Based on the standardized installation packages of the dependent components, the dependent component resource library is generated.

6. The mirror management method according to claim 1, characterized in that, After extracting the target dependency component installation package from the dependency component repository, the method further includes: Obtain the metadata file corresponding to the installation package of the target dependent component, wherein the metadata file includes at least a compatibility identifier and a hash value; The target dependent component installation package is verified based on the compatibility identifier and hash value.

7. A mirror management apparatus for implementing the mirror management method according to any one of claims 1-5, characterized in that, include: The basic business image layer construction module is used to build the basic business image layer, which is used to provide basic components and general environment configuration to support the training of large models; The large model configuration module is used to obtain the target large model and at least one dependent component corresponding to the target large model, and to generate a one-to-one mapping relationship based on the target large model and the dependent component corresponding to the target large model. The dependency component resource library construction module is used to determine the dependency component installation package corresponding to the target large model based on the one-to-one mapping relationship, and generate a dependency component resource library based on multiple dependency component installation packages. The request parsing module is used to respond to a large model training request, parse the large model training request, and extract the target dependency component installation package from the dependency component resource library based on the parsing result. The request and response module is used to install the target dependency component installation package on the basic business image layer, generate a target business image for training a large model, and respond to the large model training request.

8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the image management method as described in any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the image management method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Container mirror image creating method and device, electronic equipment and storage medium

    CN118444943A