Artificial intelligence training platform data accelerated reading method and device and medium

By designing an elastic data set based on a distributed cache system on the artificial intelligence training platform, the problem of low data loading efficiency is solved, the efficiency of data interaction is improved and the complexity of management is simplified, and an efficient data management solution is provided.

CN118550653APending Publication Date: 2024-08-27SHANDONG INSPUR SCI RES INST CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410749060.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

The artificial intelligence training platform has low efficiency when loading data, which affects the training process. Existing technology cannot effectively solve the problems of data management complexity and interactive reading and writing efficiency.

Method used

Design an elastic data set based on a distributed cache system, which abstracts data from multiple external storage sources through customized resource management. It adopts hierarchical caching strategies and preloading strategies to optimize data caching and scheduling, simplify data management, and improve data quality. Interaction efficiency.

Benefits of technology

It improves the efficiency of data interaction reading and writing, improves the execution efficiency of workflow tasks, does not need to modify the application, simplifies the complexity of data management, and is more flexible and efficient than the traditional data persistent volume storage method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550653A
    Figure CN118550653A
Patent Text Reader

Abstract

The invention relates to the field of artificial intelligence, in particular to an accelerated reading method and device for data of an artificial intelligence training platform and a medium. The invention provides an elastic data set. The elastic data set provides a data abstraction method, so that data files, code files and model files stored in storage resources such as NFS, OSS, HDFS and Cehp can be flexibly moved, copied, cleared, converted and managed in cloud native workflow task instances arranged by K8s. Compared with a traditional data persistent volume (PVC) storage method, the data management complexity is simplified through the elastic data set, and the data interaction read-write efficiency is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence training platform data acceleration, and specifically to an artificial intelligence training platform data acceleration reading method, device and medium. Background Art

[0002] The artificial intelligence training platform supports Kubernetes cloud-native distributed task orchestration tools to facilitate the orchestration of model training tasks. By using the workflow orchestration tool to generate tasks, K8s converts the workflow task WorkFlow into the corresponding instance task, namely Pod, to complete the entire training process. The same workflow task is completed by multiple Pods, and each Pod executes according to the specified orchestration order. Pod is the smallest scheduling unit of K8s, and the resources are isolated from each other. It will be scheduled to different physical nodes. Each Pod needs to share the same PVC storage resources to complete the continuous interactive reading and writing of data set files, code files, and model files.

[0003] When training an artificial intelligence platform now, it is necessary to load data from scratch. The amount of data is generally large, so the data loading process is slow, affecting the training efficiency. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a method, device and medium for accelerating the reading of data on an artificial intelligence training platform, so that the workflow task execution process can use data from any storage source more efficiently without modifying the application itself, namely, the elastic dataset, and define it as a custom resource management in K8s. Compared with the traditional data persistent volume (PVC) storage method, the elastic dataset simplifies the complexity of data management and effectively improves the efficiency of data interactive reading and writing.

[0005] In order to solve the technical problem, the technical solution adopted by the present invention is: a method for accelerating the reading of data of an artificial intelligence training platform, which is based on a distributed cache system and includes the following steps: S01) Design an elastic dataset. The elastic dataset is mapped from the K8s native data volume and the capacity of the elastic dataset is adjusted according to the training task. The elastic dataset abstraction aggregates and describes the data from multiple external storage sources, and the elastic dataset caches data from the external storage source, and the cached data is scheduled to the K8s node; S02) Create custom resource definitions for Dataset and Runtime. Dataset defines the external storage sources of elastic datasets, including HDFS, S3, and OSS, and configures data access methods and cache locations. Use Kubernetes' nodeAffinity affinity feature to set data cache policies and set the cache location of datasets based on node types and resource requirements. The data cache strategy adopts a layered cache strategy. After the data cache is replaced, the corresponding persistent volume declaration is created for the task instance Pod to request the corresponding data resources. After the data cache is completed, a label is added to a specific node. The scheduler will prioritize scheduling the model training task instance Pod to the node. If there is no node that meets the conditions, it will be scheduled to other nodes that do not meet the conditions. Runtime design: Distributed cache runtime accelerates data access, sets data pre-fetching and pre-heating strategies, and cache data eviction strategies, and configures the data migration process from external storage to cached data sets; S03) Data operation: Set the elastic data set preloading strategy. Through preloading, the platform training data stored in HDFS, S3, and OSS is imported into the Dataset for K8s cluster scheduling.

[0006] Furthermore, elastic dataset orchestration schedules the cached dataset to a specific K8s node, and when the workflow creates the corresponding instance pod when executing the model training task, it schedules the instance to the preloaded dataset node, forming a collaborative orchestration scenario for the dataset and the workflow instance.

[0007] Furthermore, the K8s cluster is configured with a Dataset controller and a Runtime controller, which are used to complete elastic datasets and support runtime scheduling, migration, and elastic scaling.

[0008] Furthermore, the K8s cluster configures a scheduler, which prioritizes scheduling Pods that use data sets to nodes with data cache based on the cache information provided by the Runtime.

[0009] Furthermore, the elastic data set preloading strategy in step S03) includes one-time, timed or event-triggered.

[0010] Furthermore, in step S03), the data set is preprocessed during the data import process, and the preprocessing includes conversion, segmentation and dimensionality reduction.

[0011] Furthermore, the description of the data in the multiple external storage sources by the elastic data set includes: the total data volume of the data set, the current cache space size and the directional scheduling accuracy.

[0012] Furthermore, the metadata of the elastic dataset is loaded locally to the K8s node and the dataset information is recorded. When the local dataset is deleted, all metadata information will be lost. When the dataset is rebuilt, the dataset is retrieved from the external storage source.

[0013] The present invention also discloses an artificial intelligence training platform data accelerated reading device, comprising a processor and a memory storing program instructions, wherein the processor is configured to execute the artificial intelligence training platform data accelerated reading method as described above when running the program instructions.

[0014] The present invention also discloses a storage medium storing program instructions, which, when running, execute the artificial intelligence training platform data acceleration reading method as described above.

[0015] Beneficial effects of the invention: The invention proposes a method that allows the workflow task execution process to use data from any storage source more efficiently without modifying the application itself, namely, an elastic dataset, and defines it as a custom resource management in K8s. Compared with the traditional data persistent volume (PVC) storage method, the elastic dataset simplifies the complexity of data management and effectively improves the efficiency of data interactive reading and writing. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A schematic diagram of a distributed cache system. DETAILED DESCRIPTION

[0017] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.

[0018] Example 1 This embodiment discloses a method for accelerating the reading of data on an artificial intelligence training platform. Figure 1 The distributed cache system shown includes the following steps: S01) Design an elastic dataset. The elastic dataset is mapped from the K8s native data volume and the capacity of the elastic dataset is adjusted according to the training task. The elastic dataset abstraction aggregates and describes the data from multiple external storage sources, and the elastic dataset caches data from the external storage source, and the cached data is scheduled to the K8s node; S02) Create custom resource definitions for Dataset and Runtime. Dataset defines the external storage sources of elastic datasets, including HDFS, S3, and OSS, and configures data access methods and cache locations. Use Kubernetes' nodeAffinity affinity feature to set data cache policies and set the cache location of datasets based on node types and resource requirements. The data caching strategy adopts a layered caching strategy. According to the access frequency, access mode, size and type of the data, frequently accessed data is retained in fast storage media, while infrequently accessed data is moved to slower or lower-cost storage media. Fast access layers such as SRAM, DRAM or SSD are used to store frequently accessed hot data, and larger capacity and lower-cost storage media such as HDD or network attached storage (NAS) are used to store less frequently accessed data. After the data cache is replaced, the corresponding persistent volume declaration is created for the task instance Pod to request the corresponding data resources. After the data cache is completed, a label is added to a specific node, and the scheduler will prioritize scheduling the model training task instance Pod to the node. If there is no node that meets the conditions, it will be scheduled to other nodes that do not meet the conditions.

[0019] Runtime design of distributed cache accelerates data access. The model training process needs to frequently access a large number of data sets, which can provide effective data acceleration capabilities, set data pre-fetching and preheating strategies, and cache data eviction strategies, and configure the data migration process from external storage to cached data sets; S03) Data operation: Set the elastic data set preloading strategy. Through preloading, the platform training data stored in HDFS, S3, and OSS is imported into the Dataset for K8s cluster scheduling.

[0020] In this embodiment, the elastic dataset creates a data abstraction layer, allowing data to be switched between storage resources such as NFS, OSS, HDFS, and Ceph without paying attention to the underlying data storage source. All data operations are very transparent to platform developers. There is no need to worry about the efficiency of accessing data in remote data sources, nor the convenience of data source management. You only need to access the elastic dataset resources mapped by the K8s native data volume.

[0021] The K8s scheduler formulates intelligent, topology-based scheduling strategies for elastic dataset resources. Elastic dataset orchestration schedules cached datasets to specific K8s nodes. When the workflow creates the corresponding instance pod when executing the model training task, it schedules the instance to the preloaded dataset node. The dataset and workflow instance form a collaborative orchestration scenario.

[0022] The elastic dataset abstraction aggregates and describes data from multiple storage sources, providing observability for better management and utilization of data, such as the total amount of data in the dataset, the current cache space size, and the accuracy of directional scheduling. Evaluate whether the cache system needs to be expanded or reduced based on the dataset; determine the data storage location and access method based on data migration and characteristics; and evaluate the efficiency and performance of the cache system based on the current cache space size and scheduling accuracy. The metadata of the dataset is loaded locally to the K8s node and records the information of the dataset, such as the size of the data volume, the number of files, etc. When the local dataset is deleted, all metadata information will be lost and the dataset needs to be retrieved from the underlying storage system when the dataset is rebuilt.

[0023] In this embodiment, the K8s cluster is configured with a Dataset controller and a Runtime controller. The Dataset controller and the Runtime controller are used to complete the scheduling, migration, and elastic scaling of elastic datasets and their supported runtimes. The controllers manage and schedule application Pods that use datasets.

[0024] The K8s cluster is also configured with a scheduler. The scheduler will prioritize scheduling Pods that use data sets to nodes with data caches based on the cache information provided by the Runtime. For example, after a model training task starts executing, a corresponding task instance Pod will be created. Based on the data set information set in the task instance Pod, the task instance will be prioritized and scheduled to a node with data caches, and the data set will be mounted in the form of PVC for use.

[0025] In this embodiment, the elastic data set preloading strategy in step S03) includes one-time, timing or event triggering. During the data import process, the data set is preprocessed, and the preprocessing includes conversion, segmentation and dimensionality reduction.

[0026] This embodiment sets an elastic data set, which can dynamically adjust the scale and location of the data cache according to the characteristics of the data set and application requirements, and use the K8s affinity scheduling capability to match computing tasks with the data set location, thereby improving computing efficiency and data access speed.

[0027] Example 2 This embodiment discloses an artificial intelligence training platform data acceleration reading device, including a processor and a memory storing program instructions, wherein the processor is configured to execute the artificial intelligence training platform data acceleration reading method as described in Example 1 when running the program instructions.

[0028] Example 3 This embodiment discloses a storage medium storing program instructions, which, when running, execute the artificial intelligence training platform data acceleration reading method as described in Example 1.

[0029] The computer-readable storage medium mentioned above may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.

[0030] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiment of the present disclosure. The aforementioned storage medium may be a non-transient storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, and other media that can store program codes, or a transient storage medium.

[0031] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent only possible changes. Unless explicitly required, separate components and functions are optional, and the order of operations may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and the claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of one or more associated listings. In addition, when used in this application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the presence of other identical elements in the process, method or device including the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.

[0032] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. The technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. The technicians may clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.

[0033] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically separately, or two or more units may be integrated in one unit.

[0034] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.

Claims

1. A method for accelerating data reading of an artificial intelligence training platform, characterized in that: This method is based on a distributed cache system and includes the following steps: S01) Design an elastic dataset. The elastic dataset is mapped from the K8s native data volume and the capacity of the elastic dataset is adjusted according to the training task. The elastic dataset abstraction aggregates and describes the data from multiple external storage sources, and the elastic dataset caches data from the external storage source, and the cached data is scheduled to the K8s node; S02) Create custom resource definitions for Dataset and Runtime. Dataset defines the external storage sources of elastic datasets, including HDFS, S3, and OSS, and configures data access methods and cache locations. Use Kubernetes' nodeAffinity affinity feature to set data cache policies and set the cache location of datasets based on node types and resource requirements. The data cache strategy adopts a layered cache strategy. After the data cache is replaced, the corresponding persistent volume declaration is created for the task instance Pod to request the corresponding data resources. After the data cache is completed, a label is added to a specific node. The scheduler will prioritize scheduling the model training task instance Pod to the node. If there is no node that meets the conditions, it will be scheduled to other nodes that do not meet the conditions. Runtime design: Distributed cache runtime accelerates data access, sets data pre-fetching and pre-heating strategies, and cache data eviction strategies, and configures the data migration process from external storage to cached data sets; S03) Data operation: Set the elastic data set preloading strategy. Through preloading, the platform training data stored in HDFS, S3, and OSS is imported into the Dataset for K8s cluster scheduling.

2. The method for accelerating reading data of an artificial intelligence training platform according to claim 1, characterized in that: Elastic dataset orchestration dispatches cached datasets to specific K8s nodes, and when the workflow creates corresponding instance pods to execute model training tasks, it dispatches instances to preloaded dataset nodes, forming a collaborative orchestration scenario for datasets and workflow instances.

3. The method for accelerating reading data of an artificial intelligence training platform according to claim 1, characterized in that: The K8s cluster is configured with the Dataset controller and the Runtime controller. The Dataset controller and the Runtime controller are used to complete the scheduling, migration, and elastic scaling of elastic data sets and their supported runtimes.

4. The method for accelerating reading data of an artificial intelligence training platform according to claim 1, characterized in that: The K8s cluster is configured with a scheduler. The scheduler prioritizes scheduling Pods that use data sets to nodes with data cache based on the cache information provided by the Runtime.

5. The method for accelerating reading data of an artificial intelligence training platform according to claim 1, characterized in that: The elastic data set preloading strategy in step S03) includes one-time, timed or event-triggered.

6. The method for accelerating reading data of an artificial intelligence training platform according to claim 1, characterized in that: In step S03), the data set is preprocessed during the data import process, and the preprocessing includes conversion, segmentation and dimensionality reduction.

7. The method for accelerating reading data of an artificial intelligence training platform according to claim 1, characterized in that: The description of the data in multiple external storage sources by the elastic dataset includes: the total data volume of the dataset, the current cache space size, and the directional scheduling accuracy.

8. The method for accelerating reading data of an artificial intelligence training platform according to claim 1, characterized in that: The metadata of the elastic dataset is loaded to the local K8s node and the dataset information is recorded. When the local dataset is deleted, all metadata information will be lost. When the dataset is rebuilt, the dataset is retrieved from the external storage source.

9. An artificial intelligence training platform data acceleration reading device, comprising a processor and a memory storing program instructions, characterized in that: The processor is configured to execute the artificial intelligence training platform data acceleration reading method as described in any one of claims 1 to 8 when running the program instructions.

10. A storage medium storing program instructions, characterized in that: When the program instructions are run, they execute the artificial intelligence training platform data acceleration reading method as described in any one of claims 1 to 8.

Citation Information

Cited By

  • Distributed training data loading method and device based on separated architecture

    CN119356892A

  • A distributed training data loading method and device based on separation architecture

    CN119356892B