Storage space management method and device, computer equipment and storage medium
Through real-time monitoring and management of storage space in the distributed deep learning training platform, the problem of inflexible storage space management of computing nodes is solved, and service stability and user experience are improved. Resource quotas are solved by migrating and adjusting resource quotas. The exhaustion problem improves storage space utilization.
Patent Information
- Application Number
- CN202410692383.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-09-17
AI Technical Summary
In the distributed deep learning training platform, the storage space management of computing nodes is not flexible enough, resulting in poor service stability, inability to effectively manage the storage space of multiple users, and affecting user experience.
By monitoring the storage space of the target account's training data in the computing node in real time, the data to be processed is determined, and the migration or deletion operation is performed until the resource quota is met. The associated computing node is used for data migration, and the resource quota is dynamically adjusted to meet user needs.
It improves the storage space management efficiency of computing nodes, ensures service stability, avoids task failures caused by exhaustion of resource quotas, and improves user experience and storage space utilization.
Smart Images

Figure CN118656205A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a storage space management method, device, computer equipment and storage medium. Background Art
[0002] With the continuous development of basic computing power, algorithm models and data volume, the application of artificial intelligence (AI) is becoming increasingly common. In order to accelerate the pace of innovation in artificial intelligence technology and applications, enterprises and academic institutions are committed to developing artificial intelligence models with higher accuracy and greater robustness. On this basis, in the business scenario of AI model training, the industry usually adopts the technical solution of Kubernetes, interconnecting multiple training servers and distributed storage with high-speed networks to form a training cluster, so as to obtain a distributed deep learning training platform (also known as a distributed AI training platform).
[0003] In actual business scenarios, when executing operations such as model training in the computing nodes of the above-mentioned distributed deep learning training platform, the local space of the computing node is usually occupied, and each computing node is often allocated to multiple users for use. Therefore, when the local space of the computing node is exhausted, the services of all users of the settlement node cannot be used normally. How to manage the storage space of each computing node in the distributed deep learning training platform to ensure the stability of the computing node service is an urgent problem to be solved in the distributed deep learning training platform. Summary of the invention
[0004] In view of this, the present invention provides a storage space management method, apparatus, computer equipment and storage medium to solve the problem of unstable services provided by computing nodes in a distributed AI training platform.
[0005] In a first aspect, the present invention provides a storage space management method, which is applied to a distributed deep learning training platform, and the method comprises:
[0006] Obtain the corresponding resource quota of the target account, and monitor the storage space corresponding to the current computing node of the training data of the target account in real time;
[0007] In a case where the storage space does not satisfy the resource quota, determining data to be processed in the training data;
[0008] Perform a migration operation and / or a deletion operation on the data to be processed until the storage space meets the resource quota, wherein the migration operation is used to indicate that the data to be processed is migrated to an associated computing node corresponding to the target account in the distributed deep learning training platform.
[0009] In an optional implementation, real-time monitoring of the training data of the target account in the storage space corresponding to the current computing node includes:
[0010] Obtain the training task created by the target account;
[0011] Estimate whether the storage space occupied by the training task on the current computing node exceeds the remaining storage space, wherein the remaining storage space is used to indicate the storage space that has not been occupied in the resource quota;
[0012] If yes, then executing the step of determining the data to be processed in the training data;
[0013] If not, run the training task on the current computing node and monitor the running environment data of the training task, wherein the running environment data includes: the image data and container data loaded by the training task for running the training task;
[0014] Based on the agent corresponding to the current computing node, real-time monitoring of cache data generated during the running of the training task;
[0015] The training data is determined according to the operating environment data and the cache data, and a storage space occupied by the training data in the current computing node is determined.
[0016] In an embodiment of the present invention, the storage space corresponding to the current computing node of the training data of the target account can be monitored in real time so as to manage the training data when the storage space exceeds the resource quota, thereby being able to more reasonably manage the storage space in the computing node when the local space of the computing node is exhausted to ensure the stability of the computing node service. At the same time, the storage space can be cleared when the resource quota is exhausted to avoid the inability to execute the training task due to the exhaustion of the resource quota, affecting the user experience.
[0017] In an optional implementation, the environment data includes: mirror data;
[0018] The monitoring of the operating environment data of the training task includes:
[0019] Determine a target image called by the training task, and determine total image data generated by the target image in the current computing node;
[0020] Determining, in the current computing node, the number of first accounts that call the target image;
[0021] Based on the ratio of the total mirror data to the first number of accounts, the mirror data for the training task is determined.
[0022] In the embodiment of the present invention, considering that images are reusable in Docker technology, it is not necessary to load a common target image into the storage space corresponding to each account, so as to improve the utilization of the storage space and further improve the user experience.
[0023] In an optional implementation, based on the agent corresponding to the current computing node, real-time monitoring of cache data generated during the running of the training task includes:
[0024] Based on the agent corresponding to the current computing node, monitor the data set cached by the training task, and determine the total cached data generated by the data set in the current computing node;
[0025] Determining, in the current computing node, a number of second accounts that cache the data set;
[0026] Based on the ratio of the total cached data to the number of the second accounts, the cached data for the training task is determined.
[0027] In the embodiment of the present invention, considering that the data set used in training the AI model is also reusable, it is not necessary to load the public data set into the storage space corresponding to each account, so as to improve the utilization rate of the storage space and thus improve the user experience.
[0028] In an optional implementation, determining that the storage space does not satisfy the resource quota includes:
[0029] When the training task created by the target account is executed in parallel in multiple computing nodes of the distributed deep learning training platform, determining a first subtask of the training task to be executed on the current computing node;
[0030] Estimate the operating environment data pulled by the first subtask, and determine the storage space occupied by the operating environment data, wherein the operating environment data includes: the image data and container data loaded by the training task for running the training task;
[0031] When the storage space exceeds the remaining quota in the resource quota, it is determined that the storage space does not satisfy the resource quota.
[0032] In an embodiment of the present invention, considering that the target account can be assigned multiple computing nodes in the above-mentioned distributed AI training platform, when the target account creates a training task, the training task can be executed in parallel by multiple computing nodes to improve the training efficiency of the AI model. At the same time, before each computing node executes a subtask, it can be determined whether the storage space occupied by the operating environment data exceeds the remaining quota of the target user in the computing node, thereby avoiding task execution failure due to insufficient remaining quota, affecting the overall execution result of the training task.
[0033] In an optional implementation, the data to be processed includes: data corresponding to the second subtask to be executed in the current computing node;
[0034] The performing a migration operation on the data to be processed includes:
[0035] Determining, in the distributed deep learning training platform, an associated computing node pre-set for the target account;
[0036] The second subtask is migrated to the associated computing node for execution.
[0037] In the embodiment of the present invention, when the resource quota of the current computing node is exhausted, the second subtask that has not been executed can be migrated to the associated computing node for execution, thereby avoiding the execution failure of the second subtask and improving the task execution parallelism.
[0038] In an optional embodiment, the method further includes:
[0039] Obtaining the number of full quotas corresponding to the target account in a historical period, wherein the number of full quotas is used to indicate the number of times the storage space reaches the resource quota;
[0040] When the full number of times reaches a preset number of times, obtaining the free storage in the current computing node;
[0041] The resource quota is adjusted based on the free storage.
[0042] In an embodiment of the present invention, considering that the user's AI training needs are dynamically changing, resulting in changes in the scale of the trained AI model and the required resource quota, the user's resource quota can be dynamically adjusted to adapt to the user's AI training needs, thereby improving the user's usage experience and improving the utilization rate of idle storage in the computing node.
[0043] In a second aspect, the present invention provides a storage space management device, the device comprising:
[0044] A monitoring module, used to obtain the corresponding resource quota of the target account, and monitor the storage space corresponding to the training data of the target account in the current computing node in real time;
[0045] A determination module, configured to determine the data to be processed in the training data when the storage space does not satisfy the resource quota;
[0046] A data processing module is used to perform a migration operation and / or a deletion operation on the data to be processed until the storage space meets the resource quota, wherein the migration operation is used to indicate that the data to be processed is migrated to an associated computing node corresponding to the target account in the distributed deep learning training platform.
[0047] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the storage space management method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0048] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the storage space management method of the first aspect or any corresponding embodiment thereof.
[0049] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the storage space management method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0051] Figure 1 is a flowchart of a storage space management method according to an embodiment of the present invention;
[0052] Figure 2 is a flow chart of another storage space management method according to an embodiment of the present invention;
[0053] Figure 3 It is a flowchart for real-time monitoring of the storage space corresponding to the current computing node for the training data of the target account;
[0054] Figure 4 It is a timing diagram of a target account creation training task provided by the present invention;
[0055] Figure 5 is a flow chart of another storage space management method according to an embodiment of the present invention;
[0056] Figure 6 is a structural block diagram of a storage space management device according to an embodiment of the present invention;
[0057] Figure 7 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0059] In conjunction with the application scenarios on which the execution of the storage space management method depends, the application scenarios are described here.
[0060] With the continuous development of basic computing power, algorithm models and data volume, the application of artificial intelligence (AI) is becoming increasingly common. In order to accelerate the pace of innovation in artificial intelligence technology and applications, enterprises and academic institutions are committed to developing artificial intelligence models with higher accuracy and greater robustness. On this basis, in the business scenario of AI model training, the industry usually adopts the technical solution of Kubernetes, interconnecting multiple training servers and distributed storage with high-speed networks to form a training cluster, so as to obtain a distributed deep learning training platform (also known as a distributed AI training platform).
[0061] In actual business scenarios, when performing operations such as model training in the computing nodes of the above-mentioned distributed deep learning training platform, the local space of the computing node is usually occupied, and each computing node is often allocated to multiple users for use.
[0062] Specifically, the Docker container technology is usually used at the bottom layer of the above computing nodes. When the distributed deep learning training platform performs model training tasks, the platform will automatically schedule the tasks to the corresponding computing nodes and create a container environment to debug the code and train the model in the container environment. Specifically, when performing model training, operations such as pulling the image used by the container environment, updating the software version of the container environment, caching the data generated by model training, and caching the data set pulled for accelerated training will all occupy local space.
[0063] However, the local space of computing nodes is often high-performance and limited in capacity, and if the hard disk space is used up, users will not be able to create new environments or perform task training. For the space occupied by the container environment, the size limit of all user images and occupied container space can be controlled based on Docker's own storage control. However, this storage space management method lacks flexibility because the space required by different users is different in actual business development. Therefore, how to manage the storage space of each computing node in the distributed deep learning training platform to ensure the stability of the computing node service is an urgent problem to be solved in the distributed deep learning training platform.
[0064] Based on this, an embodiment of the present invention provides a storage space management method, which is applied to a distributed deep learning training platform. First, the resource quota corresponding to the target account in the distributed deep learning training platform can be obtained, and the storage space corresponding to the current computing node of the training data of the target account can be monitored in real time, and when the storage space does not meet the resource quota, the data to be processed is determined in the training data. Then, migration operations and / or deletion operations can be performed on the data until the storage space meets the resource quota, wherein the migration operation is used to indicate that the data to be processed is migrated to the associated computing node corresponding to the target account in the distributed deep learning training platform, so that when the local space of the computing node is exhausted, a more reasonable way is adopted to manage the storage space of the computing node to ensure the stability of the computing node service.
[0065] According to an embodiment of the present invention, a storage space management method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0066] In this embodiment, a storage space management method is provided, which can be used for the above-mentioned distributed deep learning training platform (hereinafter referred to as the distributed AI training platform). Figure 1 is a flow chart of a storage space management method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0067] Step S101, obtain the resource quota corresponding to the target account in the distributed deep learning training platform, and monitor the storage space corresponding to the training data of the target account in the current computing node in real time.
[0068] In an embodiment of the present invention, the above resource quota can be used to indicate the storage resource quota and computing resource quota that the administrator pre-allocated to the target account in the current computing node, such as CPU (central processing unit), GPU (graphics processing unit), local disk, etc. It should be understood that in the above distributed AI training platform, in order to better utilize computing resources, each computing node often needs to be allocated to multiple users for sharing. Therefore, it is necessary to allocate resource quotas to each user's account in the computing node. The specific allocation method is subject to actual usage requirements, and the present invention does not make specific limitations on this.
[0069] When it is detected that the target account is executing an AI model training task in the current computing node, the training data generated by the training task can be monitored and the storage space occupied by the training data in the current computing node can be calculated. Specifically, the storage directory corresponding to the training task can be monitored in real time to update the total storage space occupied by the target account when an update to the storage directory is detected.
[0070] Step S102: when the storage space does not satisfy the resource quota, determine the data to be processed in the training data.
[0071] In an embodiment of the present invention, the storage space corresponding to the training data of the target account in the current computing node can be understood as the storage space occupied or about to be occupied by the target account in the current training node. Therefore, when the storage space exceeds or is about to exceed the resource quota, it is determined that the storage space does not meet the resource quota.
[0072] For example, if the storage space occupied by the target account reaches 95% of the resource quota, it can be considered that the resource quota is about to be exceeded. At this time, the above-mentioned distributed AI training platform can initiate reminders at preset time intervals to remind the user that the storage space is about to run out. The number of reminders can reach a preset number of times, for example, three times.
[0073] In addition, if the storage space occupied by the target account reaches 100% of the resource quota, it can be considered that the resource quota is exceeded. At this time, the training task currently running in the target account can be suspended, and the pending data can be determined to issue a reminder based on the pending data, thereby reminding the user to clean up the pending data. After the user completes the cleanup, if it is detected that the storage space is less than the resource quota, the previously suspended training task will be automatically started.
[0074] Here, when determining the above-mentioned data to be processed, the unenabled operating environment data of the target account in the training data in the current computing node and the cached unused data set can be counted. Here, the unenabled environment data can include the image data corresponding to the historical training task, etc., and the cached unused data set can be a data set that is not related to the current training task. Specifically, the distributed AI training platform can provide a directory of the diff layer of the Docker container, which is used to indicate the storage target corresponding to the storage data of the target account in the current computing node, so as to find the above-mentioned data to be processed according to the storage target.
[0075] Step S103, performing a migration operation and / or a deletion operation on the data to be processed until the storage space meets the resource quota, wherein the migration operation is used to indicate that the data to be processed is migrated to the associated computing node corresponding to the target account on the distributed deep learning training platform.
[0076] In an embodiment of the present invention, the fact that the storage space meets the resource quota can be used to indicate that the storage space is less than the resource quota. Therefore, the user can be instructed to perform migration and / or deletion operations on the above-mentioned data to be processed to reduce the storage space occupied by the target account in the current computing node.
[0077] Specifically, the user can delete at least part of the above-mentioned data to be processed through a deletion operation instruction, or, if the target account is pre-assigned with multiple associated computing nodes in the above-mentioned distributed AI training platform, the above-mentioned data to be processed can be migrated to the associated node, so as to execute the training task based on the associated computing node in parallel with the current computing node, thereby improving the execution efficiency of the training task.
[0078] It can be known from the above description that in an embodiment of the present invention, the resource quota corresponding to the target account in the distributed deep learning training platform can be obtained first, and the storage space corresponding to the current computing node of the training data of the target account can be monitored in real time, and when the storage space does not meet the resource quota, the data to be processed can be determined in the training data. Then, migration operations and / or deletion operations can be performed on the data until the storage space meets the resource quota, wherein the migration operation is used to indicate that the data to be processed is migrated to the associated computing node corresponding to the target account in the distributed deep learning training platform, so that when the local space of the computing node is exhausted, a more reasonable way is adopted to manage the storage space of the computing node to ensure the stability of the computing node service.
[0079] In this embodiment, another storage space management method is provided, which can be used in the above-mentioned distributed AI training platform. Figure 2 is a flow chart of another storage space management method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0080] Step S201, obtain the resource quota corresponding to the target account in the distributed deep learning training platform, and monitor the storage space corresponding to the training data of the target account in the current computing node in real time.
[0081] Specifically, the above step S201 includes:
[0082] Step S2011, obtaining the training task created by the target account.
[0083] Step S2012, estimating whether the storage space occupied by the training task in the current computing node exceeds the remaining storage space, where the remaining storage space is used to indicate the storage space in the resource quota that has not been occupied.
[0084] Step S2013: If yes, execute the step of determining the data to be processed in the training data.
[0085] Step S2014: if not, run the training task on the current computing node and monitor the running environment data of the training task, wherein the running environment data includes: the image data and container data loaded by the training task for running the training task.
[0086] Step S2015, based on the agent corresponding to the current computing node, monitor the cache data generated during the running of the training task in real time.
[0087] Step S2016, determining the training data according to the operating environment data and the cache data, and determining the storage space occupied by the training data in the current computing node.
[0088] In the embodiment of the present invention, Figure 3 The figure shows a flow chart of real-time monitoring of the target account's training data in the storage space corresponding to the current computing node, wherein firstly, the training task created by the target account in the current computing node can be obtained, and the training task can be used to train the AI model.
[0089] After obtaining the training task, you can estimate the storage space occupied by the training task in the current computing node and determine whether the storage space exceeds the remaining storage space of the target account in the current computing node, that is, determine whether the total storage space occupied by the task exceeds the resource quota.
[0090] Specifically, the size of the data set for training the AI model cached as indicated by the training task can be obtained. If the storage space occupied by the cached data set exceeds the remaining storage space, the step of determining the data to be processed is executed to clean up the storage space. The specific execution method is as described above. Figure 1 The corresponding embodiments are described in detail and will not be repeated here.
[0091] In addition, if the storage space occupied by the cached data set does not exceed the remaining storage space, a caching action is triggered to cache the data set, and the training task is run on the current computing node, while the storage space occupied by the training task is monitored in real time.
[0092] Specifically, the size of the operating environment data generated by the training task in the current computing node can be counted first. The operating environment data can include the image data and container data used to run the training task, where the container data is the above-mentioned Docker container, and the image data includes a read-only image template, which contains the file system and configuration information required by the Docker container. The image data serves as the basis for container creation, ensuring the consistency of the container runtime environment. Docker containers are used to provide a lightweight, portable, and self-contained environment to facilitate the deployment, operation, and management of AI models.
[0093] Considering that some data generated during the execution of training tasks will occupy local space, sometimes, without the user's knowledge, the code file will automatically cache files with very large data volumes. Therefore, the size of the container data in the running state can be counted at a time interval of 15s based on the agent corresponding to the current computing node (that is, the above-mentioned agent).
[0094] Next, the cache data generated during the running of the training task can be monitored in real time based on the above agent. Each computing node in the distributed AI training platform can run an agent that monitors the size of the storage space occupied by the training task in real time. When any account issues a training task, the agent can be used to count the size of the storage space occupied by the account in this computing node. Here, the cache data can include data cached during AI model training, data set cache pulled for accelerated training, etc.
[0095] After determining the training data according to the above operating environment data and cache data, it can be determined whether the storage space occupied by the training data exceeds the resource quota. If so, the training task is suspended and the step of determining the data to be processed is performed to clean up the storage space. The specific space cleaning method is as described above. Figure 1 The corresponding embodiments are described and will not be repeated here; if not, continue to run the training task until the task is completed.
[0096] exist Figure 3 On the basis of Figure 4 The figure shows a timing diagram of a target account creation training task provided by the present invention, wherein the above-mentioned current computing node includes a scheduling service, configuration control, a task control module and a space cleaning module.
[0097] In specific implementation, when the task scheduling service detects the created training task, it can schedule the training task to any computing node of the distributed AI training platform, so that the configuration control corresponding to the computing node can monitor in real time whether the storage space used by the training task is less than the resource quota. If it is less, the task control module can feedback the message that the task is successfully created and running to the target account. If it is greater, the space cleaning module is instructed to check the data occupying the space and delete it, or determine the data to be processed and migrate the data to be processed (migration operation Figure 4 not shown).
[0098] Step S202: If the storage space does not meet the resource quota, determine the data to be processed in the training data. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0099] Step S203, perform migration and / or deletion operations on the data to be processed until the storage space meets the resource quota, wherein the migration operation is used to indicate that the data to be processed is migrated to the associated computing node corresponding to the target account in the distributed deep learning training platform. For details, please refer to Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0100] In an embodiment of the present invention, the storage space corresponding to the current computing node of the training data of the target account can be monitored in real time so as to manage the training data when the storage space exceeds the resource quota, thereby being able to more reasonably manage the storage space in the computing node when the local space of the computing node is exhausted to ensure the stability of the computing node service. At the same time, the storage space can be cleared when the resource quota is exhausted to avoid the inability to execute the training task due to the exhaustion of the resource quota, affecting the user experience.
[0101] In some optional implementations, the above-mentioned environment data includes: mirror data, and the above-mentioned step S2014 includes:
[0102] Step a1, determine the target image called by the training task, and determine the total image data generated by the target image in the current computing node.
[0103] Step a2: determining the number of first accounts that call the target image in the current computing node.
[0104] Step a3: determining the mirror data for the training task based on the ratio of the total mirror data to the number of first accounts.
[0105] In the embodiment of the present invention, considering that images in Docker technology are reusable, that is, the same image can be pulled by training tasks created by different accounts at the same time, therefore, if the image is directly loaded into the storage space of each account in the same computing node, it will lead to poor utilization of the storage space, thereby affecting the user experience.
[0106] Based on this, a public storage can be established in the computing node to store images called by different accounts at the same time, without loading the image into the storage space of each account. Specifically, in the current computing node, if it is detected that the image called by the training task is a public target image, the number of first accounts that call the target image at the same time in the current computing node can be counted.
[0107] Next, the total image data generated by the target image in the current computing node can be determined, and the ratio of the total image data to the first account data can be calculated to obtain the average value of the total image data corresponding to each account, thereby approximately obtaining the storage space occupied by the target account when using the target image.
[0108] In the embodiment of the present invention, considering that images are reusable in Docker technology, it is not necessary to load a common target image into the storage space corresponding to each account, so as to improve the utilization of the storage space and further improve the user experience.
[0109] In some optional implementations, the above step S2015 includes:
[0110] Step b1, based on the agent corresponding to the current computing node, monitor the data set cached by the training task and determine the total cached data generated by the data set in the current computing node.
[0111] Step b2: determining the number of second accounts of the cached data set in the current computing node.
[0112] Step b3: determining the cache data for the training task based on the ratio of the total cache data to the number of second accounts.
[0113] In an embodiment of the present invention, it is taken into account that the data set used in training the AI model can also be reused, that is, the same data set can be pulled by training tasks created by different accounts at the same time. For example, if the training tasks created by different accounts are all large language models for recognizing a certain dialect, then the data sets pulled by these multiple training tasks can all be training data sets corresponding to the dialect.
[0114] Therefore, once it is detected that the data set pulled by the training task is public data, the data set can be loaded into the public storage, and the number of second accounts that simultaneously call the data set in the current computing node can be counted.
[0115] Next, the cache data generated by the data set in the current computing node can be determined, and the ratio of the cache data to the second account data can be calculated to obtain the average value of the cache data corresponding to each account, thereby approximately obtaining the storage space occupied by the target account when using the data set.
[0116] In the embodiment of the present invention, considering that the data set used in training the AI model is also reusable, it is not necessary to load the public data set into the storage space corresponding to each account, so as to improve the utilization rate of the storage space and thus improve the user experience.
[0117] In some optional implementations, the above step S102 includes:
[0118] Step S11, when the training task created by the target account is run in parallel in multiple computing nodes of the distributed deep learning training platform, determine the first subtask of the training task running on the current computing node.
[0119] Step S12, estimate the operating environment data pulled by the first subtask, and determine the storage space occupied by the operating environment data, wherein the operating environment data includes: the image data and container data loaded by the training task for running the training task.
[0120] Step S13: when the storage space exceeds the remaining quota in the resource quota, it is determined that the storage space does not satisfy the resource quota.
[0121] In the embodiment of the present invention, considering that the target account can be assigned multiple computing nodes in the above-mentioned distributed AI training platform, when the target account creates a training task, the training task can be executed in parallel by multiple computing nodes. Specifically, the training task can be divided into multiple subtasks, and the subtasks can be assigned to different computing nodes for simultaneous execution.
[0122] It should be understood that when executing a subtask in each computing node, it is necessary to configure the operating environment data required for the training task corresponding to the subtask, where the operating environment data includes image data and container data.
[0123] Therefore, before the current computing node executes the assigned subtask, the agent can first estimate whether the storage space required for the operating environment data of the subtask exceeds the remaining quota in the resource quota. If so, it is determined that the storage space does not meet the resource quota.
[0124] In an embodiment of the present invention, considering that the target account can be assigned multiple computing nodes in the above-mentioned distributed AI training platform, when the target account creates a training task, the training task can be executed in parallel by multiple computing nodes to improve the training efficiency of the AI model. At the same time, before each computing node executes a subtask, it can be determined whether the storage space occupied by the operating environment data exceeds the remaining quota of the target user in the computing node, thereby avoiding task execution failure due to insufficient remaining quota, affecting the overall execution result of the training task.
[0125] In this embodiment, another storage space management method is provided, which can be used in the above-mentioned distributed AI training platform. Figure 5 is a flow chart of another storage space management method according to an embodiment of the present invention. Figure 5 As shown, the process includes the following steps:
[0126] Step S501, obtain the resource quota corresponding to the target account in the distributed deep learning training platform, and monitor the storage space corresponding to the training data of the target account in the current computing node in real time. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0127] Step S502: If the storage space does not meet the resource quota, determine the data to be processed in the training data. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0128] Step S503: Perform migration and / or deletion operations on the data to be processed until the storage space meets the resource quota, wherein the migration operation is used to indicate that the data to be processed is migrated to the associated computing node corresponding to the target account on the distributed deep learning training platform.
[0129] Specifically, the data to be processed includes: data corresponding to the second subtask to be executed in the current computing node, and the step S503 includes:
[0130] Step S5031, determining the associated computing node pre-set for the target account in the distributed deep learning training platform.
[0131] Step S5032: Migrate the second subtask to the associated computing node for execution.
[0132] In an embodiment of the present invention, when a subtask in the above-mentioned training task is assigned to the current computing node for execution, a task queue can be established for the subtask to execute the assigned subtasks in sequence based on the task queue, wherein the above-mentioned second subtask can be a subtask in the task queue that has not yet been executed.
[0133] Therefore, when the resource quota of the current computing node is exhausted, the second subtask can be assigned to the associated computing node of the target account for execution. Specifically, the computing node with the lowest load and the remaining quota that meets the running conditions of the second subtask can be found among the associated computing nodes, thereby balancing the load between the associated computing nodes and avoiding the failure of the migration of the second subtask.
[0134] In the embodiment of the present invention, when the resource quota of the current computing node is exhausted, the second subtask that has not been executed can be migrated to the associated computing node for execution, thereby avoiding the execution failure of the second subtask and improving the task execution parallelism.
[0135] In some optional embodiments, the above Figure 1 The corresponding embodiment also includes:
[0136] Step S21, obtaining the corresponding full quota times of the target account in the historical period, wherein the full quota times are used to indicate the number of times when the storage space reaches the resource quota.
[0137] Step S22, when the number of full quotas reaches a preset number, obtaining the free storage in the current computing node.
[0138] Step S23: adjusting resource quota based on free storage.
[0139] In an embodiment of the present invention, it is taken into account that the user's AI training needs are changing dynamically. For example, when the user is an Internet enterprise, the business content of the enterprise has changed, resulting in changes in the scale of the trained AI model and the required resource quota. Therefore, the user's resource quota can be dynamically adjusted.
[0140] Taking the above target account as an example, the number of times the target account is fully loaded in the current computing node within a historical period can be counted. For example, the historical period can be one month. If the number of fully loaded times reaches a preset number n, it means that the scale of the AI model trained by the target account is very likely to have changed, resulting in a change in the required resource quota.
[0141] At this time, the free storage in the current computing node can be obtained, and the resource quota of the target account can be increased based on the free storage. Specifically, the amount of resource quota increase should be less than the total amount of free storage. It should be understood that before expanding the resource quota, an expansion prompt can be sent to the administrator of the distributed AI training platform for review, and after the review is passed, a successful expansion message will be sent to the target account.
[0142] In an embodiment of the present invention, considering that the user's AI training needs are dynamically changing, resulting in changes in the scale of the trained AI model and the required resource quota, the user's resource quota can be dynamically adjusted to adapt to the user's AI training needs, thereby improving the user's usage experience and improving the utilization rate of idle storage in the computing node.
[0143] In summary, in an embodiment of the present invention, the resource quota corresponding to the target account in the distributed deep learning training platform can be obtained first, and the storage space corresponding to the training data of the target account in the current computing node can be monitored in real time, and when the storage space does not meet the resource quota, the data to be processed can be determined in the training data. Then, a migration operation and / or a deletion operation can be performed on the data until the storage space meets the resource quota, wherein the migration operation is used to indicate that the data to be processed is migrated to the associated computing node corresponding to the target account in the distributed deep learning training platform, so that when the local space of the computing node is exhausted, a more reasonable way is adopted to manage the storage space of the computing node to ensure the stability of the computing node service.
[0144] In this embodiment, a storage space management device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0145] This embodiment provides a storage space management device, such as Figure 6 As shown, including:
[0146] Monitoring module 601, used to obtain the resource quota corresponding to the target account in the distributed deep learning training platform, and monitor the storage space corresponding to the training data of the target account in the current computing node in real time;
[0147] A determination module 602, configured to determine data to be processed in the training data when the storage space does not satisfy the resource quota;
[0148] The data processing module 603 is used to perform a migration operation and / or a deletion operation on the data to be processed until the storage space meets the resource quota, wherein the migration operation is used to indicate that the data to be processed is migrated to the associated computing node corresponding to the target account in the distributed deep learning training platform.
[0149] In some optional embodiments, the monitoring module 601 includes:
[0150] A first acquisition unit, used to acquire the training task created by the target account;
[0151] An estimation unit, used to estimate whether the storage space occupied by the training task on the current computing node exceeds the remaining storage space, wherein the remaining storage space is used to indicate the storage space that has not been occupied in the resource quota;
[0152] an execution unit, configured to execute the step of determining the data to be processed in the training data if yes;
[0153] A first monitoring unit is configured to, if not, run the training task on the current computing node and monitor the running environment data of the training task, wherein the running environment data includes: the image data and container data loaded by the training task for running the training task;
[0154] A second monitoring unit is used to monitor the cache data generated during the running of the training task in real time based on the agent corresponding to the current computing node;
[0155] The first determining unit is used to determine the training data according to the operating environment data and the cache data, and determine the storage space occupied by the training data in the current computing node.
[0156] In some optional implementations, the environmental data includes: mirror data; the first monitoring unit includes:
[0157] A first determination subunit is used to determine the target image called by the training task, and determine the total image data generated by the target image in the current computing node;
[0158] A second determining subunit is used to determine the number of first accounts that call the target image in the current computing node;
[0159] The third determining subunit is used to determine the mirror data of the training task based on the ratio of the total mirror data to the first number of accounts.
[0160] In some optional implementations, the second monitoring unit includes:
[0161] A monitoring subunit, configured to monitor the data set cached by the training task based on the agent corresponding to the current computing node, and determine the total cached data generated by the data set in the current computing node;
[0162] A fourth determining subunit, configured to determine the number of second accounts caching the data set in the current computing node;
[0163] The fifth determination subunit is used to determine the cache data of the training task based on the ratio of the total cache data to the number of the second accounts.
[0164] In some optional implementations, the determining module 602 includes:
[0165] A second determination unit is configured to determine, when the training task created by the target account is executed in parallel on multiple computing nodes of the distributed deep learning training platform, a first subtask of the training task to be executed on the current computing node;
[0166] a third determination unit, configured to estimate the operating environment data pulled by the first subtask and determine the storage space occupied by the operating environment data, wherein the operating environment data includes: image data and container data loaded by the training task for running the training task;
[0167] The fourth determining unit is configured to determine that the storage space does not satisfy the resource quota when the storage space exceeds the remaining quota in the resource quota.
[0168] In some optional implementations, the data corresponding to the second subtask to be executed in the current computing node; the data processing module 603 includes:
[0169] A fifth determining unit, configured to determine, in the distributed deep learning training platform, an associated computing node pre-set for the target account;
[0170] A migration unit is used to migrate the second subtask to the associated computing node for execution.
[0171] In some optional embodiments, the device further comprises:
[0172] A second acquisition unit is used to acquire the number of full quotas corresponding to the target account in a historical period, wherein the number of full quotas is used to indicate the number of times the storage space reaches the resource quota;
[0173] A third acquisition unit, configured to acquire free storage in the current computing node when the full quota times reaches a preset number;
[0174] An adjusting unit is configured to adjust the resource quota based on the free storage.
[0175] The storage space management device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0176] The embodiment of the present invention also provides a computer device having the above Figure 6 The storage space management device shown.
[0177] See also Figure 6 , Figure 6 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 6 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.
[0178] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0179] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0180] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0181] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0182] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0183] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0184] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0185] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A storage space management method, characterized in that: Applied to a distributed deep learning training platform, the method includes: Obtain the resource quota corresponding to the target account on the distributed deep learning training platform, and monitor the storage space corresponding to the training data of the target account on the current computing node in real time; In a case where the storage space does not satisfy the resource quota, determining data to be processed in the training data; Perform a migration operation and / or a deletion operation on the data to be processed until the storage space meets the resource quota, wherein the migration operation is used to indicate that the data to be processed is migrated to an associated computing node corresponding to the target account in the distributed deep learning training platform.
2. The method according to claim 1, characterized in that: The real-time monitoring of the training data of the target account in the storage space corresponding to the current computing node includes: Obtain the training task created by the target account; Estimate whether the storage space occupied by the training task on the current computing node exceeds the remaining storage space, wherein the remaining storage space is used to indicate the storage space that has not been occupied in the resource quota; If yes, then executing the step of determining the data to be processed in the training data; If not, run the training task on the current computing node and monitor the running environment data of the training task, wherein the running environment data includes: the image data and container data loaded by the training task for running the training task; Based on the agent corresponding to the current computing node, real-time monitoring of cache data generated during the running of the training task; The training data is determined according to the operating environment data and the cache data, and a storage space occupied by the training data in the current computing node is determined.
3. The method according to claim 2, characterized in that The environmental data includes: mirror data; The monitoring of the operating environment data of the training task includes: Determine a target image called by the training task, and determine total image data generated by the target image in the current computing node; Determining, in the current computing node, the number of first accounts that call the target image; Based on the ratio of the total mirror data to the first number of accounts, the mirror data for the training task is determined.
4. The method according to claim 2, characterized in that: The agent corresponding to the current computing node monitors the cache data generated during the running of the training task in real time, including: Based on the agent corresponding to the current computing node, monitor the data set cached by the training task, and determine the total cached data generated by the data set in the current computing node; Determining, in the current computing node, a number of second accounts that cache the data set; Based on the ratio of the total cached data to the number of the second accounts, the cached data for the training task is determined.
5. The method according to claim 1, characterized in that Determining that the storage space does not satisfy the resource quota includes: When the training task created by the target account is executed in parallel in multiple computing nodes of the distributed deep learning training platform, determining a first subtask of the training task to be executed on the current computing node; Estimate the operating environment data pulled by the first subtask, and determine the storage space occupied by the operating environment data, wherein the operating environment data includes: the image data and container data loaded by the training task for running the training task; When the storage space exceeds the remaining quota in the resource quota, it is determined that the storage space does not satisfy the resource quota.
6. The method according to claim 1, characterized in that The data to be processed includes: data corresponding to the second subtask to be executed in the current computing node; The performing a migration operation on the data to be processed includes: Determining, in the distributed deep learning training platform, an associated computing node pre-set for the target account; The second subtask is migrated to the associated computing node for execution.
7. The method according to claim 1, characterized in that The method further comprises: Obtaining the number of full quotas corresponding to the target account in a historical period, wherein the number of full quotas is used to indicate the number of times the storage space reaches the resource quota; When the full number of times reaches a preset number of times, obtaining the free storage in the current computing node; The resource quota is adjusted based on the free storage.
8. A storage space management device, characterized in that: The device comprises: A monitoring module, used to obtain the resource quota corresponding to the target account in the distributed deep learning training platform, and to monitor in real time the storage space corresponding to the training data of the target account in the current computing node; A determination module, configured to determine the data to be processed in the training data when the storage space does not satisfy the resource quota; A data processing module is used to perform a migration operation and / or a deletion operation on the data to be processed until the storage space meets the resource quota, wherein the migration operation is used to indicate that the data to be processed is migrated to an associated computing node corresponding to the target account in the distributed deep learning training platform.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the storage space management method according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the storage space management method according to any one of claims 1 to 7.
