A method, medium and system for model management and scheduling based on cloud native deployment

Through model management and scheduling methods based on cloud native deployment, using Docker and Kubernetes, the problem of efficient management and scheduling of multi-source heterogeneous scientific computing models is solved, computing efficiency and resource utilization are improved, custom model integration is supported, and it is suitable for large-scale scientific computing.

CN118502970BActive Publication Date: 2024-10-01CENT SOUTH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410962060.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-18
Publication Date
2024-10-01
Estimated Expiration
2044-07-18

AI Technical Summary

Technical Problem

Existing technology is difficult to efficiently manage and schedule multi-source heterogeneous scientific computing models, resulting in software dependency conflicts and low computing efficiency. It cannot fully utilize the capabilities of high-performance computing platforms, affecting scientific research innovation and application computing speed.

Method used

Adopting a model management and scheduling method based on cloud native deployment, through model encapsulation, resource description, application integration, task analysis and scheduling optimization, and multi-dimensional heterogeneous resource-aware task hybrid scheduling steps, the Docker container and Kubernetes orchestration framework are used to implement the model. efficient management and scheduling.

Benefits of technology

It improves the execution efficiency of the model integration process, reduces task scheduling and data redundancy, effectively utilizes computing resources, is suitable for large-scale scientific computing tasks, supports custom model integration and resource matching, and improves scientific research and innovation capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118502970B_ABST
    Figure CN118502970B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, medium and system for model management and scheduling based on cloud native deployment. The model management method includes a model encapsulation step, a model resource description step and a model application integration step; the model scheduling method includes a model application process analysis and control step, a scheduling optimization step based on preceding task matching, and a multi-dimensional heterogeneous resource-aware task hybrid scheduling step. The present invention adopts a distributed task scheduling method to enable tasks of model granularity to be dispatched to computing nodes with better performance and higher resource matching for execution, which is particularly suitable for the execution of large-scale scientific computing tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of model management and scheduling, and in particular to a method, medium and system for model management and scheduling based on cloud native deployment. Background Art

[0002] With the rapid progress of modern science and technology, scientific computing and data modeling have become important engines driving innovation and development in various scientific research fields. In particular, in the vast and complex field of earth science, accurate and efficient modeling technology is particularly critical. In today's era, scientists use advanced computing technology and massive data resources to build a series of diversified and complex models. These models are not only used to reveal the essential laws of natural phenomena, but also serve a variety of functions such as decision support, risk assessment, and prediction and forecasting.

[0003] However, in actual scientific research practice, with the continuous upgrading of technology iteration and deepening of theoretical exploration, model development activities are becoming more frequent, and the types and number of models are growing rapidly. Researchers usually work in a single computing node environment and often need to process and run multiple independent and potentially internally related scientific computing models at the same time. This situation has led to a series of difficult technical challenges:

[0004] First, different scientific computing models may introduce various resource requirements and logical dependencies during the design and implementation process, thereby causing potential software dependency conflicts in a limited computing environment, seriously affecting the consistency and stability of model deployment and operation.

[0005] Secondly, given the diverse sources and structures of the models, a multi-source heterogeneous algorithm model system has been formed. Traditional management models and integration methods are increasingly unable to meet the needs of efficient management and coordination, which is not conducive to collaborative operation and data exchange between models, and restricts the overall innovation capabilities of the scientific research team.

[0006] Finally, when multiple models are integrated to perform task calculations, the unreasonable allocation of computing resources or imperfect communication mechanisms may lead to low overall computing efficiency and inability to fully utilize the capabilities of the high-performance computing platform, which in turn affects the speed of application computing.

[0007] How to efficiently manage and schedule various multi-source heterogeneous scientific computing models has become a key technical issue that urgently needs to be overcome.

[0008] The industry urgently needs a model management and scheduling method and system based on cloud-native deployment. Summary of the invention

[0009] In response to the problems in the related technology, the present invention proposes a method, medium and system for model management and scheduling based on cloud native deployment to overcome the above-mentioned technical problems existing in the existing related technology.

[0010] To this end, the specific technical solution adopted by the present invention is as follows:

[0011] A method, medium and system for model management and scheduling based on cloud native deployment, wherein:

[0012] The model management method includes model packaging steps, model resource description steps, and model application integration steps;

[0013] The model packaging step includes preparing the model directory and building the image;

[0014] The model resource description step includes establishing a multi-label dynamic classification method and converting the resource attributes of the model into structured data in a relational database;

[0015] The model application integration step uses a directed acyclic graph to model the model application integration;

[0016] The model scheduling method includes the model application process analysis and control steps, the scheduling optimization step based on the matching of predecessor tasks, and the task mixed scheduling step based on multi-dimensional heterogeneous resource perception.

[0017] Among them, the model application process analysis and control steps analyze the model integration task process dependencies to achieve task decomposition, control and scheduling;

[0018] The scheduling optimization step based on predecessor task matching is that during the execution of the task flow, the input data path, output data path and model image of each model task will be recorded in detail, compared and matched or scheduled;

[0019] The steps of multi-dimensional heterogeneous resource-aware task hybrid scheduling are to select nodes according to the specific resource requirements of different model tasks when building model resources.

[0020] In a possible design, the model packaging step includes preparing the model directory and writing the Dockerfile, building the image, and hosting the image.

[0021] In a possible design, the model resource description step is to establish a multi-label dynamic classification method, allowing the model to have multiple labels and dynamically add new types or attributes as the model library expands and the research deepens; secondly, use the YAML language to express the resource attributes of the model, and convert the resource attributes described in the YAML format into structured data in a relational database.

[0022] In a possible design, the model application integration step is to use a directed acyclic graph to model the model application integration, using a binary T = ( V , E ) to represent the susceptibility prediction task workflow, where V = { v 1 , v 2 , … v n} represents the set of all model tasks in the workflow. v i = { image_url , argument_list}Records the image URL of the corresponding task, as well as the instance file path parameter table of the input / output items; E = {( v i , v j ), v i , v j ∈ V} indicates the dependency between tasks, such as ( v i , v j )express v j Must wait v i It can only be executed after the execution is completed; in accordance with the preset application integration process definition, the system strictly follows the order and dependency logic between task nodes to ensure the orderly progress of tasks at each node. Before execution, the images corresponding to each task have been pre-stored in the image warehouse in the model library. When the task is started, the system image_url Automatically obtain the specified image and dynamically inject the input and output parameter table. Then, these images are scheduled to the computing node, and Pod and container instances are created. The container loads the necessary input data based on the parameter table, and after performing the calculation, the result is written to the output path indicated by the parameter table.

[0023] In a possible design, the model application process parsing and control steps are specifically as follows: parsing the model integration task process dependency, realizing task decomposition, control and scheduling, dynamically controlling the parallel execution of independent tasks, inputting the task process structure task_graph, establishing the scheduling queue scheduling_queue, and initializing it to empty; establishing the scheduled task set scheduled_tasks, and initializing it to empty; defining the asynchronous scheduling and executing the parallel task function scheduling, and executing in the function: when the scheduling queue is not empty, asynchronously and parallelly scheduling each task in the scheduling queue, and updating the scheduled tasks to scheduled_tasks; defining the asynchronous update task status function update, and executing in the function: when scheduled_tasks is not empty, traversing each task in scheduled_tasks, and judging whether the traversed tasks are Whether the task has been completed. If the traversed task has been completed, update the task status in task_graph; define the function main that asynchronously adds the executable task to the scheduling queue, and execute the loop in the function: traverse each task in task_graph, if the task has no predecessor task or the predecessor tasks have been completed, add the task to scheduling_queue, if the tail task is completed, end the function loop and jump out. The algorithm process includes three asynchronous functions: main, scheduling, and update. Main is responsible for scheduling tasks that have no predecessor tasks or whose predecessor tasks have been completed to the scheduling queue; the scheduling function schedules the tasks in the scheduling queue in parallel as Pods and executes them asynchronously, and adds the scheduled tasks to the scheduled task set. The update function updates the task status in the task flow structure in real time according to the scheduled task set.

[0024] In a possible design, the scheduling optimization steps based on predecessor task matching are as follows: during the execution of the task flow, the input data path, output data path and model image of each model task will be recorded in detail in the historical record cache bufferSet. Before scheduling any model task, the system will retrieve all its predecessor tasks, and then compare these predecessor tasks one by one in the bufferSet to see if there are complete matching records. If all predecessor tasks have corresponding matching items, the task is determined to be completed and the existing results can be reused directly without rescheduling; otherwise, the system will schedule and execute the task normally, and update the bufferSet when completed.

[0025] In a possible design, the steps of multi-dimensional heterogeneous resource-aware task hybrid scheduling are as follows: first, when constructing model resources, for the resource types required by different model tasks, clearly identify whether they belong to the CPU type or GPU type, and screen the nodes according to the specific resource requirements of the model task, such as the number of CPU cores, memory size, number of GPU cards, and video memory size. Nodes that cannot meet the task requirements are excluded from the perspective of resource quantity, and the remaining nodes are added to the available node list available_nodes. The available nodes are screened again according to the task type. When scheduling GPU tasks, the two key dimensions of the GPU's single-precision floating-point computing capability FP32 value and video memory bandwidth are comprehensively considered. In order to quantify this performance, the GPU node score SG is defined, and its calculation method is shown in the following formula: S G =P×w1+B×w 2, in: P Represents the FP32 value of the node GPU card; B is the memory bandwidth of the node GPU; w 1 , w 2 Take 0.6 and 0.4 respectively; S G The larger the value, the better the GPU node performance; define the task application resource vector R , used to represent the resource combination required for the task, expressed as the following formula: R=(x1,x2,x3,x4), where x 1. x 2. x 3. x 4 represents the number of CPU cores, memory size, number of GPU cards, and GPU memory requested; defines the available resource vector of the computing node A , which is used to describe the current available resource status of the node, and is expressed as follows: A=(y1,y2,y3,y4), where y 1. y 2. y 3. y 4 represent the number of CPU cores, memory size, number of GPU cards, and number of GPU memory available on the node, respectively. In order to measure the similarity between the task application resource vector and the computing node available resource vector, the cosine similarity method is used. This similarity index is recorded as Similarity , which is calculated as , the final node score calculation method is Score = S × Similarity ,in, S Represents the performance level of the computing resource itself. When applying for CPU resources, S Corresponding to S C , when applying for GPU resources, SCorresponding to S G The secondary screening rule is: for CPU tasks that can be scheduled to GPU, they can be considered to be scheduled to CPU nodes or GPU nodes, depending on the subsequent scoring results; for other types of CPU tasks, they can only be scheduled to CPU nodes. available_nodes Exclude GPU nodes from the task list to avoid the potential problem that GPU nodes cannot be scheduled to GPU tasks because CPU and memory resources are occupied.

[0026] The present invention also provides a model management and scheduling device based on cloud native deployment, including a memory, a control processor, and a computer program stored in the memory and executable on the control processor, wherein the control processor executes the program to implement the aforementioned model management and scheduling method based on cloud native deployment.

[0027] The present invention also provides a control system, including the aforementioned model management and scheduling device based on cloud native deployment.

[0028] The present invention also provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to implement the aforementioned model management and scheduling method based on cloud-native deployment.

[0029] In summary, the model integration method proposed in the present invention breaks through the conventional model process integration framework. Its key innovation lies in using Docker containers as the basic carrier of the model rather than traditional pre-deployed functions, interfaces or Web services.

[0030] The application process of the present invention has no dependency on model granularity parallel control, and tasks that can be executed in parallel are distributed to multiple computing nodes and multiple processors for simultaneous execution, which can effectively utilize computing resources and significantly improve the execution efficiency of the application integration process, thereby shortening the computing cycle.

[0031] The present invention reduces unnecessary task scheduling, avoids repeated generation of existing output data, effectively saves computing resources and time costs, improves the execution efficiency of the entire workflow, and reduces the redundancy of data storage.

[0032] The present invention takes into account the differences in computing resource performance of different nodes and the specific requirements of different models for mixed types of computing resources. The final node score calculation combines the performance level of the computing resource itself and its degree of fit with the applied resources.

[0033] Compared with the prior art, the present invention has the following beneficial effects:

[0034] (1) The model of the present invention integrates application intermediate data caching and execution process recording to facilitate task tracking.

[0035] (2) The present invention supports the integrated application of custom models.

[0036] (3) The model resource description method of the present invention natively supports executable program and execution environment description.

[0037] (4) The present invention implements model management based on container images, emphasizing the management of the model algorithm itself.

[0038] (5) The present invention adopts a distributed task scheduling method to enable tasks of model granularity to be dispatched to computing nodes with better performance and higher resource matching for execution, which is particularly suitable for the execution of large-scale scientific computing tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0040] Figure 1 A schematic diagram of model integration in a method, medium, and system for model management and scheduling based on cloud native deployment of the present invention is shown;

[0041] Figure 2 A schematic diagram of the preceding task matching scheduling in a method, medium, and system for model management and scheduling based on cloud native deployment of the present invention is shown; wherein (a) is the submitted task flow, (b) is the actually executed task, and (c) is the result distribution. DETAILED DESCRIPTION

[0042] To further illustrate each embodiment, the present invention provides drawings, which are part of the disclosure of the present invention and are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, ordinary technicians in the field should be able to understand other possible implementations and advantages of the present invention. The components in the figures are not drawn to scale, and similar component symbols are generally used to represent similar components.

[0043] The purpose of the present invention is to provide a model management and scheduling method based on cloud native deployment, which relates to the field of cloud computing applications. To achieve the above purpose, the present invention adopts the following technical solutions:

[0044] A model management and scheduling method based on cloud native deployment, wherein:

[0045] The model management method includes model packaging steps, model resource description steps, and model application integration steps;

[0046] The model scheduling method includes the model application process analysis and control steps, the scheduling optimization step based on the matching of predecessor tasks, and the task mixed scheduling step based on multi-dimensional heterogeneous resource perception;

[0047] In a first aspect, the present invention provides a model management method based on cloud native containerization.

[0048] The model management method includes:

[0049] Model packaging steps,The core process of model resource packaging mainly includes the following steps: preparing the model directory and writing Dockerfile, building the image, and hosting the image.

[0050] Prepare the model directory: package several subdirectories and files into the model directory, including the model file directory source, which is used to store source programs or executable files, and is the main content of the model operation; the model dependency environment description file requirements.txt, which records in detail all the dependency environments, names, version numbers and other information required for the model operation, providing a guarantee for the consistency of the model operation environment.

[0051] Write Dockerfile: Describe the model startup method in a plain text file, including key information and commands such as dependency installation method, model running or compilation execution method.

[0052] Build an image: Use Docker build technology to execute the instructions in the Dockerfile file line by line to generate a usable image.

[0053] Image hosting: Use image warehouse to host model resources, upload images to the image warehouse, and realize unified management and distribution of models.

[0054] The model resource description step mainly includes the following steps: first, establish a multi-label dynamic classification method, break through the traditional single attribute division mode, allow the model to have multiple labels, and dynamically add new types or attributes as the model library expands and the research deepens. Secondly, use the YAML language to describe the resource attributes of the model in detail and convert the resource attributes described in the YAML format into structured data in the relational database. The specific approach is to ensure that each field in the YAML document can accurately correspond to the corresponding table attribute column in the database by designing the mapping rules between the YAML field and the database field, so as to achieve efficient retrieval and analysis of the model resource information.

[0055] The model application integration step uses a directed acyclic graph (DAG) to model the model application integration. Specifically, Figure 1 As shown, using the bigram T = ( V , E ) to represent the susceptibility prediction task workflow, where V = { v 1 , v 2 , … v n} represents the set of all model tasks in the workflow. v i = { image_url , argument_list}Records the image URL of the corresponding task, as well as the instance file path parameter table of the input / output items; E ={( v i , v j ), v i , v j ∈ V} indicates the dependency between tasks, such as ( v i , v j )express v j Must wait v i It can only be executed after the task is completed. According to the preset application integration process definition, the system strictly follows the order and dependency logic between task nodes to ensure the orderly progress of tasks at each node. Before execution, the images corresponding to each task have been pre-stored in the image warehouse in the model library. When the task is started, the system image_url Automatically obtain the specified image and dynamically inject the input and output parameter table. Subsequently, these images are scheduled to the computing node to create Pod and container instances. The container loads the necessary input data based on the parameter table, performs the calculation, and writes the result to the output path indicated by the parameter table. This calculation process is fully automated and executed continuously on different computing nodes. After the task is completed, the relevant Pod is automatically terminated on the node, effectively avoiding excessive occupation of computing resources.

[0056] In a second aspect, the present invention provides a model scheduling method based on a cloud-native container orchestration framework (Kubernetes).

[0057] The model scheduling method includes:

[0058] Model application process analysis and control steps. Analyze the model integration task process dependencies, realize task decomposition, control and scheduling, and dynamically control the parallel execution of independent tasks. Specifically, input the task process structure task_graph, establish the scheduling queue scheduling_queue, initialize it to empty; establish the scheduled task set scheduled_tasks, initialize it to empty; define asynchronous scheduling and execute the parallel task function scheduling, and execute in the function: when the scheduling queue is not empty, asynchronously and parallelly schedule each task in the scheduling queue, and update the scheduled tasks to scheduled_tasks; define asynchronous update of task status The state function update is executed in the function: when scheduled_tasks is not empty, it traverses each task in scheduled_tasks to determine whether the traversed task has been completed. If the traversed task has been completed, update the task status in task_graph; define the function main that asynchronously adds executable tasks to the scheduling queue, and execute the loop in the function: iterate over each task in task_graph. If the task has no predecessor task or the predecessor tasks have all been completed, add the task to scheduling_queue. If the tail task has been completed, end the function loop and jump out. The algorithm process includes three asynchronous functions: main, scheduling, and update. Main is responsible for scheduling tasks that have no predecessor tasks or have completed predecessor tasks to the scheduling queue; the scheduling function schedules the tasks in the scheduling queue in parallel as Pods and executes asynchronously, and adds the scheduled tasks to the scheduled task set. The update function updates the task status in the task flow structure in real time according to the scheduled task set.

[0059] Based on the scheduling optimization step of predecessor task matching, during the execution of the task flow, the input data path, output data path and model image of each model task will be recorded in detail in the history cache (bufferSet). Specifically, before scheduling any model task, the system will retrieve all its predecessor tasks (predecessors), and then compare these predecessor tasks one by one in the bufferSet to see if there are complete matching records. If all predecessor tasks have corresponding matching items, the task is determined to be completed and the existing results can be reused directly without rescheduling; otherwise, the system will schedule and execute the task normally, and update the bufferSet when completed.

[0060] The multi-dimensional heterogeneous resource-aware task hybrid scheduling step, in view of the specific requirements of different models for mixed types of computing resources, and considering the differences in the performance of computing resources of different nodes, a multi-dimensional heterogeneous resource-aware task hybrid scheduling method at the Pod scheduling level in Kubernetes is proposed. First, when building model resources, the resource types required by different model tasks are clearly identified as CPU or GPU. This classification information is crucial before executing the scheduling algorithm, which determines whether GPU resources need to be applied for. Through accurate task type identification, the efficiency and accuracy of resource allocation can be ensured. In the pre-selection stage of scheduling, in addition to considering the traditional memory and CPU filtering mechanisms, this method also expands the support for GPU video memory size. First, given that Kubernetes does not support GPU resource scheduling by default, the k8s-device-plugin plug-in is used to realize the perception and scheduling functions of GPU resources. On this basis, the nodes are screened according to the specific resource requirements of the model tasks (including the number of CPU cores, memory size, number of GPU cards and video memory size). First, those nodes that cannot meet the task requirements are excluded from the perspective of resource quantity, and the remaining nodes are added to the list of available nodes (available_nodes). Then, the available nodes are screened again according to the task type. If a task is located on the prefix path of all unexecuted GPU tasks in the process DAG, then in theory the task will be executed before all GPU tasks, so it will not compete with any GPU tasks for scarce GPU resources. This article defines such tasks as CPU tasks that can be scheduled to GPU nodes. Figure 2 As shown, GPU type tasks v 3 and v 5 The tasks on the prefix path are { v 1 , v 2}and{ v 1 , v 4},in v 1 On the prefix path of all GPU tasks, it will not participate in GPU resource competition. Based on this, the secondary screening rules are as follows: for CPU tasks that can be scheduled to the GPU, they can be considered for scheduling to CPU nodes or GPU nodes, depending on the subsequent scoring results; for other types of CPU tasks, they can only be scheduled to CPU nodes, and the pre-selection stage starts from available_ nodesGPU nodes are excluded from the scheduling to avoid the potential problem that GPU nodes cannot be scheduled to GPU tasks because CPU and memory resources are occupied. For the optimization stage, this method not only considers the resource usage, but also incorporates the node's own performance factors into the scoring mechanism, and constructs a comprehensive scoring system that considers the multi-dimensional performance of computing nodes. For the scheduling of CPU tasks, under the premise of the same number of cores, higher scheduling priority tends to be given to those nodes with better single-cycle floating-point computing capabilities, and this capability is quantified as a CPU performance score, that is, single-cycle floating-point computing capability SC. When scheduling GPU tasks, two key dimensions, the GPU's single-precision floating-point computing capability FP32 value and the video memory bandwidth, are considered comprehensively. In order to quantify this performance, the GPU node score SG is defined, and its calculation method is shown in the following formula: S G =P×w1+B×w2, where: P Represents the FP32 value of the node GPU card; B is the memory bandwidth of the node GPU; w 1 , w 2 Take 0.6 and 0.4 respectively. S G The larger the value, the better the GPU node performance.

[0061] In addition, define the task application resource vector R , used to represent the resource combination required for the task, expressed as the following formula: R=(x1,x2,x3,x4), where x 1. x 2. x 3. x 4 respectively represent the number of CPU cores, memory size, number of GPU cards, and GPU memory required. At the same time, define the available resource vector of the computing node A , which is used to describe the current available resource status of the node, and is expressed as follows: A=(y1,y2,y3,y4), where y 1. y 2. y 3. y 4 respectively represent the number of CPU cores, memory size, number of GPU cards, and number of GPU memory available on the node. In order to measure the similarity between the task application resource vector and the computing node available resource vector, this study uses the cosine similarity method. This similarity index is recorded as Similarity , which is calculated as: Through this similarity measurement, tasks can be scheduled to nodes with relatively less available resources first, thereby effectively avoiding resource fragmentation and ensuring that the remaining resources can fully meet the scheduling needs of subsequent tasks. The final node score calculation method is Score=S× Similarity ,in,S Represents the performance level of the computing resource itself. When applying for CPU resources, S Corresponding to S C , when applying for GPU resources, S Corresponding to S G .

[0062] In summary, the model integration method proposed in the present invention breaks through the conventional model process integration framework. Its key innovation lies in using Docker containers as the basic carrier of the model rather than traditional pre-deployed functions, interfaces or Web services.

[0063] The application process of the present invention has no dependency on model granularity parallel control, and tasks that can be executed in parallel are distributed to multiple computing nodes and multiple processors for simultaneous execution, which can effectively utilize computing resources and significantly improve the execution efficiency of the application integration process, thereby shortening the computing cycle.

[0064] The present invention reduces unnecessary task scheduling, avoids repeated generation of existing output data, effectively saves computing resources and time costs, improves the execution efficiency of the entire workflow, and reduces the redundancy of data storage.

[0065] The present invention takes into account the differences in computing resource performance of different nodes and the specific requirements of different models for mixed types of computing resources. The final node score calculation combines the performance level of the computing resource itself and its degree of fit with the applied resources.

[0066] Compared with the prior art, the present invention has the following beneficial effects:

[0067] (1) The model of the present invention integrates intermediate data caching and execution process recording to facilitate task tracking.

[0068] (2) The present invention supports the integrated application of customized models.

[0069] (3) The model resource description method of the present invention natively supports the description of executable programs and execution environments.

[0070] (4) The present invention implements model management based on container images, emphasizing the management of the model algorithm itself.

[0071] (5) The present invention adopts a distributed task scheduling method to enable tasks of model granularity to be dispatched to computing nodes with better performance and higher resource matching, which is particularly suitable for the execution of large-scale scientific computing tasks.

[0072] However, the prior art has the following defects:

[0073] (1) Systems such as model repositories and version control systems usually focus on code management and are not direct enough in recording, tracking, and versioning model data and operating status.

[0074] (2) Model lifecycle management tools may not be fully applicable to all types of scientific computing models, especially those that are highly customized or involve simulation of complex physical processes.

[0075] (3) Model registration and metadata management have limited ability to provide detailed descriptions of model internal details and operating environment requirements, and may require additional tool chain support.

[0076] (4) Model services and API management emphasize the management of models after they are transformed into services, but lack support for the internal management and maintenance of the models themselves.

[0077] (5) Centralized Scheduling System For large-scale concurrent requests or fine-grained resource allocation in heterogeneous resource environments, traditional centralized scheduling may face performance bottlenecks and is not easy to adapt to the complex dependencies between models and dynamically changing resource requirements.

[0078] (6) When a distributed computing framework is faced with a large number of small tasks or extremely fine-grained tasks, the scheduling overhead may be large; in addition, the support and optimization of scientific computing models in specific fields may be insufficient.

[0079] (7) The differences and interoperability issues of hybrid cloud and cross-platform resources, as well as network latency, may affect scheduling efficiency and model execution effects.

[0080] The present invention also provides a model management and scheduling device based on cloud native deployment, including a memory, a control processor, and a computer program stored in the memory and executable on the control processor, wherein the control processor executes the program to implement the aforementioned model management and scheduling method based on cloud native deployment.

[0081] The present invention also provides a control system, including the aforementioned model management and scheduling device based on cloud native deployment.

[0082] The present invention also provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to implement the aforementioned model management and scheduling method based on cloud-native deployment.

[0083] Although the above methods are illustrated and described as a series of actions for simplicity of explanation, it should be understood and appreciated that these methods are not limited by the order of the actions, because according to one or more embodiments, some actions may occur in different orders and / or concurrently with other actions from the illustrations and descriptions herein or not illustrated and described herein but understandable to those skilled in the art. It will be further appreciated by those skilled in the art that the various illustrative logic blocks, modules, circuits, and algorithm steps described in conjunction with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or a combination of the two. To clearly explain this interchangeability of hardware and software, various illustrative components, frames, modules, circuits, and steps are generally described in the form of their functionality above. Whether such functionality is implemented as hardware or software depends on the specific application and the design constraints imposed on the overall system. The technical staff can implement the described functionality in different ways for each specific application, but such implementation decisions should not be interpreted as resulting in a departure from the scope of the present invention. The various illustrative logic blocks, modules, and circuits described in conjunction with the embodiments disclosed herein may be implemented or executed with a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general purpose processor may be a microprocessor, but in an alternative, the processor may be any conventional processor, a battery compartment control board, a micro-battery compartment control board, or a state machine. The processor may also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors in cooperation with a DSP core, or any other such configuration. The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read and write information from / to the storage medium. In an alternative, the storage medium may be integrated into the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In an alternative, the processor and the storage medium may reside in a user terminal as discrete components. In one or more exemplary embodiments, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented as a computer program product in software, each function may be stored on a computer-readable medium or transmitted therefrom as one or more instructions or codes.Computer-readable media include both computer storage media and communication media, including any media that facilitates a computer program to be transferred from one place to another. Storage media can be any available media that can be accessed by a computer. As an example and not limitation, such computer-readable media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage devices, or any other media that can be used to carry or store the agreed program code in the form of instructions or data structures and can be accessed by a computer. Any connection is also properly referred to as computer-readable media. For example, if software is transmitted from a web site, a central control computer, or other remote sources using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwaves, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwaves are included in the definition of medium. Disk and disc as used herein include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, wherein disk often reproduces data magnetically, while disc reproduces data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0084] Although the above methods are illustrated and described as a series of actions for simplicity of explanation, it should be understood and appreciated that these methods are not limited by the order of the actions, because according to one or more embodiments, some actions may occur in a different order and / or concurrently with other actions from those illustrated and described herein or not illustrated and described herein but understandable to those skilled in the art.

[0085] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A model management and scheduling method based on cloud native deployment, It is characterized in that in, The model management method includes model packaging steps, model resource description steps, and model application integration steps; The model packaging step includes preparing the model directory and building the image; The model resource description step includes establishing a multi-label dynamic classification method and converting the resource attributes of the model into structured data in a relational database; The model application integration step uses a directed acyclic graph to model the model application integration; The model scheduling method includes the model application process analysis and control steps, the scheduling optimization step based on the matching of predecessor tasks, and the task mixed scheduling step based on multi-dimensional heterogeneous resource perception. Among them, the model application process analysis and control steps analyze the model integration task process dependencies to achieve task decomposition, control and scheduling; The scheduling optimization step based on predecessor task matching is that during the execution of the task flow, the input data path, output data path and model image of each model task will be recorded in detail, compared and matched or scheduled; The steps of multi-dimensional heterogeneous resource-aware task hybrid scheduling are to select nodes based on the specific resource requirements of different model tasks when building model resources; The model resource description steps are as follows: establish a multi-label dynamic classification method, allow the model to have multiple labels, and dynamically add new types or attributes as the model library expands and the research deepens; secondly, use the YAML language to express the resource attributes of the model, and convert the resource attributes described in the YAML format into structured data in a relational database; The specific steps of multi-dimensional heterogeneous resource-aware task hybrid scheduling are as follows: first, when building model resources, for the resource types required by different model tasks, clearly identify whether they belong to the CPU type or GPU type, and screen the nodes according to the specific resource requirements of the model task, such as the number of CPU cores, memory size, number of GPU cards, and video memory size. From the perspective of resource quantity, those nodes that cannot meet the task requirements are excluded, and the remaining nodes are added to the available node list available_nodes. According to the task type, the available nodes are screened again. When scheduling GPU tasks, the two key dimensions of the GPU's single-precision floating-point computing capability FP32 value and video memory bandwidth are comprehensively considered. In order to quantify this performance, the GPU node score S is defined. G , the calculation method is as follows: S G =P×w 1 +B×w 2, Where: P represents the FP32 value of the node GPU card; B is the memory bandwidth of the node GPU; w 1 、w 2 Take 0.6 and 0.4 respectively; S G The larger the value, the better the performance of the GPU node. Define the task application resource vector R to represent the resource combination required for the task, which is expressed as follows: R=(x 1 ,x 2 ,x 3 ,x 4 ), where x 1 、x 2 、x 3 、x 4 They represent the number of CPU cores, memory size, number of GPU cards, and GPU memory respectively; define the available resource vector A of the computing node to characterize the current available resource status of the node, which is expressed as follows: A=(y 1 ,y 2 ,y 3 ,y 4 ), where y 1 ,y 2 ,y 3 ,y 4 They represent the number of CPU cores, memory size, number of GPU cards, and number of GPU memory available on the node. In order to measure the similarity between the task application resource vector and the computing node available resource vector, the cosine similarity method is used. This similarity index is recorded as Similarity, and its calculation method is: , R is the task application resource vector, A is the computing node available resource vector, and the final node score calculation method is Score = S × Similarity, where S represents the performance level of the computing resource itself. When applying for CPU resources, S corresponds to S C , when applying for GPU resources, S corresponds to S G The secondary screening rules are as follows: for CPU tasks that can be scheduled to the GPU, they can be considered for scheduling to CPU nodes or GPU nodes, depending on the subsequent scoring results; for other types of CPU tasks, they can only be scheduled to CPU nodes. GPU nodes are excluded from available_nodes in the pre-selection stage to avoid the potential problem that GPU nodes cannot be scheduled to GPU tasks because CPU and memory resources are occupied.

2. According to the model management and scheduling method based on cloud native deployment according to claim 1, It is characterized in that The model packaging steps include preparing the model directory and writing the Dockerfile, building the image, and hosting the image.

3. According to the model management and scheduling method based on cloud native deployment according to claim 2, It is characterized in that The specific steps of model application integration are as follows: using a directed acyclic graph to model the model application integration, using a binary pair T = (V, E) to represent the susceptibility prediction task workflow, where V = {v 1 , v 2 , … v n } represents the set of all model tasks in the workflow. v i = {image_url, argument_list} records the image URL of the corresponding task and the instance file path parameter table of the input / output item; E = {(v i , v j ), v i , v j ∈V} represents the dependency relationship between tasks, such as (v i , v j ) indicates v j Must wait for v i It can be executed only after the execution is completed; in accordance with the preset application integration process definition, the system strictly executes according to the order and dependency logic between task nodes to ensure the orderly progress of tasks at each node. Before execution, the images corresponding to each task have been pre-stored in the image warehouse in the model library. When the task starts, the system automatically obtains the specified image based on the image_url and dynamically injects the input and output parameter table. Subsequently, these images are scheduled to the computing node, and Pod and container instances are created. The container loads the necessary input data based on the parameter table. After executing the calculation, the result is written to the output path indicated by the parameter table.

4. A model management and scheduling method based on cloud native deployment according to any one of claims 1 to 3, It is characterized in that The specific steps of model application process analysis and control are as follows: analyze the dependency relationship of model integration task process, realize task decomposition, control and scheduling, dynamically control the parallel execution of independent tasks, input task process structure task_graph, establish scheduling queue scheduling_queue, initialize it to empty; establish scheduled task set scheduled_tasks, initialize it to empty; define asynchronous scheduling and execute parallel task function scheduling, execute in function: when the scheduling queue is not empty, asynchronously and parallelly schedule each task in the scheduling queue, and update the scheduled tasks to scheduled_tasks; define asynchronous task status update function update, execute in function: when scheduled_tasks is not empty, traverse each task in scheduled_tasks to determine whether the traversed tasks have been completed If the traversed task has been completed, update the task status in task_graph; define the function main that asynchronously adds executable tasks to the scheduling queue, and execute in a loop: traverse each task in task_graph, if the task has no predecessor task or the predecessor tasks have been completed, add the task to scheduling_queue, if the tail task is completed, end the function loop and jump out. The algorithm process includes three asynchronous functions: main, scheduling, and update. Main is responsible for scheduling tasks that have no predecessor tasks or whose predecessor tasks have been completed to the scheduling queue; the scheduling function schedules the tasks in the scheduling queue in parallel as Pods and executes them asynchronously, and adds the scheduled tasks to the scheduled task set. The update function updates the task status in the task flow structure in real time according to the scheduled task set.

5. According to the model management and scheduling method based on cloud native deployment according to claim 4, It is characterized in that The specific steps of scheduling optimization based on predecessor task matching are as follows: during the execution of the task flow, the input data path, output data path and model image of each model task will be recorded in detail in the historical record cache bufferSet. Before scheduling any model task, the system will retrieve all its predecessor tasks, and then compare these predecessor tasks one by one in bufferSet to see if there are complete matching records. If all predecessor tasks have corresponding matching items, the task is determined to be completed and the existing results can be reused directly without rescheduling; otherwise, the system will schedule and execute the task normally, and update bufferSet when completed.

6. A model management and scheduling device based on cloud native deployment, It is characterized in that It includes a memory, a control processor, and a computer program stored in the memory and executable on the control processor, wherein the control processor executes the program to implement the model management and scheduling method based on cloud native deployment as described in any one of claims 1 to 5.

7. A control system, It is characterized in that Including the model management and scheduling device based on cloud native deployment as described in claim 6.

8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to implement the model management and scheduling method based on cloud-native deployment as described in any one of claims 1-5.