Task execution method, device and system based on multiple container arrangement clusters

By adopting multiple container orchestration clusters in the task execution system, the problem of limited resources of a single container orchestration cluster is solved, and more efficient and reliable task execution performance is achieved.

CN119512688AActive Publication Date: 2025-02-25TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411548946.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-02-25
Estimated Expiration
2044-10-30

AI Technical Summary

Technical Problem

In massive task scenarios, due to the limited work nodes in a single container orchestration cluster, resources such as CPU and memory are limited, which limits the task execution performance of the task execution system, resulting in low task execution efficiency and reliability.

Method used

The task execution method based on multiple container orchestration clusters is adopted. By obtaining task execution requests, classifying instructions to be run, selecting target container orchestration clusters and work nodes, and creating and running execution units in the target container orchestration cluster to improve resource utilization.

Benefits of technology

By increasing the number of work nodes, the limitations of resources such as CPU and memory are broken, the task execution performance of the task execution system is improved, and the task execution efficiency and reliability are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512688A_ABST
    Figure CN119512688A_ABST
Patent Text Reader

Abstract

The invention provides a task execution method, device and system based on a plurality of container arrangement clusters, and relates to the computer technology, the method comprises the following steps: obtaining a plurality of task execution requests; each task execution request comprises a mirror image file, indication information and a to-be-run instruction; classifying the to-be-run instruction based on the mirror image file and the indication information; selecting a to-be-run instruction of a target category, and selecting a target container arrangement cluster and a target working node for the to-be-run instruction of the target category; sending a mirror image file and indication information corresponding to the to-be-run instruction of the target category to a target container arrangement cluster, so that the target container arrangement cluster creates a target execution unit on a target working node based on the mirror image file and the indication information; and injecting the to-be-run instruction of the target category into the execution unit to enable the execution unit to run the to-be-run instruction of the category. Therefore, the task execution performance of the task execution system is improved, and the task execution efficiency and reliability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a method, device, and system for executing tasks based on multiple container orchestration clusters. Background Art

[0002] The container orchestration cluster is an open source system for automating the deployment, expansion and management of containerized applications, allowing developers to easily deploy, run and maintain applications in the cluster. The container orchestration cluster has the ability to automatically scale up and down. The automatic scaling capability means that the container orchestration cluster can dynamically adjust the number of execution units in the container orchestration cluster, the central processing unit (CPU) and memory of the execution unit according to the load requirements of the application to cope with traffic fluctuations. The task execution system based on the container orchestration cluster makes use of the automatic scaling capability of the container orchestration cluster to dynamically allocate resources, such as CPU and memory, to tasks and then execute tasks.

[0003] The task execution systems provided by the related technologies are all task execution systems based on single container orchestration clusters, and they adopt task execution methods based on single container orchestration clusters. However, in the scenario of massive tasks, due to the limited number of working nodes in the single container orchestration cluster, resources such as CPU and memory are limited, which limits the task execution performance of the task execution system, resulting in low task execution efficiency and reliability. Summary of the invention

[0004] The present application provides a task execution method, device and system based on multiple container orchestration clusters, thereby improving the task execution performance of the task execution system, and improving the task execution efficiency and reliability.

[0005] In a first aspect, an embodiment of the present application provides a task execution method based on multiple container orchestration clusters, comprising: obtaining multiple task execution requests; wherein each task execution request comprises: an image file of an application program for executing the corresponding task to be executed, indication information for indicating a data set to be executed associated with the task to be executed, and instructions to be run associated with the task to be executed; based on the image files and indication information respectively included in the multiple task execution requests, classifying the instructions to be run respectively included in the multiple task execution requests; selecting instructions to be run of a target category, and for the instructions to be run of the target category, selecting a target container orchestration cluster from multiple container orchestration clusters, and selecting a target working node in the target container orchestration cluster; sending the image file and indication information corresponding to the instructions to be run of the target category to the target container orchestration cluster, so that the target container orchestration cluster creates a target execution unit on the target working node based on the image file and indication information corresponding to the instructions to be run of the target category; injecting the instructions to be run of the target category into the target execution unit, so that the target execution unit runs the instructions to be run of the target category.

[0006] In a second aspect, an embodiment of the present application provides a task execution system based on multiple container orchestration clusters, comprising: a master node and multiple container orchestration clusters; wherein the master node is used to: obtain multiple task execution requests; wherein each task execution request comprises: an image file of an application program for executing the corresponding task to be executed, indication information for indicating a data set to be executed associated with the task to be executed, and instructions to be run associated with the task to be executed; based on the image files and indication information respectively included in the multiple task execution requests, the instructions to be run respectively included in the multiple task execution requests are classified; instructions to be run of a target category are selected, and for the instructions to be run of the target category, a target container orchestration cluster is selected from multiple container orchestration clusters, and a target working node is selected in the target container orchestration cluster; the image file and indication information corresponding to the instructions to be run of the target category are sent to the target container orchestration cluster, so that the target container orchestration cluster creates a target execution unit on the target working node based on the image file and indication information corresponding to the instructions to be run of the target category; the instructions to be run of the target category are injected into the target execution unit, so that the target execution unit runs the instructions to be run of the target category.

[0007] In a third aspect, an embodiment of the present application provides a task execution device based on multiple container orchestration clusters, including: an acquisition module, a classification module, a selection module, a sending module and an injection module; wherein the acquisition module is used to acquire multiple task execution requests; wherein each task execution request includes: an image file of an application program for executing the corresponding task to be executed, indication information for indicating a data set to be executed associated with the task to be executed, and instructions to be run associated with the task to be executed; the classification module is used to classify the instructions to be run included in each of the multiple task execution requests based on the image files and indication information included in each of the multiple task execution requests; the selection module is used to select instructions to be run of a target category, and for the instructions to be run of the target category, select a target container orchestration cluster from multiple container orchestration clusters, and select a target working node in the target container orchestration cluster; the sending module is used to send the image file and indication information corresponding to the instructions to be run of the target category to the target container orchestration cluster, so that the target container orchestration cluster creates a target execution unit on the target working node based on the image file and indication information corresponding to the instructions to be run of the target category; the injection module is used to inject the instructions to be run of the target category into the target execution unit, so that the target execution unit runs the instructions to be run of the target category.

[0008] In some implementations, the acquisition module is further used to: after the injection module injects the target category of to-be-run instructions into the target execution unit so that the target execution unit runs the target category of to-be-run instructions, acquire the task execution result of each task associated with the target category of to-be-run instructions.

[0009] In some possible implementations, the acquisition module is specifically used to: receive the task execution result of each task associated with the to-be-run instruction of the target category sent by the second controller in the target container orchestration cluster; wherein the second controller obtains the task execution result of each task associated with the to-be-run instruction of the target category from the hook component in the target container orchestration cluster.

[0010] In some possible implementations, the task execution device also includes: a trigger module, which is used to trigger the target container orchestration cluster to migrate the target task to other execution units after the acquisition module obtains the task execution result of each task associated with the to-be-run instruction of the target category, if the task execution result of the target task is an execution exception.

[0011] In some possible implementations, the trigger module is further used to: after the acquisition module obtains the task execution result of each task associated with the to-be-run instruction of the target category, if the task execution result of the target task is an execution exception and the target task meets a preset condition; then trigger the target container orchestration cluster to migrate the target task to other execution units.

[0012] In some possible implementations, after the acquisition module acquires the task execution result of each task associated with the to-be-run instructions of the target category, the selection module is further used to, if the task execution result of the target task is an execution exception, reselect a container orchestration cluster from multiple container orchestration clusters for the target task, and reselect a working node in the reselected container orchestration cluster; the sending module is further used to send the image file and instruction information corresponding to the target task to the reselected container orchestration cluster, so that the reselected container orchestration cluster rebuilds the execution unit on the reselected working node based on the image file and instruction information corresponding to the target task; the injection module is further used to inject the to-be-run instructions of the target task into the rebuilt execution unit, so that the rebuilt execution unit runs the to-be-run instructions of the target task.

[0013] In some possible implementations, after the acquisition module acquires the task execution result of each task associated with the to-be-run instructions of the target category, if the task execution result of the target task is an execution exception and the target task meets a preset condition; the selection module is also used to reselect a container orchestration cluster from multiple container orchestration clusters for the target task, and reselect a working node in the reselected container orchestration cluster; the sending module is also used to send the image file and instruction information corresponding to the target task to the reselected container orchestration cluster, so that the reselected container orchestration cluster rebuilds the execution unit on the reselected working node based on the image file and instruction information corresponding to the target task; the injection module is also used to inject the to-be-run instructions of the target task into the rebuilt execution unit, so that the rebuilt execution unit runs the to-be-run instructions of the target task.

[0014] In some possible implementations, the preset condition includes any one of the following:

[0015] The number of times the target task is run on the target execution unit is greater than or equal to the preset number;

[0016] The running time of the target task on the target execution unit is greater than or equal to the first preset time;

[0017] The running time of the target task on the target execution unit is less than or equal to the second preset time;

[0018] Insufficient software resources of the target execution unit;

[0019] Insufficient hardware resources of the target execution unit.

[0020] In some possible implementations, the selection module is specifically used to: obtain characteristic information of each of the multiple container orchestration clusters; and select a target container orchestration cluster from the multiple container orchestration clusters based on the characteristic information of each of the multiple container orchestration clusters for the target category of instructions to be run.

[0021] In some implementations, the characteristic information of each container orchestration cluster includes at least one of the following: price information of the container orchestration cluster; and priority information of the container orchestration cluster.

[0022] In some possible implementations, the acquisition module is specifically configured to: acquire characteristic information of each of the multiple container orchestration clusters through a persistent connection with each of the API service components in the multiple container orchestration clusters.

[0023] In some possible implementations, the selection module is specifically used to: obtain feature information of each working node in the target container orchestration cluster; and select a target working node in the target container orchestration cluster based on the feature information of each working node for the target category of instructions to be executed.

[0024] In some implementations, the characteristic information of each working node in the target container orchestration cluster includes at least one of the following: the number of CPUs of the working node; and the available memory size of the working node.

[0025] In some possible implementations, the acquisition module is specifically used to: acquire characteristic information of each working node through a long connection with an API service component in a target container orchestration cluster.

[0026] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory, the memory being used to store a computer program, the processor being used to call and run the computer program stored in the memory, and executing the method in the first aspect or its various implementations.

[0027] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium for storing a computer program, wherein the computer program enables a computer to execute a method as in the first aspect or its various implementations.

[0028] In a sixth aspect, an embodiment of the present application provides a computer program product, comprising computer program instructions, which enable a computer to execute a method as in the first aspect or its various implementations.

[0029] In a seventh aspect, an embodiment of the present application provides a computer program, which enables a computer to execute the method in the first aspect or its various implementations.

[0030] Through the technical solution provided by this application, since multiple container orchestration clusters include more working nodes, the limitations of resources such as CPU and memory are broken, the task execution performance of the task execution system is improved, and the task execution efficiency and reliability are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0032] Figure 1 This is a schematic diagram of a kubernetes cluster;

[0033] Figure 2 This is a diagram of nginx service deployment based on kubernetes cluster;

[0034] Figure 3 A schematic diagram of a system architecture involved in an embodiment of the present application;

[0035] Figure 4 A flowchart of a task execution method based on multiple container orchestration clusters provided in an embodiment of the present application;

[0036] Figure 5 A schematic diagram of the correspondence between resources and instructions to be executed provided in an embodiment of the present application;

[0037] Figure 6 A schematic diagram of an execution unit provided in an embodiment of the present application;

[0038] Figure 7 A schematic diagram of obtaining a task execution result provided in an embodiment of the present application;

[0039] Figure 8 A schematic diagram of a to-do list and container orchestration cluster provided in an embodiment of the present application;

[0040] Fig. 9 A schematic diagram of a task execution system 900 based on multiple container orchestration clusters provided in an embodiment of the present application;

[0041] Fig.10 A schematic diagram of a task execution device 1000 based on multiple container orchestration clusters provided in an embodiment of the present application;

[0042] Fig.11 It is a schematic block diagram of an electronic device 1100 provided in an embodiment of the present application. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0044] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0045] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.

[0046] Before introducing the technical solution of this application, the relevant knowledge of this application is first explained below:

[0047] 1. Kubernetes (k8s):

[0048] Kubernetes is an open source system for automating the deployment, scaling, and management of containerized applications, enabling developers to easily deploy, run, and maintain applications in a cluster.

[0049] The kubernetes cluster is mainly composed of a control node (master) and several worker nodes (node), and different components are installed on each node. Among them, the control node (master) is the control plane of the kubernetes cluster, responsible for the decision-making and management of the cluster. The worker node (node) is the data plane of the kubernetes cluster, responsible for providing a running environment for the container.

[0050] Figure 1 This is a schematic diagram of a kubernetes cluster, such as Figure 1 As shown in the figure, the control node (master) includes the following components: API service component (ApiServer, api), scheduling component (Scheduler, sched), controller management component (ControllerManager, cm), cloud-controller management component (Cloud-ControllerManager, ccm), database (Etcd). Each working node (node) includes the following components: container maintenance component (Kubelet), service discovery and load balancing component (KubeProxy, k-proxy).

[0051] Among them, ApiServer is the only entry point for resource operations. It is used to receive commands input by objects and provide mechanisms such as authentication, authorization, and application programming interface (API) registration and discovery.

[0052] Scheduler is responsible for cluster resource scheduling and schedules the execution unit (Pod) to the corresponding working node according to the predetermined scheduling strategy.

[0053] ControllerManager is responsible for maintaining the status of the cluster, such as application deployment scheduling, fault detection, automatic expansion, rolling updates, etc.

[0054] Cloud-ControllerManager is responsible for maintaining the cloud provider's API, including obtaining the to-be-executed data set from the cloud storage through the cloud provider's API.

[0055] Etcd is responsible for storing information about various resource objects in the cluster.

[0056] Among them, Kubelet is responsible for maintaining the life cycle of the container, that is, creating, updating, and destroying the container by controlling the containerization platform (docker). Among them, Docker is mainly responsible for various operations of the container on the working node.

[0057] KubeProxy is responsible for providing service discovery and load balancing within the cluster.

[0058] The following example illustrates the calling relationship between various components in a Kubernetes cluster:

[0059] Figure 2 This is a diagram of nginx service deployment based on kubernetes cluster, such as Figure 2As shown, once the kubernetes environment is started, the control node (master) and the working node (node) will store their own information in the database (Etcd). Then the installation request of the nginx service will be sent to the API service component (ApiServer) of the control node (master). The API service component (ApiServer) will call the scheduling component (Scheduler) to decide on which working node (node) the nginx service should be installed. The scheduling component (Scheduler) can read the information of each working node (node) from the database (Etcd), and then select a working node (node) according to a certain algorithm, and inform the API service component (ApiServer) of the selection result. Furthermore, the API service component (ApiServer) calls the controller management component (ControllerManager) to send information to the selected working node (node), as shown in the figure. Figure 2 The container maintenance component (Kubelet) in the working node 1 sends an instruction for requesting the installation of the nginx service. After receiving the instruction, the container maintenance component (Kubelet) notifies the container platform (docker) in the working node 1, and then the container platform (docker) starts an execution unit (pod) of the nginx service, where the execution unit (pod) is the smallest operation unit of kubernetes. The execution unit (pod) contains one or more containers, which share network and storage resources, so that these containers (containers) run in the execution unit (pod). At this point, the nginx service is running. If the object needs to access the nginx service, it can generate a proxy for access to the execution unit (pod) through the service discovery and load balancing component (KubeProxy) in the working node 1.

[0060] The following is an introduction to the basic concepts of the container platform (docker):

[0061] 1. Containerization technology: The containerization platform (Docker) enables rapid deployment, portability, and scalability of applications by packaging the application and all its dependencies into an independent container. Containerization technology allows applications to run in an independent, closed environment without being affected by the underlying operating system and hardware.

[0062] 2. Image: This is the image file, which is the basis for container operation in the containerization platform (docker). It contains all the file systems, codes and dependencies required to run a container, or in other words, it contains all the content required to run a container: code, environment variables and configuration files, etc.

[0063] 3. Container: A container is a running instance of an image and is an independent, lightweight running environment. Containers are isolated from each other, and each container has its own file system, process space, and network interface.

[0064] 2. Data Volume:

[0065] In the computer field, it usually refers to an independent area on a storage device or storage medium for storing files and data. In virtualized storage or containerization technology, a data volume also refers to a virtual directory or file system for persistent storage of data or data sharing.

[0066] Data volumes have the following characteristics:

[0067] 1. Data volumes can be managed independently from other storage areas and have their own file systems.

[0068] 2. Data in data volumes can be shared between different applications, containers, or systems.

[0069] 3. Data volumes usually support persistent storage of data. Even if the container or application is deleted, the data in the data volume remains.

[0070] 3. List and Watch Mechanism:

[0071] The List and Watch mechanism is a resource monitoring mechanism provided by the API server component (ApiServer) in Kubernetes. It allows clients to obtain resource objects, such as the list of working nodes (node) and execution units (pod) (List) through the API server component (ApiServer), and monitor the changes of resource objects in real time by establishing a long connection (Watch). When a resource object is created, updated, or deleted, the API Server will send an event notification to the client that subscribed to the resource object to achieve real-time synchronization and response of resources.

[0072] 4. Pull mode is a mechanism for data acquisition or message delivery. In this mode, data consumers actively pull data from data producers.

[0073] The following is an explanation of the technical problems, inventive concepts and system architecture to be solved by the embodiments of the present application:

[0074] As mentioned above, the task execution systems provided by the related technologies are all task execution systems based on a single container orchestration cluster, and they adopt a task execution method based on a single container orchestration cluster. However, in a massive task scenario, due to the limited number of working nodes in a single container orchestration cluster, resources such as CPU and memory are limited, which limits the task execution performance of the task execution system, resulting in low task execution efficiency and reliability.

[0075] In order to solve the above technical problems, the present application proposes a task execution method based on multiple container orchestration clusters. Since multiple container orchestration clusters include more working nodes, the limitations of resources such as CPU and memory are broken, the task execution performance of the task execution system is improved, and the task execution efficiency and reliability are improved.

[0076] In some possible implementations, the system architecture of the embodiment of the present application is as follows: Figure 3 shown.

[0077] Figure 3 This is a schematic diagram of a system architecture involved in an embodiment of the present application. The system architecture involves network elements: a terminal device 310 and a background server 310, wherein the background server 310 includes: a master node 3101 and multiple container orchestration clusters 3102. The terminal device 310 and the background server 310 can be directly or indirectly connected via wired or wireless communication, and the master node 3101 and multiple container orchestration clusters 3102 can be directly or indirectly connected via wireless communication. This application does not impose any restrictions on this.

[0078] In some possible implementations, the terminal device 310 may be installed with a task execution client, through which the object may send a task execution request to the master node 310; wherein each task execution request includes: an image file of an application program corresponding to the task to be executed, indication information for indicating a data set to be executed associated with the task to be executed, and instructions to be run associated with the task to be executed.

[0079] It should be understood that the task execution client refers to a client used to implement task execution. For example, the client is mainly used to send a task execution request to the master node 310.

[0080] The terminal device 310 is often equipped with a display device to obtain a task execution request input by an object and to display a task execution result.

[0081] It should be understood that a display device is also referred to as a display, a display screen, a touch screen, etc., and a touch screen is also referred to as a touch screen, a touch panel, etc.

[0082] In some implementations, the terminal device 310 may be a desktop computer, a laptop computer, a PDA, a tablet computer, a smart phone, a smart watch, virtual reality (VR), augmented reality (AR), etc., but is not limited thereto.

[0083] In some possible implementations, the backend server 310 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and artificial intelligence platforms.

[0084] In some implementations, the master node 3101 and the multiple container orchestration clusters 3102 may be physical units or logical units in the background server 310, respectively, but are not limited thereto. For example, the master node 3101 may be a service (server) module in the background server 310. For another example, assuming that the background server 310 is a server cluster, the master node 3101 may be a physical device in the server cluster, and each container orchestration cluster 3102 may be a partial server cluster in the server cluster.

[0085] The master node 3101 may obtain multiple task execution requests; each task execution request includes: an image file of an application program for executing the corresponding task to be executed, indication information for indicating a data set to be executed associated with the task to be executed, and instructions to be run associated with the task to be executed; the master node 3101 classifies the instructions to be run included in each of the multiple task execution requests based on the image files and indication information included in each of the multiple task execution requests; the master node 3101 selects instructions to be run of a target category, and for the instructions to be run of the target category, selects a target container orchestration cluster from multiple container orchestration clusters 3102, and selects a target working node in the target container orchestration cluster; the master node 3101 sends the image file and indication information corresponding to the instructions to be run of the target category to the target container orchestration cluster, so that the target container orchestration cluster creates a target execution unit on the target working node based on the image file and indication information corresponding to the instructions to be run of the target category; the master node 3101 injects the instructions to be run of the target category into the target execution unit, so that the target execution unit runs the instructions to be run of the target category.

[0086] In some implementations, the data set to be executed may be stored in a database, so that the container orchestration cluster 3102 obtains the data set to be executed from the database through the indication information.

[0087] It should be noted that Figure 3 This is only a schematic diagram of a system architecture provided in the embodiment of the present application. The system architecture involved in the embodiment of the present application is not limited to Figure 3 The system architecture shown, for example, Figure 3 The system architecture shown includes only one terminal device 310. In practice, it may include multiple terminal devices 310. Figure 3 Based on the system architecture shown, the system architecture involved in the embodiment of the present application may also include: other network elements, etc.

[0088] The technical solution of this application will be described in detail below:

[0089] Figure 4 A flowchart of a task execution method based on multiple container orchestration clusters provided in an embodiment of the present application, the method can be executed by a master node in a background server, the master node can be Figure 3 The master node 3101 in, but not limited to, such as Figure 4 As shown, the method may include:

[0090] S410: Acquire multiple task execution requests; wherein each task execution request includes: an image file of an application program for executing a corresponding task to be executed, indication information for indicating a data set to be executed associated with the task to be executed, and instructions to be run associated with the task to be executed;

[0091] It should be understood that each task execution request is used to request the execution of a task to be executed. For example, in the field of artificial intelligence (AI) + medicine, a task execution request is used to request the calculation of the IC50 value of a drug formula. IC50 refers to the concentration required for a drug or substance (inhibitor) to inhibit half of a certain biological process (or certain substances contained in this process, such as enzymes, cell receptors or microorganisms).

[0092] It should be understood that the application used to execute the corresponding task to be executed may be one or more applications. For example, a task execution request is used to request the calculation of the IC50 value of a drug formula, and the application used to execute the corresponding task to be executed may include: an application for calculating the 3D structure of the drug formula, and an application for calculating the IC50 value of the drug formula based on the 3D structure of the drug.

[0093] In some implementations, the indication information for indicating the to-be-executed data set associated with the to-be-executed task may include at least one of the following, but is not limited to: an identifier, a storage path, etc. of the to-be-executed data set.

[0094] It should be understood that the to-be-executed data set associated with the to-be-executed task refers to the data set to which the to-be-executed data associated with the to-be-executed task belongs. For example, a task execution request is used to request the calculation of the IC50 value of a drug molecular formula. Then the to-be-executed data may include: the drug molecular formula and the 3D structure corresponding to the drug molecular formula, and the associated to-be-executed data set is the data set including the drug molecular formula and the 3D structure corresponding to the drug molecular formula.

[0095] In some implementations, the to-be-executed data set may be stored in a data volume, but is not limited thereto.

[0096] It should be understood that the to-be-executed instructions associated with the to-be-executed task are used to instruct the selection of an application (or tool) in the image file of the application of the to-be-executed task, and the corresponding to-be-executed data is processed by the selected application. The number of the to-be-executed instructions associated with the to-be-executed task may be one or more.

[0097] For example, a task execution request is used to request the calculation of the IC50 value of a drug molecular formula, which is associated with two instructions to be run, wherein one instruction to be run is used to indicate the selection of an application for calculating the 3D structure of the drug molecular formula in the image file of the application for the task to be executed, and the drug molecular formula A is processed by the selected application. Based on this, the application for calculating the 3D structure of the drug molecular formula can be selected in the image file of the application for the task to be executed based on the instruction to be run, and the drug molecular formula A is processed by the application to obtain the 3D structure of the drug molecular formula A. The other instruction to be run is used to indicate the selection of an application for calculating the IC50 value in the image file of the application for the task to be executed, and the 3D structure of the drug molecular formula A is processed by the application. Based on this, the application for calculating the IC50 value can be selected in the image file of the application for the task to be executed based on the instruction to be run, and the 3D structure of the drug molecular formula A is processed by the application to obtain the IC50 value of the drug molecular formula A.

[0098] S420: Classifying the to-be-executed instructions included in each of the multiple task execution requests based on the image files and instruction information included in each of the multiple task execution requests;

[0099] In some implementations, based on the image files and indication information respectively included in the multiple task execution requests, the instructions to be executed included in the multiple task execution requests are classified, including: classifying the instructions to be executed corresponding to the same image file and the same indication information into one category.

[0100] It should be understood that if the image file and instruction information contained in any two task execution requests are the same, it means that the tasks to be executed associated with the two task execution requests can be executed by the same execution unit, which means that the instructions to be run contained in the two task execution requests can be executed by the same execution unit.

[0101] For example, a task execution request is used to request the calculation of the IC50 value of drug formula A, and another task execution request is used to request the calculation of the IC50 value of drug formula B. Among them, the image files contained in these two task execution requests include: the image file of the application used to calculate the 3D structure of the drug formula and the image file of the application used to calculate the IC50 value. In addition, the indication information contained in the two task execution requests is used to indicate the same data set to be executed, wherein the data set to be executed stores drug formula A, the 3D structure corresponding to drug formula A, drug formula B, and the 3D structure corresponding to drug formula B. Based on this, the master node can classify the instructions to be run contained in the two task execution requests into one category.

[0102] In some possible implementations, based on the image files and indication information respectively included in the multiple task execution requests, the instructions to be run included in the multiple task execution requests are classified, including: the image files respectively included in the multiple task execution requests have a degree of similarity greater than a preset value and the instructions to be run corresponding to the same indication information are classified into one category.

[0103] In some implementations, the preset value may be 70%, 80%, 90%, etc., but is not limited thereto.

[0104] It should be understood that if the degree of similarity of the image files contained in any two task execution requests is greater than the preset value and the indication information is the same, it means that the to-be-executed task pages associated with the two task execution requests can be executed by the same execution unit, but for any task execution request, there will be some redundant image files in the execution unit, that is, when executing the to-be-executed tasks associated with the task execution request, some image files will not be used. Based on this, in order to reduce the redundancy of the image files, the above-mentioned preset value is set in an embodiment of the present application.

[0105] It should be understood that the embodiments of the present application do not limit the classification method of the instructions to be executed.

[0106] It should be understood that, according to the classification method of the instructions to be run, each category of the instructions to be run corresponds to a unique set of image files and data sets to be executed. Assuming that each set of image files and data sets to be executed is called a set of resources, then Figure 5 As shown, each category of instructions to be executed corresponds to a unique set of resources.

[0107] S430: Selecting instructions to be run of a target category, and for the instructions to be run of the target category, selecting a target container orchestration cluster from multiple container orchestration clusters, and selecting a target working node in the target container orchestration cluster;

[0108] It should be understood that the target category of instructions to be executed refers to the category of instructions to be executed selected by the master node.

[0109] In the embodiment of the present application, the master node may select the target category of instructions to be executed in any of the following achievable ways, but is not limited thereto:

[0110] In some implementations, if all categories of to-be-executed instructions are stored in a queue, the master node selects a category of to-be-executed instructions from the queue according to a first-in-first-out principle, and the to-be-executed instructions of this category are referred to as the target category of to-be-executed instructions.

[0111] For example, assuming that the current queue stores category 1, category 2, and category N instructions to be executed from the head to the tail, the master node can select the category 1 instruction to be executed at the head of the queue as the target category's instruction to be executed.

[0112] In some implementations, the master node may randomly select one category of instructions to be executed from all categories of instructions to be executed, and refer to the instructions to be executed in this category as instructions to be executed in the target category.

[0113] For example, assuming that there are instructions to be run in category 1, instructions to be run in category 2... instructions to be run in category N, then the master node can randomly select one category of instructions to be run from these categories of instructions to be run. Suppose the master node randomly selects instructions to be run in category 2, then the master node can use the instructions to be run in category 2 as the target category of instructions to be run.

[0114] In some implementations, the master node may select a to-be-executed instruction with the largest category index from all categories of to-be-executed instructions, and refer to the to-be-executed instructions of this category as to-be-executed instructions of the target category.

[0115] For example, assuming there are pending instructions of category 1, pending instructions of category 2, and ... pending instructions of category N, the master node may select pending instructions of category N from among the pending instructions of these categories and use them as pending instructions of the target category.

[0116] In some implementations, the master node may select a to-be-executed instruction with the smallest category index from all categories of to-be-executed instructions, and refer to the to-be-executed instructions of this category as to-be-executed instructions of the target category.

[0117] For example, assuming there are pending instructions of category 1, pending instructions of category 2, and ... pending instructions of category N, the master node may select pending instructions of category 1 from among the pending instructions of these categories and use them as pending instructions of the target category.

[0118] It should be understood that a container orchestration cluster is an open source system for automating the deployment, scaling, and management of containerized applications, enabling developers to easily deploy, run, and maintain applications in a cluster.

[0119] In some implementations, each of the multiple container orchestration clusters may be Kubernetes, Docker Swarm, Apache Mesos, Karmada, or other container orchestration clusters having similar functions to these container orchestration clusters, which is not limited in this embodiment of the present application.

[0120] In the embodiment of the present application, the master node may select a target container orchestration cluster from multiple container orchestration clusters for instructions to be executed of the target category in any of the following achievable ways, but is not limited thereto:

[0121] In some possible implementations, for instructions to be run in a target category, the master node selects a target container orchestration cluster from multiple container orchestration clusters, including: the master node obtains characteristic information of each of the multiple container orchestration clusters; and for instructions to be run in the target category, based on the characteristic information of each of the multiple container orchestration clusters, selects the target container orchestration cluster from the multiple container orchestration clusters.

[0122] In some implementations, the characteristic information of each container orchestration cluster includes at least one of the following, but is not limited to: price information of the container orchestration cluster; priority information of the container orchestration cluster.

[0123] In some achievable embodiments, if the characteristic information of each container orchestration cluster includes: price information of the container orchestration cluster, the master node selects a target container orchestration cluster from multiple container orchestration clusters for instructions to be run in a target category based on the respective characteristic information of the multiple container orchestration clusters, including: the master node selects a container orchestration cluster with the lowest price from multiple container orchestration clusters for the instructions to be run in the target category, and uses the container orchestration cluster as the target container orchestration cluster.

[0124] For example, suppose there are three container orchestration clusters, namely container orchestration cluster A, container orchestration cluster B, and container orchestration cluster C, and their prices are 800 yuan, 1000 yuan, and 1200 yuan respectively. Then the master node can select the container orchestration cluster A with the lowest price for the target category of instructions to be run.

[0125] In some implementable embodiments, if the characteristic information of each container orchestration cluster includes: priority information of the container orchestration cluster, the master node selects a target container orchestration cluster from multiple container orchestration clusters for instructions to be run in the target category based on the respective characteristic information of the multiple container orchestration clusters, including: the master node selects a container orchestration cluster with the highest priority from multiple container orchestration clusters for the instructions to be run in the target category, and uses the container orchestration cluster as the target container orchestration cluster.

[0126] For example, suppose there are three container orchestration clusters, namely container orchestration cluster A, container orchestration cluster B, and container orchestration cluster C, and their priorities are 1, 2, and 3, respectively. Assuming that the smaller the priority index, the higher the priority level, the master node can select container orchestration cluster A with the highest priority for the target category of instructions to be run.

[0127] In some implementable embodiments, if the characteristic information of each container orchestration cluster includes: price information of the container orchestration cluster and priority information of the container orchestration cluster, then the master node selects a target container orchestration cluster from multiple container orchestration clusters for instructions to be run in the target category based on the respective characteristic information of the multiple container orchestration clusters, including: the master node first selects the container orchestration clusters with the highest and second highest priorities from multiple container orchestration clusters for the instructions to be run in the target category, then selects the container orchestration cluster with the lowest price from the container orchestration clusters with the highest and second highest priorities, and uses the container orchestration cluster as the target container orchestration cluster.

[0128] For example, suppose there are three container orchestration clusters, namely container orchestration cluster A, container orchestration cluster B, and container orchestration cluster C, whose prices are 800 yuan, 1000 yuan, and 1200 yuan respectively, and their priorities are 1, 2, and 3 respectively. Assuming that the smaller the priority index, the higher the priority level, the master node first selects the container orchestration clusters with the highest and second highest priorities, that is, container orchestration cluster A and container orchestration cluster B, and then selects the container orchestration cluster A with the lowest price from container orchestration cluster A and container orchestration cluster B, and uses this container orchestration cluster as the target container orchestration cluster.

[0129] In an embodiment of the present application, the master node can select a suitable target container orchestration cluster from multiple container orchestration clusters based on the characteristic information of each of the multiple container orchestration clusters, such as selecting the container orchestration cluster with the highest priority or the lowest price, or selecting the container orchestration cluster with a better combination of priority and price, thereby facilitating task execution.

[0130] In some possible implementations, the master node can initiate a persistent connection to the respective API service components in the multiple container orchestration clusters through a list and listening mechanism. Based on this, the master node can obtain the characteristic information of the multiple container orchestration clusters through the persistent connection between the respective API service components in the multiple container orchestration clusters.

[0131] In some implementations, for each container orchestration cluster in multiple container orchestration clusters, the list and monitoring mechanism corresponding to the container orchestration cluster is a resource monitoring mechanism provided by the API service component in the container orchestration cluster, which allows the master node to obtain resource objects, such as a list of working nodes (node) and execution units (pod) through the API service component, and monitor the changes of resource objects in real time by establishing a long connection. When a resource object is created, updated, or deleted, the API service component will send an event notification to the master node to achieve real-time synchronization and response of resources.

[0132] It should be understood that if each of the multiple container orchestration clusters is Kubernetes, then the list and watch mechanism here is the list and watch mechanism corresponding to Kubernetes.

[0133] It should be understood that the API service component is the only entry point for resource operations, which is used to receive commands input by objects and provide mechanisms such as authentication, authorization, API registration and discovery. If each of the multiple container orchestration clusters is Kubernetes, then the API service component here is the ApiServer component in Kubernetes.

[0134] In some implementations, for the to-be-executed instructions of the target category, the master node selects a target container orchestration cluster from multiple container orchestration clusters, including: the master node randomly selects a container orchestration cluster from the multiple container orchestration clusters and uses it as the target container orchestration cluster.

[0135] For example, assuming that there are three container orchestration clusters, namely container orchestration cluster A, container orchestration cluster B, and container orchestration cluster C, the master node can randomly select a container orchestration cluster from the three container orchestration clusters for the target category of instructions to be run. For example, container orchestration cluster C is randomly selected. Based on this, the master node uses container orchestration cluster C as the target container orchestration cluster.

[0136] In the embodiment of the present application, the master node may select a target working node in the target container orchestration cluster for the target category of instructions to be executed in any of the following achievable ways, but is not limited thereto:

[0137] In some possible implementations, for instructions to be run in a target category, the master node selects a target working node in a target container orchestration cluster, including: the master node may obtain feature information of each working node in the target container orchestration cluster; and for instructions to be run in the target category, based on the feature information of each working node, selects a target working node in the target container orchestration cluster.

[0138] In some implementations, the characteristic information of each working node in the target container orchestration cluster includes at least one of the following, but is not limited to: the number of CPUs of the working node; the available memory size of the working node.

[0139] In some achievable embodiments, if the characteristic information of each working node in the target container orchestration cluster includes: the number of CPUs of the working node, the master node selects a target working node in the target container orchestration cluster based on the characteristic information of each working node for the target category of instructions to be run, including: the master node selects a working node with the largest number of CPUs from all working nodes in the target container orchestration cluster for the target category of instructions to be run, and uses the working node as the target working node.

[0140] For example, assuming that the target container orchestration cluster has three worker nodes, namely worker node 1, worker node 2, and worker node 3, and their CPU numbers are 2, 4, and 8 respectively, then the master node can select worker node 3 with the largest number of CPUs for the target category of instructions to be run.

[0141] In some achievable embodiments, if the characteristic information of each working node in the target container orchestration cluster includes: the available memory size of the working node, then the master node selects the target working node in the target container orchestration cluster based on the characteristic information of each working node for the instructions to be run of the target category, including: the master node selects the working node with the largest available memory from all working nodes in the target container orchestration cluster for the instructions to be run of the target category, and uses the working node as the target working node.

[0142] For example, assuming that there are three worker nodes in the target container orchestration cluster, namely worker node 1, worker node 2, and worker node 3, and their available memory is 128G, 256G, and 512G respectively, then the master node can select worker node 3 with the most available memory for the target category's instructions to be run.

[0143] In some achievable embodiments, if the characteristic information of each working node in the target container orchestration cluster includes: the number of CPUs of the working node and the available memory size of the working node, then the master node selects the target working node in the target container orchestration cluster for the instructions to be run of the target category based on the characteristic information of each working node, including: the master node first selects the working nodes with the largest and second largest number of CPUs from all working nodes in the target container orchestration cluster for the instructions to be run of the target category, then selects the working node with the largest and second largest number of CPUs from all working nodes in the target container orchestration cluster, and uses the working node as the target working node.

[0144] For example, suppose the target container editing cluster has three worker nodes, namely worker node 1, worker node 2, and worker node 3, and their CPU numbers are 2, 4, and 8 respectively, and their available memory is 128G, 256G, and 512G respectively. Then the master node first selects the master node with the largest and second largest number of CPUs, that is, worker node 2 and worker node 3, and then selects worker node 3 with the largest available memory between worker nodes 2 and 3, and selects worker node 3 as the target worker node.

[0145] In some achievable embodiments, if the characteristic information of each working node in the target container orchestration cluster includes: the number of CPUs of the working node and the available memory size of the working node, then the master node selects the target working node in the target container orchestration cluster for the instructions to be run of the target category based on the characteristic information of each working node, including: the master node first selects the working node with the most and second most possible memory from all working nodes in the target container orchestration cluster for the instructions to be run of the target category, then selects the working node with the largest number of CPUs from the working nodes with the largest and second most possible memory, and uses the working node as the target working node.

[0146] For example, suppose there are three working nodes in the target container editing cluster, namely, working node 1, working node 2, and working node 3, and their CPU numbers are 2, 4, and 8 respectively, and their available memory is 128G, 256G, and 512G respectively. Then the master node first selects the master node with the most and second most available memory, that is, selects working node 2 and working node 3, and then selects working node 3 with the largest number of available CPUs between working node 2 and working node 3, and selects working node 3 as the target working node.

[0147] In an embodiment of the present application, the master node can select a suitable target work node from all the work nodes in the cluster based on the characteristic information of each work node in the target container orchestration cluster, such as selecting the work node with the largest number of CPUs or the most available memory, or selecting the work node with a better combination of CPU number and possible memory, thereby facilitating task execution.

[0148] In some possible implementations, the master node can initiate a persistent connection to the respective API service components in multiple container orchestration clusters through a list and listening mechanism. Based on this, the master node can obtain the characteristic information of each working node through the persistent connection between the master node and the API service component in the target container orchestration cluster.

[0149] In some implementations, for the target category of instructions to be executed, the master node selects a target working node in the target container orchestration cluster, including: the master node randomly selects a working node from all working nodes in the target container orchestration cluster and uses it as the target working node.

[0150] For example, assuming that there are three working nodes in the target container editing cluster, namely, working node 1, working node 2 and working node 3, then the master node can randomly select a working node from these three working nodes for the target category of instructions to be run. For example, if working node 1 is randomly selected, based on this, the master node uses working node 1 as the target working node.

[0151] S440: Send the image file and instruction information corresponding to the target category of instructions to be run to the target container orchestration cluster, so that the target container orchestration cluster creates a target execution unit on the target working node based on the image file and instruction information corresponding to the target category of instructions to be run;

[0152] In some achievable embodiments, before the master node sends the image file and indication information corresponding to the target category of instructions to be run to the target container orchestration cluster so that the target container orchestration cluster creates the target execution unit on the target working node based on the image file and indication information corresponding to the target category of instructions to be run, it also includes: the master node receives an execution unit creation request sent by a first controller in the target container orchestration cluster; the master node sends the image file and indication information corresponding to the target category of instructions to be run to the target container orchestration cluster so that the target container orchestration cluster creates the target execution unit on the target working node based on the image file and indication information corresponding to the target category of instructions to be run, including: the master node responds to the execution unit creation request, sends the image file and indication information corresponding to the target category of instructions to be run to the first controller, so that the first controller sends the image file and indication information corresponding to the target category of instructions to be run to the API service component in the target container orchestration cluster, so that the API service component triggers the creation of the target execution unit on the target working node based on the image file and indication information corresponding to the target category of instructions to be run.

[0153] In some implementations, the master node may monitor the execution unit creation request sent from the first controller.

[0154] It should be understood that the first controller is used to send an execution unit creation request. The first controller can be understood as a component.

[0155] In some implementations, the first controller may belong to a controller management component in the target container orchestration cluster, where the controller management component is responsible for maintaining the state of the cluster, such as application deployment scheduling, fault detection, automatic expansion, rolling update, etc. Assuming that the target container orchestration cluster is Kubernetes, the controller management component is the ControllerManager in Kubernetes.

[0156] In some implementations, the English name of the first controller may be tfold controller, but is not limited thereto.

[0157] It should be understood that the execution unit creation request is used to request the creation of an execution unit.

[0158] It should be understood that the execution unit in the target container orchestration cluster is the smallest operation unit of the target container orchestration cluster, and the execution unit includes one or more containers, which share network and storage resources so that the containers run in the execution unit. Assuming that the target container orchestration cluster is kubernetes, the execution unit can be a pod in kubernetes.

[0159] In some possible implementations, an API service component triggers the creation of a target execution unit on a target working node based on an image file and indication information corresponding to instructions to be run in a target category, including: the API service component can send an instruction to a container maintenance component in the target working node to request the installation of the image file and request the binding of the data set to be executed indicated by the indication information; after receiving the instruction, the container maintenance component notifies the containerization platform in the target working node, and then the containerization platform starts an execution unit corresponding to the image file and the data set to be executed, namely, the target execution unit, thereby completing the creation of the target execution unit.

[0160] It should be understood that the container maintenance component is responsible for maintaining the life cycle of the container, that is, creating, updating, and destroying the container by controlling the containerization platform. The containerization platform is mainly responsible for various operations of the container on the working node. Among them, assuming that the target container orchestration cluster is kubernetes, then the container maintenance component can be Kubelet in kubernetes, and the containerization platform can be docker in kubernetes.

[0161] It should be understood that the embodiments of the present application do not limit the various components and functions of the various components included in the target container orchestration cluster. Based on this, the embodiments of the present application do not limit the creation method of the target execution unit. For example, before the master node sends the image file and indication information corresponding to the target category of the to-be-run instruction to the target container orchestration cluster, so that the target container orchestration cluster creates the target execution unit on the target working node based on the image file and indication information corresponding to the target category of the to-be-run instruction, it also includes: the master node receives the execution unit creation request sent by the API service component in the target container orchestration cluster; the master node sends the image file and indication information corresponding to the target category of the to-be-run instruction to the target container orchestration cluster, so that the target container orchestration cluster creates the target execution unit on the target working node based on the image file and indication information corresponding to the target category of the to-be-run instruction, including: the master node responds to the execution unit creation request, sends the image file and indication information corresponding to the target category of the to-be-run instruction to the API service component, so that the API service component triggers the creation of the target execution unit on the target working node based on the image file and indication information corresponding to the target category of the to-be-run instruction. Among them, the API service component triggers the creation of a target execution unit on a target working node based on an image file and indication information corresponding to the instructions to be run in a target category, which may include: the API service component may send an instruction to the containerization platform in the target working node to request the installation of the image file and request to bind the data set to be executed indicated by the indication information; after the container maintenance component receives the instruction, the containerization platform then starts an execution unit corresponding to the image file and the data set to be executed, namely, the target execution unit, thereby completing the creation of the target execution unit.

[0162] S450: Inject the target category of to-be-executed instructions into the target execution unit, so that the target execution unit executes the target category of to-be-executed instructions.

[0163] It should be understood that the target execution unit is installed with the image file corresponding to the target category of instructions to be run, and is loaded with the data set to be executed corresponding to the instructions to be run in this category. It can run the target category of instructions to be run to achieve task execution.

[0164] For example, Figure 6 A schematic diagram of an execution unit provided in an embodiment of the present application, such as Figure 6 As shown, the execution unit is installed with an image file and loaded with a data set to be executed. It can run the corresponding instructions to be run to realize task execution.

[0165] In some implementations, after the master node injects the target category's to-be-run instructions into the target execution unit so that the target execution unit runs the target category's to-be-run instructions, the method further includes: the master node obtains the task execution result of each task associated with the target category's to-be-run instructions.

[0166] It is worth mentioning that the to-be-executed instructions of the target category can be associated with one or more tasks, wherein the task execution result of each task includes: successful execution and abnormal execution.

[0167] It should be understood that execution exceptions include two situations: execution failure and execution timeout.

[0168] In some possible implementations, the master node obtains the task execution result of each task associated with the to-be-run instruction of the target category, including: the master node receives the task execution result of each task associated with the to-be-run instruction of the target category sent by the second controller in the target container orchestration cluster; wherein the second controller obtains the task execution result of each task associated with the to-be-run instruction of the target category from the hook component in the target container orchestration cluster.

[0169] In some implementations, the second controller may periodically summarize the task execution results of each task in the target container orchestration cluster, and send the task execution results of these tasks to the master node.

[0170] It should be understood that the second controller is used to obtain the task execution result of each task associated with the to-be-run instruction of the target category from the hook component in the target container orchestration cluster, and send the task execution result of each task to the master node. The second controller can be understood as a component.

[0171] In some possible implementations, the second controller may be the same controller as the first controller, or may be a different controller, and this embodiment of the present application does not impose any limitation on this.

[0172] In some implementations, the English name of the second controller may be tfold controller, but is not limited thereto.

[0173] In some implementations, the hook component may be deployed in a target working node, but is not limited thereto.

[0174] Figure 7 A schematic diagram of obtaining a task execution result provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, the second controller obtains the task execution result from the hook component in the working node 1 in the container orchestration cluster A, and returns the task execution result to the master node.

[0175] It should be noted that the embodiments of the present application do not limit the various components included in the target container orchestration cluster and the functions of each component. Based on this, the embodiments of the present application do not limit the way in which the master node obtains the task execution results. For example, the master node obtains the task execution results of each task associated with the target category of instructions to be run, including: the master node receives the task execution results of each task associated with the target category of instructions to be run sent by the API service component in the target container orchestration cluster; wherein the API service component is the task execution results of each task associated with the target category of instructions to be run obtained from the hook component in the target container orchestration cluster.

[0176] It should be understood that for each category of instructions to be run, it corresponds to a container orchestration cluster. From the perspective of each container orchestration cluster, it may correspond to one or more categories of instructions to be run, and these instructions to be run constitute the to-do items (TODO works) of the container orchestration cluster. For example, Figure 8 A schematic diagram of a to-do list and container orchestration cluster provided in an embodiment of the present application, such as Figure 8 As shown, container orchestration cluster A, container orchestration cluster B, and container orchestration cluster C each correspond to a to-do item, wherein these container orchestration clusters can use the pull mode to pull the to-be-run instructions from their corresponding to-do items, and can also return the task execution results of the tasks to the master node. The master node can record the task execution results. For example, if the task execution result of a task is an execution exception, the master node can mark the task as ERROR. If the task execution result of a task is a successful execution, the master node can mark the task as COMPLETE.

[0177] An embodiment of the present application provides a task execution method based on multiple container orchestration clusters, comprising: a master node obtains multiple task execution requests; wherein each task execution request comprises: an image file of an application program for executing the corresponding task to be executed, indication information for indicating a data set to be executed associated with the task to be executed, and instructions to be run associated with the task to be executed; the master node classifies the instructions to be run included in each of the multiple task execution requests based on the image files and indication information included in each of the multiple task execution requests; the master node selects instructions to be run of a target category, and for the instructions to be run of the target category, selects a target container orchestration cluster from multiple container orchestration clusters, and selects a target working node in the target container orchestration cluster; the master node sends the image file and indication information corresponding to the instructions to be run of the target category to the target container orchestration cluster, so that the target container orchestration cluster creates a target execution unit on the target working node based on the image file and indication information corresponding to the instructions to be run of the target category; the master node injects the instructions to be run of the target category into the target execution unit, so that the target execution unit runs the instructions to be run of the target category. Since multiple container orchestration clusters include more working nodes, they break the limitations of resources such as CPU and memory, improve the task execution performance of the task execution system, and improve the task execution efficiency and reliability.

[0178] Further, in an embodiment of the present application, the first controller in the target container orchestration cluster can actively send an execution unit creation request to the master node, without the need for the master node to interact with the first controller in the target container orchestration cluster multiple times to achieve the creation of the target execution unit. And the second controller in the target container orchestration cluster can obtain the task execution result through the hook component, and actively send an execution unit creation request to the master node, without the need for the master node to interact with the second controller in the target container orchestration cluster multiple times to achieve feedback on the task execution result. And each container orchestration cluster can use a pull mode to pull the instructions to be run from their respective corresponding to-do items to run the instructions to be run, without the need for the master node to interact with each container orchestration cluster multiple times to run the instructions to be run. Thereby, the number of interactions between the main set and the container orchestration cluster can be reduced, the network pressure can be reduced, and the technical solution provided by the present application can be applied to a larger number of container orchestration clusters.

[0179] In order to improve the robustness of the task execution system, this application also proposes to perform fault migration when the task execution result is an execution exception, which is described in detail below:

[0180] The first implementation method is that if the task execution result of the target task is an execution exception, the master node triggers the target container orchestration cluster to migrate the target task to other execution units.

[0181] It should be understood that the other execution units are other execution units in the target container orchestration cluster except the target execution unit.

[0182] In some achievable embodiments, the master node triggers the target container orchestration cluster to migrate the target task to other execution units, including: the master node sends the image file and indication information corresponding to the target task to the first controller, so that the first controller sends the image file and indication information corresponding to the target task to the API service component in the target container orchestration cluster, so that the API service component triggers the creation of the other execution units on the target working node based on the image file and indication information corresponding to the target task, and after the creation is successful, migrates the target task to the other execution units.

[0183] In some possible implementations, the API service component triggers the creation of the other execution units on the target working node based on the image file and indication information corresponding to the target task, including: the API service component can send an instruction to the container maintenance component in the target working node to request the installation of the image file and request the binding of the data set to be executed indicated by the indication information; after receiving the instruction, the container maintenance component notifies the containerization platform in the target working node, and then the containerization platform starts an execution unit corresponding to the image file and the data set to be executed, that is, the other execution unit, and completes the creation of the other execution units.

[0184] It should be understood that the embodiments of the present application do not limit the various components and functions of the various components included in the target container orchestration cluster. Based on this, the embodiments of the present application do not limit the creation method of other execution units. For example, the master node triggers the target container orchestration cluster to migrate the target task to other execution units, including: the master node sends the image file and instruction information corresponding to the target task to the API service component, so that the API service component triggers the creation of the other execution units on the target working node based on the image file and instruction information corresponding to the target task, and after the creation is successful, the target task is migrated to the other execution units. The API service component triggers the creation of the other execution units on the target working node based on the image file and instruction information corresponding to the target task, which may include: the API service component may send an instruction to the containerization platform in the target working node for requesting the installation of the image file and requesting the binding of the to-be-executed data set indicated by the instruction information. After the container maintenance component receives the instruction, the containerization platform then starts an execution unit corresponding to the image file and the to-be-executed data set, that is, the other execution unit, and completes the creation of the other execution units.

[0185] The second implementation method is that if the task execution result of the target task is an execution exception and the target task meets the preset conditions, the master node triggers the target container orchestration cluster to migrate the target task to other execution units.

[0186] In some implementations, if the target task does not meet the preset conditions, the master node does not trigger the target container orchestration cluster to migrate the target task to other execution units.

[0187] In some possible implementations, the preset condition includes any of the following, but is not limited to:

[0188] The number of times the target task is run on the target execution unit is greater than or equal to the preset number;

[0189] The running time of the target task on the target execution unit is greater than or equal to the first preset time;

[0190] The running time of the target task on the target execution unit is less than or equal to the second preset time;

[0191] Insufficient software resources of the target execution unit;

[0192] Insufficient hardware resources of the target execution unit.

[0193] In some implementations, the preset number of times may be 3, 4, or 5, etc., but is not limited thereto.

[0194] In some implementations, the first preset duration may be 10 ms, 20 ms, or 30 ms, but is not limited thereto.

[0195] In some implementations, the second preset duration may be 1 ms, 2 ms, or 3 ms, but is not limited thereto.

[0196] In some implementations, the software resources include, but are not limited to: an operating system and an application program.

[0197] In some implementations, the hardware resources include, but are not limited to: CPU, memory, and hard disk.

[0198] It should be noted that the difference between the second implementation method and the first implementation method is that in the first implementation method, if the task execution result of the target task is an execution exception, the master node directly triggers the target container orchestration cluster to migrate the target task to other execution units. In the second implementation method, if the task execution result of the target task is an execution exception, the preset conditions are judged first, and if the target task meets the preset conditions, the master node triggers the target container orchestration cluster to migrate the target task to other execution units.

[0199] It should be understood that regarding how the master node triggers the target container orchestration cluster to migrate the target task to other execution units, reference can be made to the explanation in the first implementation method, and this embodiment of the present application will not be repeated here.

[0200] A third achievable method is that if the task execution result of the target task is an execution exception, the master node reselects a container orchestration cluster from multiple container orchestration clusters for the target task, and reselects a working node in the reselected container orchestration cluster; the master node sends the image file and instruction information corresponding to the target task to the reselected container orchestration cluster, so that the reselected container orchestration cluster rebuilds the execution unit on the reselected working node based on the image file and instruction information corresponding to the target task; the master node injects the to-be-run instructions of the target task into the rebuilt execution unit, so that the rebuilt execution unit runs the to-be-run instructions of the target task.

[0201] It should be understood that the selection process of the container orchestration cluster, the selection process of the working node and the reconstruction process of the execution unit can be referred to above, and the embodiments of the present application will not be described in detail.

[0202] It should be noted that the difference between the third implementation method and the first implementation method is that in the first implementation method, the master node does not need to reselect the container orchestration cluster and the working node, but rebuilds the execution unit on the target working node and migrates the target task to the execution unit. In the third implementation method, the master node needs to reselect the container orchestration cluster and the working node, rebuild the execution unit on the reselected working node, and migrate the target task to the execution unit.

[0203] A fourth achievable method is that if the task execution result of the target task is an execution exception, and the target task meets the preset conditions, then for the target task, the master node reselects a container orchestration cluster from multiple container orchestration clusters, and reselects a working node in the reselected container orchestration cluster; the master node sends the image file and instruction information corresponding to the target task to the reselected container orchestration cluster, so that the reselected container orchestration cluster rebuilds the execution unit on the reselected working node based on the image file and instruction information corresponding to the target task; the master node injects the to-be-run instructions of the target task into the rebuilt execution unit, so that the rebuilt execution unit runs the to-be-run instructions of the target task.

[0204] It should be understood that the selection process of the container orchestration cluster, the selection process of the working node, the reconstruction process of the execution unit and the preset conditions can be referred to above, and the embodiments of the present application will not be described in detail.

[0205] It should be noted that the difference between achievable method 4 and achievable method 3 is that: in achievable method 3, if the task execution result of the target task is an execution exception, the master node directly reselects a container orchestration cluster from multiple container orchestration clusters, and reselects a working node in the reselected container orchestration cluster; the master node sends the image file and instruction information corresponding to the target task to the reselected container orchestration cluster, so that the reselected container orchestration cluster rebuilds the execution unit on the reselected working node based on the image file and instruction information corresponding to the target task; the master node injects the to-be-run instructions of the target task into the rebuilt execution unit, so that the rebuilt execution unit runs the to-be-run instructions of the target task. In the fourth implementable method, if the task execution result of the target task is an execution exception, a preset condition is first judged. If the target task meets the preset condition, the master node reselects a container orchestration cluster from multiple container orchestration clusters and reselects a working node in the reselected container orchestration cluster; the master node sends the image file and instruction information corresponding to the target task to the reselected container orchestration cluster, so that the reselected container orchestration cluster rebuilds the execution unit on the reselected working node based on the image file and instruction information corresponding to the target task; the master node injects the to-be-run instructions of the target task into the rebuilt execution unit, so that the rebuilt execution unit runs the to-be-run instructions of the target task.

[0206] In the embodiments of the present application, the present application also proposes that fault migration can be performed when the task execution result is an execution exception, thereby improving the robustness of the task execution system.

[0207] The preferred embodiments of the present application are described in detail above in conjunction with the accompanying drawings. However, the present application is not limited to the specific details in the above embodiments. Within the technical concept of the present application, the technical solution of the present application can be subjected to a variety of simple modifications, and these simple modifications all belong to the protection scope of the present application. For example, the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present application will not further explain various possible combinations. For another example, the various different embodiments of the present application can also be arbitrarily combined, as long as they do not violate the ideas of the present application, they should also be regarded as the contents disclosed in the present application.

[0208] It should also be understood that in the various method embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0209] The method provided in the embodiment of the present application is described above. The task execution system and device based on multiple container orchestration clusters provided in the embodiment of the present application are described below.

[0210] Fig. 9 A schematic diagram of a task execution system 900 based on multiple container orchestration clusters provided in an embodiment of the present application is shown in FIG. Fig. 9 As shown, the system includes: a master node 910 and multiple container orchestration clusters 920; wherein the master node 910 is used to: obtain multiple task execution requests; wherein each task execution request includes: an image file of an application program for executing the corresponding task to be executed, indication information for indicating a data set to be executed associated with the task to be executed, and instructions to be run associated with the task to be executed; based on the image files and indication information respectively included in the multiple task execution requests, the instructions to be run respectively included in the multiple task execution requests are classified; instructions to be run of a target category are selected, and for the instructions to be run of the target category, a target container orchestration cluster is selected from multiple container orchestration clusters, and a target working node is selected from the target container orchestration cluster; the image file and indication information corresponding to the instructions to be run of the target category are sent to the target container orchestration cluster, so that the target container orchestration cluster creates a target execution unit on the target working node based on the image file and indication information corresponding to the instructions to be run of the target category; the instructions to be run of the target category are injected into the target execution unit, so that the target execution unit runs the instructions to be run of the target category.

[0211] In some achievable embodiments, before the master node 910 sends the image file and indication information corresponding to the target category of instructions to be run to the target container orchestration cluster, so that the target container orchestration cluster creates the target execution unit on the target working node based on the image file and indication information corresponding to the target category of instructions to be run, the master node 910 is also used to receive an execution unit creation request sent by the first controller in the target container orchestration cluster; accordingly, the master node 910 is specifically used to: in response to the execution unit creation request, send the image file and indication information corresponding to the target category of instructions to be run to the first controller, so that the first controller sends the image file and indication information corresponding to the target category of instructions to be run to the API service component in the target container orchestration cluster, so that the API service component triggers the creation of the target execution unit on the target working node based on the image file and indication information corresponding to the target category of instructions to be run.

[0212] In some implementations, after the master node 910 injects the target category's instructions to be run into the target execution unit so that the target execution unit runs the target category's instructions to be run, the master node 910 is also used to obtain the task execution result of each task associated with the target category's instructions to be run.

[0213] In some possible implementations, the master node 910 is specifically used to: receive the task execution result of each task associated with the to-be-run instruction of the target category sent by the second controller in the target container orchestration cluster; wherein the second controller obtains the task execution result of each task associated with the to-be-run instruction of the target category from the hook component in the target container orchestration cluster.

[0214] In some possible implementations, the master node 910 is specifically configured to: if the task execution result of the target task is an execution exception, trigger the target container orchestration cluster to migrate the target task to other execution units.

[0215] In some possible implementations, the master node 910 is further used to: after obtaining the task execution result of each task associated with the to-be-run instruction of the target category, if the task execution result of the target task is an execution exception and the target task meets a preset condition, trigger the target container orchestration cluster to migrate the target task to other execution units.

[0216] In some possible implementations, the master node 910 is further used to: after obtaining the task execution result of each task associated with the to-be-run instruction of the target category, if the task execution result of the target task is an execution exception, reselect a container orchestration cluster from multiple container orchestration clusters for the target task, and reselect a working node in the reselected container orchestration cluster; send the image file and instruction information corresponding to the target task to the reselected container orchestration cluster, so that the reselected container orchestration cluster rebuilds the execution unit on the reselected working node based on the image file and instruction information corresponding to the target task; and inject the to-be-run instruction of the target task into the rebuilt execution unit, so that the rebuilt execution unit runs the to-be-run instruction of the target task.

[0217] In some possible implementations, the master node 910 is further used to: after obtaining the task execution result of each task associated with the to-be-run instruction of the target category, if the task execution result of the target task is an execution exception and the target task meets a preset condition, then for the target task, reselect a container orchestration cluster from multiple container orchestration clusters, and reselect a working node in the reselected container orchestration cluster; send the image file and instruction information corresponding to the target task to the reselected container orchestration cluster, so that the reselected container orchestration cluster rebuilds the execution unit on the reselected working node based on the image file and instruction information corresponding to the target task; and inject the to-be-run instruction of the target task into the rebuilt execution unit, so that the rebuilt execution unit runs the to-be-run instruction of the target task.

[0218] In some possible implementations, the preset condition includes any one of the following:

[0219] The number of times the target task is run on the target execution unit is greater than or equal to the preset number;

[0220] The running time of the target task on the target execution unit is greater than or equal to the first preset time;

[0221] The running time of the target task on the target execution unit is less than or equal to the second preset time;

[0222] Insufficient software resources of the target execution unit;

[0223] Insufficient hardware resources of the target execution unit.

[0224] In some implementations, the master node 910 is specifically used to: obtain characteristic information of each of the multiple container orchestration clusters; and select a target container orchestration cluster from the multiple container orchestration clusters based on the characteristic information of each of the multiple container orchestration clusters for the target category of instructions to be run.

[0225] In some implementations, the characteristic information of each container orchestration cluster includes at least one of the following:

[0226] Pricing information for container orchestration clusters;

[0227] Priority information for the container orchestration cluster.

[0228] In some implementations, the master node 910 is specifically configured to obtain characteristic information of each of the multiple container orchestration clusters through a long connection with each of the API service components in the multiple container orchestration clusters.

[0229] In some implementations, the master node 910 is specifically used to: obtain feature information of each working node in the target container orchestration cluster; and select a target working node in the target container orchestration cluster based on the feature information of each working node for the target category of instructions to be executed.

[0230] In some implementations, the characteristic information of each working node in the target container orchestration cluster includes at least one of the following: the number of CPUs of the working node; and the available memory size of the working node.

[0231] In some implementations, the master node 910 is specifically used to obtain characteristic information of each working node through a long connection with an API service component in a target container orchestration cluster.

[0232] It should be understood that the task execution system provided in the embodiments of the present application has the characteristics of easy deployment, large capacity, and high availability.

[0233] It should be understood that the system embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, they will not be described here. Specifically, Fig. 9 The system 900 shown may perform Figure 4The corresponding method embodiments, and the aforementioned and other operations and / or functions of each module in the system 900 are respectively to implement Figure 4 For the sake of brevity, the corresponding processes in each method are not repeated here.

[0234] The system 900 of the embodiment of the present application is described above from the perspective of the functional module in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or a combination of hardware and software modules in the decoding processor to perform. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above method embodiment in conjunction with its hardware.

[0235] Fig.10 A schematic diagram of a task execution device 1000 based on multiple container orchestration clusters provided in an embodiment of the present application includes:

[0236] The acquisition module 1010 is used to acquire multiple task execution requests; wherein each task execution request includes: an image file of an application program for executing the corresponding task to be executed, indication information for indicating a data set to be executed associated with the task to be executed, and instructions to be run associated with the task to be executed;

[0237] A classification module 1020, configured to classify the to-be-executed instructions included in each of the multiple task execution requests based on the image files and instruction information included in each of the multiple task execution requests;

[0238] A selection module 1030 is used to select instructions to be run of a target category, and for the instructions to be run of the target category, select a target container orchestration cluster from multiple container orchestration clusters, and select a target working node in the target container orchestration cluster;

[0239] A sending module 1040 is used to send the image file and instruction information corresponding to the target category of instructions to be run to the target container orchestration cluster, so that the target container orchestration cluster creates a target execution unit on the target working node based on the image file and instruction information corresponding to the target category of instructions to be run;

[0240] The injection module 1050 is used to inject the target category of to-be-executed instructions into the target execution unit, so that the target execution unit executes the target category of to-be-executed instructions.

[0241] In some implementations, the acquisition module 1010 is also used to: after the injection module 1050 injects the target category of instructions to be run into the target execution unit so that the target execution unit runs the target category of instructions to be run, obtain the task execution result of each task associated with the target category of instructions to be run.

[0242] In some possible implementations, the acquisition module 1010 is specifically used to: receive the task execution result of each task associated with the to-be-run instruction of the target category sent by the second controller in the target container orchestration cluster; wherein the second controller obtains the task execution result of each task associated with the to-be-run instruction of the target category from the hook component in the target container orchestration cluster.

[0243] In some possible implementations, the task execution device 1000 further includes: a trigger module 1060, which is used to trigger the target container orchestration cluster to migrate the target task to other execution units if the task execution result of the target task is an execution exception after the acquisition module 1010 acquires the task execution result of each task associated with the to-be-run instruction of the target category.

[0244] In some implementations, the trigger module 1060 is further used to: after the acquisition module 1010 acquires the task execution result of each task associated with the to-be-run instruction of the target category, if the task execution result of the target task is an execution exception and the target task meets a preset condition, trigger the target container orchestration cluster to migrate the target task to other execution units.

[0245] In some possible implementations, after the acquisition module 1010 acquires the task execution result of each task associated with the to-be-run instruction of the target category, the selection module 1030 is further configured to, if the task execution result of the target task is an execution exception, reselect a container orchestration cluster from multiple container orchestration clusters for the target task, and reselect a working node in the reselected container orchestration cluster; the sending module 1040 is further configured to send the image file and instruction information corresponding to the target task to the reselected container orchestration cluster, so that the reselected container orchestration cluster rebuilds the execution unit on the reselected working node based on the image file and instruction information corresponding to the target task; the injection module 1050 is further configured to inject the to-be-run instruction of the target task into the rebuilt execution unit, so that the rebuilt execution unit runs the to-be-run instruction of the target task.

[0246] In some possible implementations, after the acquisition module 1010 acquires the task execution result of each task associated with the to-be-run instruction of the target category, if the task execution result of the target task is an execution exception and the target task meets a preset condition, the selection module 1030 is further used to reselect a container orchestration cluster from multiple container orchestration clusters for the target task, and to reselect a working node in the reselected container orchestration cluster; the sending module 1040 is further used to send the image file and instruction information corresponding to the target task to the reselected container orchestration cluster, so that the reselected container orchestration cluster rebuilds the execution unit on the reselected working node based on the image file and instruction information corresponding to the target task; the injection module 1050 is further used to inject the to-be-run instruction of the target task into the rebuilt execution unit, so that the rebuilt execution unit runs the to-be-run instruction of the target task.

[0247] In some possible implementations, the preset condition includes any one of the following:

[0248] The number of times the target task is run on the target execution unit is greater than or equal to the preset number;

[0249] The running time of the target task on the target execution unit is greater than or equal to the first preset time;

[0250] The running time of the target task on the target execution unit is less than or equal to the second preset time;

[0251] Insufficient software resources of the target execution unit;

[0252] Insufficient hardware resources of the target execution unit.

[0253] In some implementations, the selection module 1030 is specifically used to: obtain characteristic information of each of the multiple container orchestration clusters; and select a target container orchestration cluster from the multiple container orchestration clusters based on the characteristic information of each of the multiple container orchestration clusters for the target category of instructions to be executed.

[0254] In some implementations, the characteristic information of each container orchestration cluster includes at least one of the following: price information of the container orchestration cluster; and priority information of the container orchestration cluster.

[0255] In some implementations, the acquisition module 1010 is specifically configured to: acquire characteristic information of each of the multiple container orchestration clusters through a persistent connection with each of the API service components in the multiple container orchestration clusters.

[0256] In some implementations, the selection module 1030 is specifically used to: obtain feature information of each working node in the target container orchestration cluster; and select a target working node in the target container orchestration cluster based on the feature information of each working node for the target category of instructions to be executed.

[0257] In some implementations, the characteristic information of each working node in the target container orchestration cluster includes at least one of the following: the number of CPUs of the working node; and the available memory size of the working node.

[0258] In some implementations, the acquisition module 1010 is specifically used to: acquire characteristic information of each working node through a long connection with an API service component in a target container orchestration cluster.

[0259] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, they will not be described here. Specifically, Fig.10 The device 1000 shown can perform Figure 4 The corresponding method embodiments, and the aforementioned and other operations and / or functions of each module in the device 1000 are respectively to implement Figure 4 For the sake of brevity, the corresponding processes in each method are not repeated here.

[0260] The above describes the device 1000 of the embodiment of the present application from the perspective of the functional module in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or a combination of hardware and software modules in the decoding processor to perform. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above method embodiment in conjunction with its hardware.

[0261] Fig.11 1 is a schematic block diagram of an electronic device 1100 provided in an embodiment of the present application. The electronic device 1100 may be the above-mentioned master node or a background server, but is not limited thereto. Fig.11 As shown, the electronic device 1100 may include:

[0262] The memory 1110 and the processor 1120, the memory 1110 is used to store the computer program 1130 and transmit the computer program 1130 to the processor 1120. In other words, the processor 1120 can call and run the computer program 1130 from the memory 1110 to implement the method in the embodiment of the present application.

[0263] For example, the processor 1120 may be configured to execute the steps in the above method according to the instructions in the computer program 1130 .

[0264] In some embodiments of the present application, the processor 1120 may include but is not limited to:

[0265] General-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.

[0266] In some embodiments of the present application, the memory 1110 includes but is not limited to:

[0267] Volatile memory and / or non-volatile memory. Among them, the non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).

[0268] In some embodiments of the present application, the computer program 1130 may be divided into one or more modules, which are stored in the memory 1110 and executed by the processor 1120 to complete the method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 1130 in the electronic device.

[0269] like Fig.11 As shown, the electronic device 1100 may further include:

[0270] The transceiver 1140 may be connected to the processor 1120 or the memory 1110 .

[0271] The processor 1120 may control the transceiver 1140 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices. The transceiver 1140 may include a transmitter and a receiver. The transceiver 1140 may further include an antenna, and the number of antennas may be one or more.

[0272] It should be understood that the various components in the electronic device 1100 are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.

[0273] According to one aspect of the present application, a computer storage medium is provided, on which a computer program is stored, and when the computer program is executed by a computer, the computer can perform the method of the above method embodiment. In other words, the present application embodiment also provides a computer program product containing instructions, and when the instructions are executed by a computer, the computer can perform the method of the above method embodiment.

[0274] According to another aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method of the above method embodiment.

[0275] In other words, when implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server, or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (digital video disc, DVD)), or a semiconductor medium (e.g., a solid state drive (solid state disk, SSD)), etc.

[0276] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0277] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0278] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to implement the scheme of this embodiment. For example, each functional module in each embodiment of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0279] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A task execution method based on multiple container orchestration clusters, characterized in that: include: Acquire multiple task execution requests; wherein each of the task execution requests includes: an image file of an application program for executing a corresponding task to be executed, indication information for indicating a data set to be executed associated with the task to be executed, and instructions to be run associated with the task to be executed; Based on the image files and instruction information respectively included in the multiple task execution requests, classifying the to-be-executed instructions respectively included in the multiple task execution requests; Selecting instructions to be run of a target category, and for the instructions to be run of the target category, selecting a target container orchestration cluster from multiple container orchestration clusters, and selecting a target working node in the target container orchestration cluster; Sending the image file and instruction information corresponding to the target category of instructions to be run to the target container orchestration cluster, so that the target container orchestration cluster creates a target execution unit on the target working node based on the image file and instruction information corresponding to the target category of instructions to be run; Injecting the target category of instructions to be executed into the target execution unit so that the target execution unit executes the target category of instructions to be executed.

2. The method according to claim 1, characterized in that Before sending the image file and instruction information corresponding to the target category of instructions to be run to the target container orchestration cluster so that the target container orchestration cluster creates a target execution unit on the target working node based on the image file and instruction information corresponding to the target category of instructions to be run, the method further includes: Receive an execution unit creation request sent by a first controller in the target container orchestration cluster; The sending the image file and instruction information corresponding to the target category of instructions to be run to the target container orchestration cluster, so that the target container orchestration cluster creates a target execution unit on the target working node based on the image file and instruction information corresponding to the target category of instructions to be run, includes: In response to the execution unit creation request, an image file and indication information corresponding to the target category of instructions to be run are sent to the first controller, so that the first controller sends the image file and indication information corresponding to the target category of instructions to be run to an application programming interface API service component in the target container orchestration cluster, so that the API service component triggers the creation of the target execution unit on the target working node based on the image file and indication information corresponding to the target category of instructions to be run.

3. The method according to claim 1 or 2, characterized in that: After injecting the target category of to-be-run instructions into the target execution unit so that the target execution unit runs the target category of to-be-run instructions, the method further includes: Obtain the task execution result of each task associated with the to-be-executed instruction of the target category.

4. The method according to claim 3, characterized in that The step of obtaining the task execution result of each task associated with the to-be-run instruction of the target category includes: receiving a task execution result of each task associated with the to-be-run instruction of the target category sent by a second controller in the target container orchestration cluster; The second controller obtains the task execution result of each task associated with the to-be-run instruction of the target category from the hook component in the target container orchestration cluster.

5. The method according to claim 3, characterized in that: After obtaining the task execution result of each task associated with the to-be-executed instruction of the target category, the method further includes: If the task execution result of the target task is an execution exception, the target container orchestration cluster is triggered to migrate the target task to other execution units.

6. The method according to claim 3, characterized in that After obtaining the task execution result of each task associated with the to-be-executed instruction of the target category, the method further includes: If the task execution result of the target task is an execution exception, and the target task meets a preset condition, the target container orchestration cluster is triggered to migrate the target task to other execution units.

7. The method according to claim 3, characterized in that After obtaining the task execution result of each task associated with the to-be-executed instruction of the target category, the method further includes: If the task execution result of the target task is an execution exception, reselecting a container orchestration cluster from the multiple container orchestration clusters for the target task, and reselecting a working node in the reselected container orchestration cluster; Sending the image file and instruction information corresponding to the target task to the reselected container orchestration cluster, so that the reselected container orchestration cluster rebuilds the execution unit on the reselected working node based on the image file and instruction information corresponding to the target task; The to-be-executed instructions of the target task are injected into the reconstructed execution unit, so that the reconstructed execution unit executes the to-be-executed instructions of the target task.

8. The method according to claim 3, characterized in that After obtaining the task execution result of each task associated with the to-be-executed instruction of the target category, the method further includes: If the task execution result of the target task is an execution exception, and the target task meets a preset condition, reselecting a container orchestration cluster from the multiple container orchestration clusters for the target task, and reselecting a working node in the reselected container orchestration cluster; Sending the image file and instruction information corresponding to the target task to the reselected container orchestration cluster, so that the reselected container orchestration cluster rebuilds the execution unit on the reselected working node based on the image file and instruction information corresponding to the target task; The to-be-executed instructions of the target task are injected into the reconstructed execution unit, so that the reconstructed execution unit executes the to-be-executed instructions of the target task.

9. The method according to claim 6 or 8, characterized in that: The preset condition includes any of the following: The number of times the target task is run on the target execution unit is greater than or equal to a preset number; The running time of the target task on the target execution unit is greater than or equal to a first preset time; The running time of the target task on the target execution unit is less than or equal to a second preset time; The software resources of the target execution unit are insufficient; The hardware resources of the target execution unit are insufficient.

10. The method according to claim 1 or 2, characterized in that: For the target category of instructions to be executed, selecting a target container orchestration cluster from multiple container orchestration clusters includes: Obtaining characteristic information of each of the multiple container orchestration clusters; For the to-be-executed instructions of the target category, the target container orchestration cluster is selected from the multiple container orchestration clusters based on the respective feature information of the multiple container orchestration clusters.

11. The method according to claim 10, characterized in that The characteristic information of each container orchestration cluster includes at least one of the following: price information of the container orchestration cluster; Priority information of the container orchestration cluster.

12. The method according to claim 10, characterized in that The obtaining characteristic information of each of the plurality of container orchestration clusters includes: The characteristic information of each of the multiple container orchestration clusters is obtained through a long connection with each API service component in the multiple container orchestration clusters.

13. The method according to claim 1 or 2, characterized in that: For the target category of instructions to be executed, selecting a target working node in the target container orchestration cluster includes: Obtaining characteristic information of each working node in the target container orchestration cluster; For the to-be-executed instructions of the target category, the target working node is selected in the target container orchestration cluster based on the characteristic information of each working node.

14. The method according to claim 13, characterized in that The characteristic information of each working node in the target container orchestration cluster includes at least one of the following: The number of central processing units (CPUs) of the working nodes; The available memory size of the worker node.

15. The method according to claim 13, characterized in that The obtaining characteristic information of each working node in the target container orchestration cluster includes: The characteristic information of each working node is obtained through a long connection with the API service component in the target container orchestration cluster.

16. A task execution system based on multiple container orchestration clusters, characterized in that: include: A master node and multiple container orchestration clusters; wherein the master node is used to: Acquire multiple task execution requests; wherein each of the task execution requests includes: an image file of an application program for executing a corresponding task to be executed, indication information for indicating a data set to be executed associated with the task to be executed, and instructions to be run associated with the task to be executed; Based on the image files and instruction information respectively included in the multiple task execution requests, classifying the to-be-executed instructions respectively included in the multiple task execution requests; Selecting instructions to be run of a target category, and for the instructions to be run of the target category, selecting a target container orchestration cluster from multiple container orchestration clusters, and selecting a target working node in the target container orchestration cluster; Sending the image file and instruction information corresponding to the target category of instructions to be run to the target container orchestration cluster, so that the target container orchestration cluster creates a target execution unit on the target working node based on the image file and instruction information corresponding to the target category of instructions to be run; Injecting the target category of instructions to be executed into the target execution unit so that the target execution unit executes the target category of instructions to be executed.

17. A task execution device based on multiple container orchestration clusters, characterized in that: include: An acquisition module, used to acquire multiple task execution requests; wherein each of the task execution requests includes: an image file of an application program for executing a corresponding task to be executed, indication information for indicating a data set to be executed associated with the task to be executed, and instructions to be run associated with the task to be executed; A classification module, configured to classify the to-be-run instructions respectively included in the plurality of task execution requests based on the image files and instruction information respectively included in the plurality of task execution requests; A selection module, configured to select instructions to be run of a target category, and for the instructions to be run of the target category, select a target container orchestration cluster from a plurality of container orchestration clusters, and select a target working node in the target container orchestration cluster; A sending module, configured to send the image file and instruction information corresponding to the target category of instructions to be run to the target container orchestration cluster, so that the target container orchestration cluster creates a target execution unit on the target working node based on the image file and instruction information corresponding to the target category of instructions to be run; The injection module is used to inject the to-be-run instructions of the target category into the target execution unit, so that the target execution unit runs the to-be-run instructions of the target category.

18. An electronic device, characterized in that: include: A processor and a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 15.

19. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein the computer program causes a computer to execute the method according to any one of claims 1 to 15.

20. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 15 is implemented.

Citation Information

Patent Citations

  • Cluster management method and cluster management device

    CN112437129A

  • Task scheduling method, device and system

    CN116610422A

  • Data set level mirroring to accomplish a volume merge / migrate in a digital data storage system

    US20050108485A1

  • Software application container hosting

    US20220374218A1