Data set mounting method and system applied to AI platform
By combining the database with the AI platform, the data transparent transmission function is realized, which solves the complexity problem of mounting the AI platform data set, improves storage space utilization and data access speed, simplifies data management, and enhances data security and reliability.
Patent Information
- Application Number
- CN202410800575.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-09-27
AI Technical Summary
The existing AI platform's data set mounting method is complex, resulting in redundant storage and complicated backup and recovery when sharing data, and is not conducive to the flexibility and operability of the data set.
Through the combination of database and AI platform, the data transparent transmission function is realized. Users create resource groups to bind training tasks, use the Master node and k8s scheduler to schedule resources, create a virtual file system, and mount the host directory when the container starts to realize automatic mounting of data sets. loading and management.
It improves storage space utilization and data access speed, simplifies data management, supports large-scale data processing, and enhances data security and reliability.
Smart Images

Figure CN118708291A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence (AI) technology, and in particular to a method and system for mounting a data set applied to an AI platform. Background Art
[0002] At present, there are various solutions for mounting datasets on AI platforms. Many AI platforms provide the function of mounting datasets, allowing users to easily upload their own datasets to the platform for training and testing. There are many ways to mount datasets, the most common of which is to import datasets into the platform through file upload or API interface. Other AI platforms also provide dedicated storage cloud disks or cloud hosts for docking, and users can upload files to the corresponding storage for management. After the user uploads the file, it should be visible and operable on the platform, but in scenarios where data sharing is required, users need to transfer the data in the local environment by themselves, or share it through a specific cloud disk. Therefore, there is an urgent need for a convenient and secure method for automatic dataset mounting to facilitate users to perform training operations on datasets.
[0003] Manual mounting is used to use datasets in training tasks. In actual usage scenarios, after creating a task, the dataset needs to be imported into the platform by uploading. If the dataset needs to be changed, it needs to be deleted and uploaded again. This results in a complex dataset management structure. In scenarios where data sharing occurs, redundant data will occupy storage, and the complexity of subsequent backup, recovery, and multi-version iteration operations is too high, which is not conducive to improving the flexibility and operability of datasets for training. Summary of the invention
[0004] The purpose of the present invention is to provide a data set mounting method and system applied to an AI platform, which realizes the function of data transparent transmission by combining a database with an AI platform.
[0005] The technical solution adopted by the present invention is:
[0006] A method for mounting a data set applied to an AI platform comprises the following steps:
[0007] Step 1: The user creates a resource group and binds the training task to the data set. When the user initiates a request, the user sends the relevant information of the resource group to the AI platform system.
[0008] Step 2: The AI platform system determines whether the resources required by the resource group are sufficient; if yes, execute step 3; otherwise, execute step 2;
[0009] Step 3: The AI platform system sends a request to the Master node, and the Master node allocates the resource group to the Pod that meets the corresponding conditions according to the scheduling policy rules;
[0010] Step 4: The Master node reads the task database to determine whether the training task is bound to a data set; if so, specify the directory as the mount point, and configure it to map the mount point to the host when the container is started, and execute step 5; otherwise, execute step 5;
[0011] Step 5: Start a container on the specified node according to the resource requirements of the submitted resource group, and perform the corresponding training task through the container;
[0012] Step 6: When the container is stopped or deleted, the mount point is disassociated from the directory on the host and the training ends.
[0013] Furthermore, the training task in step 1 is bound to the data set and stored in a corresponding task database, which includes the task directory and resource parameter information.
[0014] Furthermore, in step 3, the AI platform system sends the request to the Master node. The k8sscheduler component on the Master node schedules the resource group to run on the specified pod according to the preset scheduling policies and rules of node resource availability, load balancing, and affinity. The k8s scheduler component sends the description information of the specified Pod to the kubelet component on the corresponding node.
[0015] Furthermore, in step 5, the kubelet component is responsible for creating and managing the Pod's containers on the corresponding node, and maintaining communication with the k8sscheduler component to update the status of the Pod.
[0016] Furthermore, in step 5, a virtual file system (VFS) is created when the container is running. The virtual file system (VFS) is composed of a file system on the host and a file system inside the container.
[0017] Specifically, when starting a container, one or more directories will be specified as mount points, and these directories will be associated with the file system on the host. At the bottom level, the container runtime creates a virtual file system (VFS), which consists of the file system on the host and the file system inside the container. When the container is started, the container runtime maps the mount point to the directory on the host, so that file operations inside the container can directly access files on the host. When the container is stopped or deleted, the mount point is disassociated from the directory on the host.
[0018] Furthermore, in step 6, when the user deletes the corresponding training task, the AI platform system deletes the corresponding pod through the k8sscheduler component, and the CSI deletes the PVC mount simultaneously; then the corresponding PV is deleted according to the PVC to delete the entire training container resources to prevent the occurrence of unpaired pv / pvc.
[0019] A data set mounting system applied to an AI platform comprises a node cluster, wherein the node cluster comprises a master node, a management node, a storage node and a training node; the management node is equipped with an AI platform system, through which a user creates a resource group and binds a training task to a data set; the AI platform system receives relevant information of the resource group sent by the user when initiating a request and forwards the user request to the master node; a k8s scheduler component is arranged on the master node, and the k8sscheduler component schedules the resource group to run on a specified pod according to the availability, load balancing and affinity scheduling strategies and rules of preset node resources; the k8s scheduler component sends the description information of the specified Pod to the kubelet component on the corresponding master node; the kubelet component is responsible for creating and managing containers of the Pod on the corresponding node, and keeps communicating with the k8s scheduler component to update the status of the Pod; the storage node is equipped with a server-side NFS, and the storage node stores a number of data sets to provide the data sets to the container through directory mounting; a client NFS is arranged on the training node, and the client NFS is used to create and manage Pods, and the Pods include one or more containers, and the containers are used for training training tasks.
[0020] The present invention adopts the above technical solution, and by implementing the solution of mounting the AI platform data set of the database, the size of the storage space and the data access speed are improved, and multiple storage devices can be merged into one logical unit for easy management and maintenance. By mounting external storage devices, the storage capacity of the computer system can be expanded to meet the needs of large-scale data processing. Database mounting can also increase data access speed, reduce data transmission delay, and improve system performance. Database mounting can also realize data backup and recovery to ensure data security and reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments;
[0022] Figure 1 This is a structural schematic diagram of a data set mounting system applied to an AI platform in the present invention;
[0023] Figure 2 The figure is a flow chart of a method for mounting a data set applied to an AI platform according to the present invention. Implementation
[0025] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0026] like Figure 1 As shown in or 2, the present invention discloses a data set mounting system applied to an AI platform, including a node cluster, the node cluster including a Master node, a management node, a storage node and a training node; the management node is equipped with an AI platform system, and the user creates a resource group through the AI platform system and binds the training task to the data set; the AI platform system receives the relevant information of the resource group sent by the user when initiating a request and forwards the user request to the Master node; the Master node is provided with a k8s scheduler component, and the k8s scheduler component schedules the resource group to run on a specified pod according to the availability, load balancing, and affinity scheduling strategies and rules of preset node resources; the k8s scheduler component sends the description information of the specified Pod to the kubelet component on the corresponding Master node; the kubelet component is responsible for creating and managing the container of the Pod on the corresponding node, and maintains communication with the k8s scheduler component to update the status of the Pod; the storage node is equipped with a server-side NFS, and the storage node stores several data sets to provide the data set to the container through directory mounting; the training node is provided with a client NFS, and the client NFS is used to create and manage Pods, and the pods include one or more containers, and the containers are used for training training tasks.
[0027] Specifically, a system that organically integrates various modules such as a dataset component, a k8s scheduler component, and an NFS component is set up according to the method of the present invention to optimize the dataset and training process, and facilitate user binding and use. A mounting process is set up to make scheduling and mapping mounting safer by maintaining the database table, and to achieve an orderly process for training datasets and tasks.
[0028] A method for mounting a data set applied to an AI platform comprises the following steps:
[0029] Step 1: The user creates a resource group and binds the training task to the data set. When the user initiates a request, the user sends the relevant information of the resource group to the AI platform system.
[0030] Step 2: The AI platform system determines whether the resources required by the resource group are sufficient; if yes, execute step 3; otherwise, execute step 2;
[0031] Step 3: The AI platform system sends a request to the Master node, and the Master node allocates the resource group to the Pod that meets the corresponding conditions according to the scheduling policy rules;
[0032] Step 4: The Master node reads the task database to determine whether the training task is bound to a data set; if so, specify the directory as the mount point, and configure it to map the mount point to the host when the container is started, and execute step 5; otherwise, execute step 5;
[0033] Step 5: Start a container on the specified node according to the resource requirements of the submitted resource group, and perform the corresponding training task through the container;
[0034] Step 6: When the container is stopped or deleted, the mount point is disassociated from the directory on the host and the training ends.
[0035] Furthermore, the training task in step 1 is bound to the data set and stored in a corresponding task database, which includes the task directory and resource parameter information.
[0036] Furthermore, in step 3, the AI platform system sends the request to the Master node. The k8sscheduler component on the Master node schedules the resource group to run on the specified pod according to the preset scheduling policies and rules of node resource availability, load balancing, and affinity. The k8s scheduler component sends the description information of the specified Pod to the kubelet component on the corresponding node.
[0037] Furthermore, in step 5, the kubelet component is responsible for creating and managing the Pod's containers on the corresponding node, and maintaining communication with the k8sscheduler component to update the status of the Pod.
[0038] Furthermore, in step 5, a virtual file system (VFS) is created when the container is running. The virtual file system (VFS) is composed of a file system on the host and a file system inside the container.
[0039] Specifically, when starting a container, one or more directories will be specified as mount points, and these directories will be associated with the file system on the host. At the bottom level, the container runtime creates a virtual file system (VFS), which consists of the file system on the host and the file system inside the container. When the container is started, the container runtime maps the mount point to the directory on the host, so that file operations inside the container can directly access files on the host. When the container is stopped or deleted, the mount point is disassociated from the directory on the host.
[0040] Furthermore, in step 6, when the user deletes the corresponding training task, the AI platform system deletes the corresponding pod through the k8sscheduler component, and the CSI deletes the PVC mount simultaneously; then the corresponding PV is deleted according to the PVC to delete the entire training container resources to prevent the occurrence of unpaired pv / pvc.
[0041] The specific principle of the present invention is described in detail below:
[0042] (1) As a containerized application deployment method, Pod provides a logically independent environment in which applications can run. It is the actual running environment of training tasks. When performing training, users need to obtain and use the required resources in the container within the pod. By mounting the required data sets in advance, the impact of storage load on training results during the training process can be reduced.
[0043] (2) The database is used for data retrieval and management, and can achieve long-term data storage and access capabilities. By organizing data in a set structured way, storage and reading are more efficient. Users can process data sets and training task related information separately without interfering with each other, and can also create binding relationships between project tasks in a more convenient way. When creating a pod, the system program receives the request and obtains relevant resources such as data set address, GPU, CPU, memory, etc. by reading the data set. A request to create a pod is initiated to the corresponding Master node. It has the advantages of low modification cost, convenient management, more intuitive display, and mounting training.
[0044] (3) Mounting can connect a file system or storage device to a container. By mounting, the container can access and use the data in the file system or storage device. In actual application scenarios, the user sends the required information as a request to the AI platform system, and the system saves the relevant information to the database. At runtime, the system reads the computing resources, data set directory and other information in the database to build a container, and maps the corresponding directory to the host directory for mounting. This can reduce user operations and improve user convenience.
[0045] like Figure 2 As shown, a data set mounting method applied to an AI platform of the present invention has the following technical features:
[0046] S1: The user creates related resources, binds the training task to the data set, and sends the relevant information to the AI platform system when initiating a request. The following are the related library table fields:
[0047]
[0048]
[0049] S2: The AI platform initiates a request to the Master node. The k8s scheduler component on the Master node will schedule it to a suitable pod based on a series of scheduling policies and rules such as the availability, load balancing, and affinity of preset node resources. Subsequently, the k8s scheduler will send the description information of the Pod to the kubelet component on the node. The kubelet will be responsible for creating and managing the Pod's containers on the node, and communicate with the scheduler to update the status of the Pod.
[0050] S3: When starting a container, one or more directories will be specified as mount points, and these directories will be associated with the file system on the host. At the bottom level, the container runtime creates a virtual file system (VFS), which consists of the file system on the host and the file system inside the container. When the container is started, the container runtime maps the mount point to the directory on the host, so that file operations inside the container can directly access files on the host. When the container is stopped or deleted, the mount point is disassociated from the directory on the host.
[0051] S4: When the user deletes the corresponding training task, the platform deletes the corresponding pod through k8s, and CSI deletes the PVC mount simultaneously, and then deletes the corresponding PV according to PVC, thereby deleting the entire training container resources to prevent the occurrence of unpaired PV / PVC.
[0052] The present invention adopts the above technical solution, and by realizing the solution of mounting the AI platform data set of the database, the size of the storage space and the data access speed are improved, and multiple storage devices can be merged into one logical unit for easy management and maintenance. By mounting an external storage device, the storage capacity of the computer system can be expanded to meet the needs of large-scale data processing. Database mounting can also increase data access speed, reduce data transmission delay, and improve system performance. Database mounting can also realize data backup and recovery to ensure data security and reliability. The present invention adopts the method of data set storage to initiate training required data for secondary forwarding, and realizes the use of k8s scheduling capabilities and NFS mounting capabilities through data sets; the present invention realizes the function of data transparent transmission by combining the database with the AI platform.
[0053] Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the detailed description of the embodiments of the present application is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians of the art without making creative work are within the scope of protection of the present application.
Claims
1. A method for mounting a dataset on an AI platform, characterized by: It includes the following steps: Step 1: The user creates a resource group and binds the training task and dataset to form a task database. When the user initiates a request, the user sends the relevant information of the resource group to the AI platform system. Step 2: The AI platform system determines whether the resources required by the resource group are sufficient; if so, execute step 3; otherwise, execute step 2; Step 3: The AI platform system sends a request to the master node, which then allocates the resource group to the pod that meets the corresponding conditions based on the scheduling policy rules. In step 4, the Master node reads the task database to determine whether the training task is bound to a dataset; if so, it specifies the directory as the mount point and configures it to map the mount point to the host when the container is started, and then executes step 5. Otherwise, go to step 5; Step 5: Start a container on the specified node based on the resource requirements of the submitted resource group, and use the container to perform the corresponding training task; In step 6, when the container is stopped or deleted, the mount point is disassociated from the directory on the host, and the training ends.
2. The method for mounting a data set on an AI platform according to claim 1, wherein: In step 1, the training task is bound to the dataset and stored in the corresponding task database. The task database includes the task directory and resource parameter information.
3. The method for mounting a data set on an AI platform according to claim 1, wherein: Step 3 includes the following steps: Step 3-1: The AI platform system sends the request to the Master node. In step 3-2, the k8s scheduler component on the Master node schedules the resource group to the specified pod based on the preset scheduling policies and rules for node resource availability, load balancing, and affinity. In step 3-3, the k8s scheduler component sends the description information of the specified Pod to the kubelet component on the corresponding node.
4. The method for mounting a dataset on an AI platform according to claim 3, wherein: In step 5, the kubelet component is responsible for creating and managing the Pod's containers on the corresponding node, and maintaining communication with the k8s scheduler component to update the Pod's status.
5. The method for mounting a data set on an AI platform according to claim 1, wherein: In step 5, a virtual file system is created when the container is running. The virtual file system consists of the file system on the host and the file system inside the container.
6. The method for mounting a dataset on an AI platform according to claim 1, wherein: In step 6, when the user deletes the corresponding training task, the AI platform system deletes the corresponding pod through the k8s scheduler component, and the CSI deletes the PVC mount simultaneously; then, the corresponding PV is deleted based on the PVC to delete the entire training container resource to prevent the occurrence of unpaired PV / PVC.
7. A dataset mounting system for an AI platform, comprising: The system includes a node cluster, which includes a Master node, a management node, a storage node, and a training node. The management node is equipped with an AI platform system, through which users create resource groups and bind training tasks to data sets. The AI platform system receives relevant information about the resource group sent by the user when initiating a request and forwards the user request to the Master node. The Master node is equipped with a k8s scheduler component, which schedules the resource group to run on the specified pod based on the availability, load balancing, and affinity scheduling policies and rules of the preset node resources. The k8s scheduler component sends the description information of the specified Pod to the kubelet component on the corresponding Master node. The kubelet component is responsible for creating and managing the Pod's containers on the corresponding node, and maintains communication with the k8s scheduler component to update the Pod's status. The storage node is equipped with a server-side NFS, which stores several data sets to provide the data sets to the container through directory mounting. The training node is equipped with a client NFS, which is used to create and manage Pods. The pod includes one or more containers, which are used to train training tasks.
