Container-based IoT platform GPU virtualization control method and system
By encapsulating independent containers in the Internet of Things platform and performing GPU virtualization management, the problems of resource waste and load imbalance caused by physical GPUs are solved, and the computing load balancing between tasks and system scalability is improved.
Patent Information
- Application Number
- CN202311256183.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-27
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2043-09-27
AI Technical Summary
In the existing IoT platform, physical GPUs as task scheduling units lead to waste of computing resources, imbalance of computing load and mutual interference, and limit the parallelism and scalability of tasks, increasing the complexity of system deployment and maintenance.
Encapsulate each deep learning task into an independent container, perform GPU resource virtualization management, use encapsulation libraries and dynamic links to interact with GPU drivers, limit the container's use of GPU and display memory, realize task isolation and load balancing, and avoid resource waste and interference.
Isolation and independent resource management of different deep learning tasks is realized, which avoids waste of GPU computing resources, improves task parallelism and scalability, and reduces the difficulty of system deployment and maintenance.
Smart Images

Figure CN117349008B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet of Things control, and in particular to a container-based Internet of Things platform GPU virtualization control method and system. Background Art
[0002] With the development of deep learning applications in the IoT, IoT platforms are integrating an increasing number of deep learning algorithms. Generally speaking, deep learning algorithms involve numerous matrix and tensor calculations, requiring parallel acceleration using graphics processing units (GPUs). Currently, physical GPUs are primarily used as the scheduling unit for deep learning tasks on IoT platforms. However, using physical GPUs as the task scheduling unit can lead to wasted computing resources, imbalanced computational loads between tasks, and interference between tasks. Furthermore, the limited number of physical GPUs limits task parallelism and scalability, increasing the complexity of IoT platform system deployment and maintenance. Summary of the Invention
[0003] The purpose of the present invention is to provide a container-based Internet of Things platform GPU virtualization control method and system, which encapsulates each deep learning task into an independent container to achieve isolation and independent resource management of different deep learning tasks, and each independent container contains the deep learning application and dependencies required to execute the deep learning task; it also virtualizes the GPU resources of the Internet of Things platform and uses the encapsulation library and dynamic linking to interact with the GPU driver, hijacks the GPU resource call of the application in the container, limits the container's use of the GPU and display memory, and achieves upper limit isolation of the GPU computing power and display memory, preventing mutual interference between different deep learning tasks; loading the container onto a host device that can call GPU resources, and allocating corresponding GPU resources when the container is started, which can avoid waste of GPU computing resources, achieve computing load balancing between tasks, prevent mutual interference between tasks, improve the parallelism and scalability of task execution on the Internet of Things platform, and reduce the difficulty of system deployment and maintenance of the Internet of Things platform.
[0004] The present invention is achieved through the following technical solutions:
[0005] The container-based IoT platform GPU virtualization control method includes:
[0006] Obtaining a work log of the Internet of Things platform, analyzing the work log to obtain deep learning task information of the Internet of Things platform; extracting dependencies of the deep learning task and constructing a dependency set; and encapsulating the deep learning task of the Internet of Things platform into an independent container based on the deep learning task information and the dependency set;
[0007] Analyze the independent container to determine the running process information of the application program in the independent container; based on the running process information, adjust the GPU calling policy of the Internet of Things platform to determine the GPU resources that the application program is allowed to call;
[0008] Based on the operating status of all host devices under the Internet of Things platform, a host device that can call the GPU resources is selected; the independent container is loaded to the selected host device, and the GPU resources are allocated to the host device when the independent container is started; and based on the task processing result of the independent container, the host device's usage status of the GPU resources is adjusted.
[0009] Optionally, obtaining a work log of the Internet of Things platform, analyzing the work log to obtain deep learning task information of the Internet of Things platform; extracting dependencies of the deep learning task to construct a dependency set; and encapsulating the deep learning task of the Internet of Things platform into an independent container based on the deep learning task information and the dependency set, including:
[0010] Obtaining information interaction logs between the Internet of Things platform and the user terminal, identifying the type of interaction information on the information interaction logs, and obtaining deep learning task information received by the Internet of Things platform from the user terminal;
[0011] The dependencies of the deep learning task are extracted to construct a dependency set. Based on the model architecture and dataset size of the deep learning task and the dependency set, the deep learning task is encapsulated into an independent container, and the independent container is identified to generate container location information of the independent container on the Internet of Things platform.
[0012] Optionally, analyzing the independent container to determine running process information of the application within the independent container; and adjusting the GPU calling policy of the Internet of Things platform based on the running process information to determine the GPU resources allowed to be called by the application, including:
[0013] Analyze the program execution log of the application in the independent container to determine the running process information of the application in the process of processing the deep learning task; wherein the running process information includes the GPU computing resources and display memory space required for each processing link in the process of the application processing the deep learning task;
[0014] The method instructs a GPU driver of the IoT platform to interact with the independent container, so that the GPU driver hijacks the GPU call permission of the application program in the independent container. Based on the running process information, the method adjusts the calling status of the GPU computing resources and display memory space in different processing links of the GPU driver, thereby determining the amount of GPU computing resources and display memory space that the GPU driver is allowed to call.
[0015] Optionally, based on the operating status of all host devices under the Internet of Things platform, a host device that can call the GPU resource is selected; the independent container is loaded to the selected host device, and the GPU resource is allocated to the host device after the independent container is started; and based on the task processing result of the independent container, the usage status of the GPU resource by the host device is adjusted, including:
[0016] Obtaining the amount of data to be processed and the average data processing speed of all host devices under the IoT platform, thereby estimating the time required for each host device to complete its own data processing, and selecting the host device with the shortest required time as the host device capable of invoking the GPU resources;
[0017] Based on the node location information of the selected host device in the Internet of Things, the independent container is loaded into the selected host device, and when the independent container is started, the corresponding GPU computing resources and display memory space are allocated to the host device;
[0018] Determine whether the independent container completely outputs the task processing result of the deep learning task. If not, keep the host device's usage status of the currently allocated GPU computing resources and display memory space unchanged; if so, instruct the host device to release the currently allocated GPU computing resources and display memory space.
[0019] The container-based IoT platform GPU virtualization control system includes:
[0020] A deep learning task information generation module is used to obtain the work log of the Internet of Things platform, analyze the work log to obtain the deep learning task information of the Internet of Things platform; and extract the dependencies of the deep learning task to construct a dependency set;
[0021] An independent container encapsulation module, configured to encapsulate the deep learning task of the IoT platform into an independent container based on the deep learning task information and dependency set;
[0022] A callable GPU resource determination module is configured to analyze the independent container to determine the running process information of the application program within the independent container; based on the running process information, adjust the GPU calling policy of the IoT platform to determine the GPU resources allowed to be called by the application program;
[0023] A host device selection module, configured to select a host device capable of invoking the GPU resources from among all host devices under the IoT platform based on their operating status;
[0024] an independent container loading and resource allocation module, configured to load the independent container into a selected host device and allocate the GPU resources to the host device after the independent container is started;
[0025] The GPU resource usage change module is used to adjust the usage status of the GPU resource by the host device based on the task processing result of the independent container.
[0026] Optionally, the deep learning task information generation module is configured to obtain a work log of the Internet of Things platform, analyze the work log, and obtain deep learning task information of the Internet of Things platform; and extract dependencies of the deep learning task to construct a dependency set, including:
[0027] Obtaining information interaction logs between the IoT platform and the user terminal, identifying the type of interaction information on the information interaction logs, and obtaining deep learning task information received by the IoT platform from the user terminal; and extracting dependencies of the deep learning task to construct a dependency set;
[0028] The independent container encapsulation module is used to encapsulate the deep learning task of the Internet of Things platform into an independent container based on the deep learning task information and dependency set, including:
[0029] Based on the model architecture and data set size of the deep learning task and the dependency set, the deep learning task is encapsulated into an independent container, and the independent container is identified to generate container location information of the independent container on the Internet of Things platform.
[0030] Optionally, the callable GPU resource determination module is configured to analyze the independent container to determine running process information of the application within the independent container; and based on the running process information, adjust the GPU call policy of the Internet of Things platform to determine the GPU resources allowed to be called by the application, including:
[0031] Analyze the program execution log of the application in the independent container to determine the running process information of the application in the process of processing the deep learning task; wherein the running process information includes the GPU computing resources and display memory space required for each processing link in the process of the application processing the deep learning task;
[0032] The method instructs a GPU driver of the IoT platform to interact with the independent container, so that the GPU driver hijacks the GPU call permission of the application program in the independent container. Based on the running process information, the method adjusts the calling status of the GPU computing resources and display memory space in different processing links of the GPU driver, thereby determining the amount of GPU computing resources and display memory space that the GPU driver is allowed to call.
[0033] Optionally, the host device selection module is configured to select a host device capable of invoking the GPU resources from among all host devices under the IoT platform based on their operating status, including:
[0034] Obtaining the amount of data to be processed and the average data processing speed of all host devices under the IoT platform, thereby estimating the time required for each host device to complete its own data processing, and selecting the host device with the shortest required time as the host device capable of invoking the GPU resources;
[0035] The independent container loading and resource allocation module is used to load the independent container to the selected host device and allocate the GPU resources to the host device after the independent container is started, including:
[0036] Based on the node location information of the selected host device in the Internet of Things, the independent container is loaded into the selected host device, and when the independent container is started, the corresponding GPU computing resources and display memory space are allocated to the host device;
[0037] The GPU resource usage change module is configured to adjust the usage status of the GPU resource by the host device based on the task processing result of the independent container, including:
[0038] Determine whether the independent container completely outputs the task processing result of the deep learning task. If not, keep the host device's usage status of the currently allocated GPU computing resources and display memory space unchanged; if so, instruct the host device to release the currently allocated GPU computing resources and display memory space.
[0039] Compared with the prior art, the present invention has the following beneficial effects:
[0040] The container-based IoT platform GPU virtualization control method and system provided in this application encapsulates each deep learning task into an independent container to achieve isolation and independent resource management of different deep learning tasks. Each independent container contains the deep learning application and dependencies required to execute the deep learning task; it also virtualizes the GPU resources of the IoT platform and uses encapsulation libraries and dynamic links to interact with the GPU driver, hijacks the GPU resource calls of the application in the container, limits the container's use of the GPU and display memory, and achieves upper limit isolation of GPU computing power and display memory to prevent mutual interference between different deep learning tasks; loading the container onto a host device that can call GPU resources and allocating corresponding GPU resources when the container is started can avoid waste of GPU computing resources, achieve computing load balancing between tasks, prevent mutual interference between tasks, improve the parallelism and scalability of task execution on the IoT platform, and reduce the difficulty of system deployment and maintenance of the IoT platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work. Among them:
[0042] Figure 1 This is a flow chart of the container-based IoT platform GPU virtualization control method provided by the present invention.
[0043] Figure 2 This is a schematic diagram of the structure of the container-based Internet of Things platform GPU virtualization control system provided by the present invention. DETAILED DESCRIPTION
[0044] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are described in detail below in conjunction with the accompanying drawings. It will be understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only some, rather than all, structures related to the present application are shown in the accompanying drawings. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0045] As used herein, the terms "comprise," "comprising," and "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.
[0046] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0047] See also Figure 1 As shown, the container-based IoT platform GPU virtualization control method provided by an embodiment of the present application includes:
[0048] Obtaining the work log of the IoT platform, analyzing the work log to obtain the deep learning task information of the IoT platform; extracting the dependencies of the deep learning task and constructing a dependency set; based on the deep learning task information and the dependency set, encapsulating the deep learning task of the IoT platform into an independent container;
[0049] Analyze the independent container to determine the running process information of the application in the independent container; based on the running process information, adjust the GPU calling policy of the Internet of Things platform to determine the GPU resources allowed to be called by the application;
[0050] Based on the operating status of all host devices under the IoT platform, a host device that can call the GPU resource is selected; the independent container is loaded onto the selected host device, and the GPU resource is allocated to the host device when the independent container is started; and based on the task processing results of the independent container, the host device's usage status of the GPU resource is adjusted.
[0051] The beneficial effects of the above embodiments are as follows: the container-based GPU virtualization control method for the Internet of Things platform encapsulates each deep learning task into an independent container to achieve isolation and independent resource management of different deep learning tasks. Each independent container contains the deep learning application and dependencies required to execute the deep learning task; it also virtualizes the GPU resources of the Internet of Things platform and uses the encapsulation library and dynamic linking to interact with the GPU driver, hijacks the GPU resource call of the application in the container, limits the container's use of the GPU and display memory, and achieves upper limit isolation of the GPU computing power and display memory to prevent mutual interference between different deep learning tasks; loading the container onto a host device that can call GPU resources and allocating corresponding GPU resources when the container is started can avoid waste of GPU computing resources, achieve computing load balancing between tasks, prevent mutual interference between tasks, improve the parallelism and scalability of task execution on the Internet of Things platform, and reduce the difficulty of system deployment and maintenance of the Internet of Things platform.
[0052] In another embodiment, a work log of an Internet of Things platform is obtained, the work log is analyzed to obtain deep learning task information of the Internet of Things platform; dependencies of the deep learning task are extracted to construct a dependency set; and based on the deep learning task information and the dependency set, the deep learning task of the Internet of Things platform is encapsulated into an independent container, including:
[0053] Obtain information interaction logs between the IoT platform and the user terminal, identify the type of interaction information on the information interaction logs, and obtain deep learning task information received by the IoT platform from the user terminal;
[0054] The dependencies of the deep learning task are extracted to construct a dependency set. Based on the model architecture and dataset size of the deep learning task and the dependency set, the deep learning task is encapsulated into an independent container, and the independent container is identified to generate the container location information of the independent container on the Internet of Things platform.
[0055] The beneficial effects of the above embodiments are that the IoT platform has strong computing power and is often used to perform computational processing on deep learning tasks from external user terminals. When a user terminal needs to process a deep learning task, it communicates with the IoT platform. At this point, the IoT platform generates an information interaction log with the user terminal, which comprehensively records all interaction information between the user terminal and the IoT platform. The information interaction log is then processed to identify the type of interaction information, specifically the type of each data item in the information interaction log, thereby obtaining the deep learning task information received by the IoT platform from the user terminal. During the actual identification process, the type of each data item can be compared and matched with the type of the deep learning task information to filter out the corresponding deep learning task information. Based on the identified deep learning task information, the corresponding deep learning task is constructed. Based on the deep learning task's model architecture, dataset size, and dependency set, the deep learning task is encapsulated into an independent container to ensure compatibility with the deep learning task. Generally speaking, the larger the task data volume of a deep learning task, the larger the capacity of the corresponding independent container. Furthermore, the internal data structure of the independent container should also be consistent with the task data structure. In addition, each independent container is identified and its container location information on the IoT platform is determined, thereby ensuring that the corresponding independent container can be quickly and accurately found in the future and achieving efficient loading of the independent container.
[0056] In another embodiment, analyzing the independent container to determine running process information of an application within the independent container; and adjusting the GPU calling policy of the Internet of Things platform based on the running process information to determine the GPU resources allowed to be called by the application, including:
[0057] Analyze the program execution log of the application in the independent container to determine the running process information of the application in the process of processing the deep learning task; wherein the running process information includes the GPU computing resources and display memory space required for each processing link in the process of the application processing the deep learning task;
[0058] The GPU driver of the IoT platform is instructed to interact with the independent container, so that the GPU driver hijacks the GPU call permission of the application program in the independent container. Then, based on the running process information, the GPU driver adjusts the calling status of the GPU computing resources and display memory space in different processing links of the GPU driver to determine the amount of GPU computing resources and display memory space that the GPU driver is allowed to call.
[0059] The beneficial effect of the above embodiment is that there is a corresponding deep learning application and its dependencies inside the independent container. The deep learning application is used to perform the corresponding deep learning task, and the deep learning application needs to use the GPU computing resources and display memory space of the Internet of Things platform to complete the corresponding calculation program. The GPU computing resources and display memory space required by the deep learning application in different processing links during the processing of the deep learning task are not the same. By analyzing the program running log of the application inside the independent container, the running process information of the application during the processing of the deep learning task is determined, so that the GPU computing resources and display memory space allowed to be called by the independent container can be strictly limited based on the running process information, avoiding the independent container from occupying too much GPU computing resources and display memory space of the Internet of Things platform, resulting in waste of GPU resources and low utilization efficiency. In addition, in order to strictly limit the upper limit of the call to GPU resources during the actual processing of the independent container, the GPU driver of the Internet of Things platform is instructed to interact with the independent container, so that the GPU driver hijacks the GPU call permission of the application inside the independent container, so that the GPU driver obtains the permission to allocate GPU resources to the independent container. Based on the running process information, the application's call status for the IoT platform's GPU computing resources and display memory space in different processing links is adjusted to determine the size of the GPU computing resources and display memory space allowed to be called by the application, thereby ensuring efficient utilization of the IoT platform's own GPU resources.
[0060] In another embodiment, based on the operating status of all host devices under the IoT platform, a host device that can call the GPU resource is selected; the independent container is loaded to the selected host device, and the GPU resource is allocated to the host device after the independent container is started; and based on the task processing result of the independent container, the host device's usage status of the GPU resource is adjusted, including:
[0061] Obtain the amount of data to be processed and the average data processing speed of all host devices under the IoT platform, thereby estimating the time required for each host device to complete its own processing of the data, and select the host device with the shortest required time as the host device that can access the GPU resources;
[0062] Based on the node location information of the selected host device in the Internet of Things, the independent container is loaded into the selected host device, and when the independent container is started, the corresponding GPU computing resources and display memory space are allocated to the host device;
[0063] Determine whether the independent container has completely output the task processing result of the deep learning task. If not, keep the host device's usage status of the currently allocated GPU computing resources and display memory space unchanged; if so, instruct the host device to release the currently allocated GPU computing resources and display memory space.
[0064] The beneficial effect of the above embodiment is that the Internet of Things platform is connected to multiple host devices, each host device is used as a physical entity to load and run independent containers, and the amount of data to be processed and the average data processing speed of each host device will affect the efficiency of its operation of the loaded independent container. To this end, the amount of data to be processed and the average data processing speed of all host devices under the Internet of Things platform are used to estimate the time required for each host device to complete its own data to be processed, and the host device with the smallest required time is selected as the host device that can call the GPU resources, so as to ensure that the independent container can be loaded into the host device with the best current performance. Based on the node location information of the selected host device in the Internet of Things, the independent container is loaded to the selected host device, and when the independent container is started, the corresponding GPU computing resources and display memory space are allocated to the host device, so that the host device can load and run the independent container in time and execute the deep learning tasks inside the independent container. It also determines whether the independent container has completely output the task processing result of the deep learning task. If not, the host device's usage status of the currently allocated GPU computing resources and display memory space remains unchanged; if not, the host device is instructed to release the currently allocated GPU computing resources and display memory space. This ensures that after the host device completes the processing of the deep learning task, the GPU computing resources and display memory space occupied by itself are released in a timely manner, thereby improving the operational utilization efficiency of the GPU resources of the Internet of Things platform.
[0065] See also Figure 2 As shown, the container-based IoT platform GPU virtualization control system provided by one embodiment of the present application includes:
[0066] A deep learning task information generation module is used to obtain the work log of the IoT platform, analyze the work log, obtain the deep learning task information of the IoT platform; and extract the dependencies of the deep learning task to construct a dependency set;
[0067] An independent container encapsulation module is used to encapsulate the deep learning task of the IoT platform into an independent container based on the deep learning task information and dependency set;
[0068] A GPU resource determination module may be called to analyze the independent container and determine the running process information of the application within the independent container; based on the running process information, the GPU calling policy of the IoT platform may be adjusted to determine the GPU resources that the application is allowed to call;
[0069] A host device selection module is used to select a host device that can call the GPU resource based on the operating status of all host devices under the IoT platform;
[0070] An independent container loading and resource allocation module, configured to load the independent container into a selected host device and allocate GPU resources to the host device after the independent container is started;
[0071] The GPU resource usage change module is used to adjust the host device's usage status of the GPU resource based on the task processing result of the independent container.
[0072] The beneficial effects of the above embodiments are as follows: the container-based IoT platform GPU virtualization control system encapsulates each deep learning task into an independent container to achieve isolation and independent resource management of different deep learning tasks. Each independent container contains the deep learning application and dependencies required to execute the deep learning task; it also virtualizes the GPU resources of the IoT platform, and uses the encapsulation library and dynamic linking to interact with the GPU driver, hijacks the GPU resource call of the application in the container, limits the container's use of the GPU and display memory, and achieves upper limit isolation of the GPU computing power and display memory, preventing mutual interference between different deep learning tasks; loading the container onto a host device that can call GPU resources and allocating corresponding GPU resources when the container is started can avoid waste of GPU computing resources, achieve computing load balancing between tasks, prevent mutual interference between tasks, improve the parallelism and scalability of task execution on the IoT platform, and reduce the difficulty of system deployment and maintenance of the IoT platform.
[0073] In another embodiment, the deep learning task information generation module is used to obtain a work log of an Internet of Things platform, analyze the work log to obtain deep learning task information of the Internet of Things platform; and extract dependencies of the deep learning task to construct a dependency set, including:
[0074] Obtaining information interaction logs between the IoT platform and the user terminal, identifying the type of interaction information on the information interaction logs, and obtaining deep learning task information received by the IoT platform from the user terminal; and extracting dependencies of the deep learning task to construct a dependency set;
[0075] The independent container encapsulation module is used to encapsulate the deep learning task of the Internet of Things platform into an independent container based on the deep learning task information and dependency set, including:
[0076] Based on the model architecture and data set size of the deep learning task and the dependency set, the deep learning task is encapsulated into an independent container, and the independent container is identified to generate container location information of the independent container on the Internet of Things platform.
[0077] The beneficial effects of the above embodiments are that the IoT platform has strong computing power and is often used to perform computational processing on deep learning tasks from external user terminals. When a user terminal needs to process a deep learning task, it communicates with the IoT platform. At this point, the IoT platform generates an information interaction log with the user terminal, which comprehensively records all interaction information between the user terminal and the IoT platform. The information interaction log is then processed to identify the type of interaction information, specifically the type of each data item in the information interaction log, thereby obtaining the deep learning task information received by the IoT platform from the user terminal. During the actual identification process, the type of each data item can be compared and matched with the type of the deep learning task information to filter out the corresponding deep learning task information. Based on the identified deep learning task information, the corresponding deep learning task is constructed. Based on the deep learning task's model architecture, dataset size, and dependency set, the deep learning task is encapsulated into an independent container to ensure compatibility with the deep learning task. Generally speaking, the larger the task data volume of a deep learning task, the larger the capacity of the corresponding independent container. Furthermore, the internal data structure of the independent container should also be consistent with the task data structure. In addition, each independent container is identified and its container location information on the IoT platform is determined, thereby ensuring that the corresponding independent container can be quickly and accurately found in the future and achieving efficient loading of the independent container.
[0078] In another embodiment, the callable GPU resource determination module is configured to analyze the independent container to determine running process information of an application within the independent container; and based on the running process information, adjust the GPU call policy of the Internet of Things platform to determine the GPU resources allowed to be called by the application, including:
[0079] Analyze the program execution log of the application in the independent container to determine the running process information of the application in the process of processing the deep learning task; wherein the running process information includes the GPU computing resources and display memory space required for each processing link in the process of the application processing the deep learning task;
[0080] The GPU driver of the IoT platform is instructed to interact with the independent container, so that the GPU driver hijacks the GPU call permission of the application program in the independent container. Then, based on the running process information, the GPU driver adjusts the calling status of the GPU computing resources and display memory space in different processing links of the GPU driver to determine the amount of GPU computing resources and display memory space that the GPU driver is allowed to call.
[0081] The beneficial effect of the above embodiment is that there is a corresponding deep learning application and its dependencies inside the independent container. The deep learning application is used to perform the corresponding deep learning task, and the deep learning application needs to use the GPU computing resources and display memory space of the Internet of Things platform to complete the corresponding calculation program. The GPU computing resources and display memory space required by the deep learning application in different processing links during the processing of the deep learning task are not the same. By analyzing the program running log of the application inside the independent container, the running process information of the application during the processing of the deep learning task is determined, so that the GPU computing resources and display memory space allowed to be called by the independent container can be strictly limited based on the running process information, avoiding the independent container from occupying too much GPU computing resources and display memory space of the Internet of Things platform, resulting in waste of GPU resources and low utilization efficiency. In addition, in order to strictly limit the upper limit of the call to GPU resources during the actual processing of the independent container, the GPU driver of the Internet of Things platform is instructed to interact with the independent container, so that the GPU driver hijacks the GPU call permission of the application inside the independent container, so that the GPU driver obtains the permission to allocate GPU resources to the independent container. Based on the running process information, the application's call status for the IoT platform's GPU computing resources and display memory space in different processing links is adjusted to determine the size of the GPU computing resources and display memory space allowed to be called by the application, thereby ensuring efficient utilization of the IoT platform's own GPU resources.
[0082] In another embodiment, the host device selection module is configured to select a host device capable of invoking the GPU resource based on the operating status of all host devices under the IoT platform, including:
[0083] Obtain the amount of data to be processed and the average data processing speed of all host devices under the IoT platform, thereby estimating the time required for each host device to complete its own processing of the data, and select the host device with the shortest required time as the host device that can access the GPU resources;
[0084] The independent container loading and resource allocation module is used to load the independent container to the selected host device and allocate the GPU resources to the host device after the independent container is started, including:
[0085] Based on the node location information of the selected host device in the Internet of Things, the independent container is loaded into the selected host device, and when the independent container is started, the corresponding GPU computing resources and display memory space are allocated to the host device;
[0086] The GPU resource usage change module is used to adjust the host device's usage of the GPU resource based on the task processing result of the independent container, including:
[0087] Determine whether the independent container has completely output the task processing result of the deep learning task. If not, keep the host device's usage status of the currently allocated GPU computing resources and display memory space unchanged; if so, instruct the host device to release the currently allocated GPU computing resources and display memory space.
[0088] The beneficial effect of the above embodiment is that the Internet of Things platform is connected to multiple host devices, each host device is used as a physical entity to load and run independent containers, and the amount of data to be processed and the average data processing speed of each host device will affect the efficiency of its operation of the loaded independent container. To this end, the amount of data to be processed and the average data processing speed of all host devices under the Internet of Things platform are used to estimate the time required for each host device to complete its own data to be processed, and the host device with the smallest required time is selected as the host device that can call the GPU resources, so as to ensure that the independent container can be loaded into the host device with the best current performance. Based on the node location information of the selected host device in the Internet of Things, the independent container is loaded to the selected host device, and when the independent container is started, the corresponding GPU computing resources and display memory space are allocated to the host device, so that the host device can load and run the independent container in time and execute the deep learning tasks inside the independent container. It also determines whether the independent container has completely output the task processing result of the deep learning task. If not, the host device's usage status of the currently allocated GPU computing resources and display memory space remains unchanged; if not, the host device is instructed to release the currently allocated GPU computing resources and display memory space. This ensures that after the host device completes the processing of the deep learning task, the GPU computing resources and display memory space occupied by itself are released in a timely manner, thereby improving the operational utilization efficiency of the GPU resources of the Internet of Things platform.
[0089] In general, the container-based GPU virtualization control method and system for the Internet of Things platform encapsulates each deep learning task into an independent container to achieve isolation and independent resource management of different deep learning tasks. Each independent container contains the deep learning application and dependencies required to execute the deep learning task; it also virtualizes the GPU resources of the Internet of Things platform and uses encapsulation libraries and dynamic links to interact with the GPU driver, hijacks the GPU resource calls of the application in the container, limits the container's use of the GPU and display memory, and achieves upper limit isolation of GPU computing power and display memory to prevent mutual interference between different deep learning tasks; loading the container onto a host device that can call GPU resources and allocating corresponding GPU resources when the container is started can avoid waste of GPU computing resources, achieve computing load balancing between tasks, prevent mutual interference between tasks, improve the parallelism and scalability of task execution on the Internet of Things platform, and reduce the difficulty of system deployment and maintenance of the Internet of Things platform.
[0090] The above is only a specific embodiment of the present invention, and any other improvements made based on the concept of the present invention are considered to be within the scope of protection of the present invention.
Claims
1. A container-based IoT platform GPU virtualization control method, characterized in that: include: Obtaining a work log of the Internet of Things platform, analyzing the work log, and obtaining deep learning task information of the Internet of Things platform; Extracting dependencies of the deep learning task and constructing a dependency set; encapsulating the deep learning task of the IoT platform into an independent container based on the deep learning task information and the dependency set; Analyze the independent container to determine the running process information of the application within the independent container; adjust the GPU calling policy of the Internet of Things platform based on the running process information to determine the GPU resources allowed to be called by the application; wherein the running process information includes the GPU computing resources and display memory space required for each processing link in the process of the application processing the deep learning task; Based on the operating status of all host devices under the Internet of Things platform, a host device that can call the GPU resources is selected; the independent container is loaded to the selected host device, and the GPU resources are allocated to the host device when the independent container is started; and based on the task processing result of the independent container, the host device's usage status of the GPU resources is adjusted.
2. The container-based Internet of Things platform GPU virtualization control method according to claim 1, characterized in that: Obtaining a work log of the Internet of Things platform, analyzing the work log, and obtaining deep learning task information of the Internet of Things platform; Extract the dependencies of deep learning tasks and build dependency sets; Based on the deep learning task information and dependency set, the deep learning task of the IoT platform is encapsulated into an independent container, including: Obtaining information interaction logs between the Internet of Things platform and the user terminal, identifying the type of interaction information on the information interaction logs, and obtaining deep learning task information received by the Internet of Things platform from the user terminal; The dependencies of the deep learning task are extracted to construct a dependency set. Based on the model architecture and dataset size of the deep learning task and the dependency set, the deep learning task is encapsulated into an independent container, and the independent container is identified to generate container location information of the independent container on the Internet of Things platform.
3. The container-based Internet of Things platform GPU virtualization control method according to claim 1, wherein: Analyze the independent container to determine the running process information of the application program in the independent container; Adjusting the GPU calling policy of the IoT platform based on the running process information to determine the GPU resources that the application is allowed to call includes: Analyze the program execution log of the application in the independent container to determine the running process information of the application in the process of processing the deep learning task; The method instructs a GPU driver of the IoT platform to interact with the independent container, so that the GPU driver hijacks the GPU call permission of the application program in the independent container. Based on the running process information, the method adjusts the calling status of the GPU computing resources and display memory space in different processing links of the GPU driver, thereby determining the amount of GPU computing resources and display memory space that the GPU driver is allowed to call.
4. The container-based Internet of Things platform GPU virtualization control method according to claim 1, wherein: Based on the operating status of all host devices under the IoT platform, a host device that can call the GPU resources is selected; the independent container is loaded into the selected host device, and the GPU resources are allocated to the host device after the independent container is started; Then, based on the task processing result of the independent container, adjusting the usage status of the GPU resource by the host device includes: Obtaining the amount of data to be processed and the average data processing speed of all host devices under the IoT platform, thereby estimating the time required for each host device to complete its own data processing, and selecting the host device with the shortest required time as the host device capable of invoking the GPU resources; Based on the node location information of the selected host device in the Internet of Things, the independent container is loaded into the selected host device, and when the independent container is started, the corresponding GPU computing resources and display memory space are allocated to the host device; Determine whether the independent container completely outputs the task processing result of the deep learning task. If not, keep the host device's usage status of the currently allocated GPU computing resources and display memory space unchanged; if so, instruct the host device to release the currently allocated GPU computing resources and display memory space.
5. A container-based IoT platform GPU virtualization control system, characterized by: include: A deep learning task information generation module is used to obtain the work log of the Internet of Things platform, analyze the work log, and obtain the deep learning task information of the Internet of Things platform; And extract the dependencies of deep learning tasks and build dependency sets; An independent container encapsulation module, configured to encapsulate the deep learning task of the IoT platform into an independent container based on the deep learning task information and dependency set; A callable GPU resource determination module is configured to analyze the independent container and determine the running process information of the application within the independent container; based on the running process information, adjust the GPU calling policy of the IoT platform to determine the GPU resources allowed to be called by the application; wherein the running process information includes the GPU computing resources and display memory space required for each processing step in the process of the application processing the deep learning task; A host device selection module, configured to select a host device capable of invoking the GPU resources from among all host devices under the IoT platform based on their operating status; An independent container loading and resource allocation module is used to load the independent container onto a selected host device and allocate the GPU resources to the host device after the independent container is started; and a GPU resource usage change module is used to adjust the host device's usage of the GPU resources based on the independent container's task processing results.
6. The container-based Internet of Things platform GPU virtualization control system according to claim 5, characterized in that: The deep learning task information generation module is used to obtain the work log of the Internet of Things platform, analyze the work log, and obtain the deep learning task information of the Internet of Things platform; as well as Extract the dependencies of deep learning tasks and build a dependency set, including: Obtaining information interaction logs between the IoT platform and the user terminal, identifying the type of interaction information on the information interaction logs, and obtaining deep learning task information received by the IoT platform from the user terminal; and extracting dependencies of the deep learning task to construct a dependency set; The independent container encapsulation module is used to encapsulate the deep learning task of the Internet of Things platform into an independent container based on the deep learning task information and dependency set, including: Based on the model architecture and data set size of the deep learning task and the dependency set, the deep learning task is encapsulated into an independent container, and the independent container is identified to generate container location information of the independent container on the Internet of Things platform.
7. The container-based Internet of Things platform GPU virtualization control system according to claim 5, characterized in that: The callable GPU resource determination module is used to analyze the independent container and determine the running process information of the application program in the independent container; Adjusting the GPU calling policy of the IoT platform based on the running process information to determine the GPU resources that the application is allowed to call includes: Analyze the program execution log of the application in the independent container to determine the running process information of the application in the process of processing the deep learning task; The method instructs a GPU driver of the IoT platform to interact with the independent container, so that the GPU driver hijacks the GPU call permission of the application program in the independent container. Based on the running process information, the method adjusts the calling status of the GPU computing resources and display memory space in different processing links of the GPU driver, thereby determining the amount of GPU computing resources and display memory space that the GPU driver is allowed to call.
8. The container-based Internet of Things platform GPU virtualization control system according to claim 5, characterized in that: The host device selection module is configured to select a host device capable of invoking the GPU resources from among all host devices under the IoT platform based on the operating status of the host devices, including: Obtaining the amount of data to be processed and the average data processing speed of all host devices under the IoT platform, thereby estimating the time required for each host device to complete its own data processing, and selecting the host device with the shortest required time as the host device capable of invoking the GPU resources; The independent container loading and resource allocation module is used to load the independent container to the selected host device and allocate the GPU resources to the host device after the independent container is started, including: Based on the node location information of the selected host device in the Internet of Things, the independent container is loaded into the selected host device, and when the independent container is started, the corresponding GPU computing resources and display memory space are allocated to the host device; The GPU resource usage change module is configured to adjust the usage status of the GPU resource by the host device based on the task processing result of the independent container, including: Determine whether the independent container completely outputs the task processing result of the deep learning task. If not, keep the host device's usage status of the currently allocated GPU computing resources and display memory space unchanged; if so, instruct the host device to release the currently allocated GPU computing resources and display memory space.
Citation Information
Patent Citations
A depth learning method and device
CN109272116A
GPU virtualization deployment method and system, computer equipment and storage medium
CN115617364A