Algorithm container management method and device, electronic equipment and storage medium

By judging the releaseable state of the algorithm container deployed in the server, and automatically deleting the releaseable containers to deploy new containers, the inefficiency problem in the existing technology is solved and efficient utilization and management of resources is achieved.

CN120234092APending Publication Date: 2025-07-01SHENZHEN INTELLIFUSION TECHNOLOGIES CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311862050.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-29
Publication Date
2025-07-01

AI Technical Summary

Technical Problem

The existing algorithm container management methods are inefficient and cannot efficiently and automatically judge and delete releasable algorithm containers, resulting in waste of resources and consumption of manpower and material resources.

Method used

By obtaining the remaining resources of the server and the resources of the algorithm container to be deployed, we judge the releaseable status of the deployed algorithm container, determine the releaseable algorithm container, and automatically delete the corresponding algorithm container based on the freeable resources and the deployed resources to deploy a new container.

Benefits of technology

It improves the efficiency of algorithm container management, reduces manpower and material consumption, and realizes efficient utilization of resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120234092A_ABST
    Figure CN120234092A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an algorithm container management method, and the method comprises the steps: obtaining the residual resource amount of a server and the deployment resource amount of a to-be-deployed algorithm container when a deployment request of the to-be-deployed algorithm container is received; if the residual resource quantity of the server cannot meet the deployment resource quantity of the to-be-deployed algorithm container, judging the releasable state of the deployed algorithm container in the server, and determining a releasable algorithm container in the deployed algorithm container; determining a to-be-deleted algorithm container in the releasable algorithm container based on the releasable resource quantity of the releasable algorithm container and the deployment resource quantity of the to-be-deployed algorithm container; and deleting the to-be-deleted algorithm container, and deploying the to-be-deployed algorithm container to the server to obtain a deployed algorithm container. By comprehensively analyzing the deployed algorithm container, the releasable state of the algorithm container is judged, so that the deployed algorithm container is automatically deleted, and the management efficiency of the algorithm container is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of algorithm management, and in particular, to an algorithm container management method, device, electronic device, and storage medium. Background Art

[0002] With the continuous development of artificial intelligence technology, more and more algorithms have emerged, and existing algorithms have gradually tended to be containerized. When deploying algorithm containers, resources such as the CPU, memory, and GPU of the server need to be occupied. When the resources of the server cluster are insufficient, new algorithm containers cannot be deployed. Traditional methods often manually screen and delete algorithm containers that are not temporarily used, and then deploy new algorithm containers. However, this method is inefficient and wastes a lot of manpower and material resources. Therefore, how to provide an algorithm container management method that can automatically determine releasable algorithm containers, delete the releasable algorithm containers, and automatically deploy new algorithm containers has become an urgent problem to be solved. Summary of the Invention

[0003] An embodiment of the present invention provides an algorithm container management method, aiming to solve the problem of low efficiency of the existing algorithm container management method. When receiving a deployment request for a to-be-deployed algorithm container, obtain the remaining resources of the server and the deployment resources of the to-be-deployed algorithm container. When the remaining resources do not meet the deployment resources, judge the releasable state of the algorithm containers already deployed in the server, determine the releasable algorithm containers, determine the algorithm containers to be deleted according to the releasable resources and the deployment resources of the releasable algorithm containers, delete the algorithm containers to be deleted in the server, and deploy the to-be-deployed algorithm container. By comprehensively analyzing the algorithm containers already deployed and judging their releasable states, the algorithm containers already deployed can be automatically deleted, thereby improving the efficiency of algorithm container management.

[0004] In a first aspect, an embodiment of the present invention provides an algorithm container management method, and the method includes the following steps:

[0005] When receiving a deployment request for a to-be-deployed algorithm container, obtain the remaining resources of the server and the deployment resources of the to-be-deployed algorithm container;

[0006] If the remaining resources of the server cannot meet the deployment resources of the to-be-deployed algorithm container, judge the releasable state of the algorithm containers already deployed in the server, and determine the releasable algorithm containers among the already deployed algorithm containers;

[0007] Based on the releasable resources of the releasable algorithm containers and the deployment resources of the to-be-deployed algorithm container, determine the algorithm containers to be deleted among the releasable algorithm containers;

[0008] Delete the algorithm container to be deleted, and deploy the algorithm container to be deployed to the server to obtain the deployed algorithm container.

[0009] Optionally, the determining the releasable algorithm container by performing a releasability judgment on the algorithm containers deployed in the server includes:

[0010] Obtain the task status and deployment information of the algorithm containers deployed in the server;

[0011] Based on the task status, in the deployed algorithm containers, determine the deployed algorithm containers that are not executing algorithm tasks and have no task information as candidate releasable algorithm containers;

[0012] Based on the deployment information, determine the releasable algorithm container among the candidate releasable algorithm containers.

[0013] Optionally, the determining the algorithm container to be deleted among the releasable algorithm containers based on the releasable resource amount of the releasable algorithm container and the deployment resource amount of the algorithm container to be deployed includes:

[0014] If there is a single releasable algorithm container, then add the releasable resource amount of the releasable algorithm container to the remaining resource amount of the server, and compare the sum with the deployment resource amount of the algorithm container to be deployed. When the sum of the releasable resource amount of the releasable algorithm container and the remaining resource amount of the server is greater than the deployment resource amount of the algorithm container to be deployed, use the releasable algorithm container as the algorithm container to be deleted;

[0015] If there are multiple releasable algorithm containers, then add the releasable resource amount of each releasable algorithm container in the multiple releasable algorithm containers to the remaining resource amount of the server to obtain the added remaining resource amount obtained by adding the releasable resource amount of each releasable algorithm container and the remaining resource amount of the server;

[0016] Compare the added remaining resource amount with the deployment resource amount of the algorithm container to be deployed, and use any one of the releasable algorithm containers corresponding to the added remaining resource amount that is greater than the deployment resource amount of the algorithm container to be deployed as the algorithm container to be deleted;

[0017] If the added remaining resource amounts are all less than the deployment resource amount of the algorithm container to be deployed, then calculate the total releasable resource amount of each of the releasable algorithm containers. When the sum of the total releasable resource amount and the remaining resource amount of the server is greater than the deployment resource amount of the algorithm container to be deployed, use each of the releasable algorithm containers as the algorithm container to be deleted.

[0018] Optionally, the deployment information includes the deployment time when the algorithm containers already deployed in the server are deployed to the server and the amount of deployment resources used during deployment. When the sum of the total releasable resources and the remaining resources of the server is greater than the deployment resources of the to-be-deployed algorithm container, taking each of the releasable algorithm containers as the algorithm container to be deleted includes:

[0019] Based on the deployment time and the amount of deployment resources of the algorithm containers already deployed in the server, determining the priority ranking of the algorithm containers already deployed in the server;

[0020] Among each of the releasable algorithm containers, extracting the releasable algorithm containers that meet the required amount of deployment resources of the to-be-deployed algorithm container according to the priority ranking as the algorithm containers to be deleted.

[0021] Optionally, based on the releasable resources of the releasable algorithm container and the deployment resources of the to-be-deployed algorithm container, determining the algorithm container to be deleted among the releasable algorithm containers further includes:

[0022] When the sum of the total releasable resources and the remaining resources of the server is less than the deployment resources of the to-be-deployed algorithm container, then based on the task status, determining the task start time of each of the deployed algorithm containers with task information among the deployed algorithm containers;

[0023] Based on the task start time of each of the deployed algorithm containers with task information and the task end time of the to-be-deployed algorithm container, determining the releasable algorithm containers with task information among the deployed algorithm containers with task information;

[0024] Based on the releasable resources of each of the releasable algorithm containers with task information and the releasable resources of each of the releasable algorithm containers, determining the second total releasable resources;

[0025] When the sum of the second total releasable resources and the remaining resources of the server is greater than the deployment resources of the to-be-deployed algorithm container, then taking each of the releasable algorithm containers with task information and each of the releasable algorithm containers as the algorithm containers to be deleted.

[0026] Optionally, taking each of the releasable algorithm containers with task information and each of the releasable algorithm containers as the algorithm containers to be deleted includes:

[0027] Based on the releasable resources of each of the releasable algorithm containers and the deployment resources of the to-be-deployed algorithm container, calculating the remaining deployment resources required for the to-be-deployed algorithm container;

[0028] Based on the task start time, determine the time priority ranking of the candidate releasable algorithm containers with task information;

[0029] Based on the priority ranking and the time priority ranking, screen out the releasable algorithm containers with task information that meet the remaining deployment resource amount from the candidate releasable algorithm containers with task information;

[0030] Use the releasable algorithm containers with task information that meet the remaining deployment resource amount and the releasable algorithm containers as the algorithm containers to be deleted.

[0031] In a second aspect, an embodiment of the present invention further provides an algorithm container management device, where the algorithm container management device includes:

[0032] An acquisition module, configured to acquire the remaining resource amount of the server and the deployment resource amount of the algorithm container to be deployed when receiving a deployment request for the algorithm container to be deployed;

[0033] A judgment module, configured to, when the remaining resource amount of the server cannot meet the deployment resource amount of the algorithm container to be deployed, judge the releasable state of the algorithm containers already deployed in the server, and determine releasable algorithm containers from the already deployed algorithm containers;

[0034] A determination module, configured to determine the algorithm containers to be deleted from the releasable algorithm containers based on the releasable resource amount of the releasable algorithm containers and the deployment resource amount of the algorithm container to be deployed;

[0035] A deletion module, configured to delete the algorithm containers to be deleted, and deploy the algorithm container to be deployed to the server to obtain the already deployed algorithm containers.

[0036] In a third aspect, an embodiment of the present invention further provides an algorithm container management system, where the algorithm container management system includes: an algorithm container management device and a server;

[0037] The algorithm container management device is determined by the algorithm container management device in the second aspect.

[0038] In a fourth aspect, an embodiment of the present invention provides an electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, where when the processor executes the computer program, the steps in the algorithm container management method provided by the embodiment of the present invention are implemented.

[0039] Fifth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the algorithm container management method provided by the embodiment of the invention are implemented.

[0040] In an embodiment of the present invention, when a deployment request for a to-be-deployed algorithm container is received, the remaining resources of the server and the deployment resources of the to-be-deployed algorithm container are obtained; if the remaining resources of the server cannot meet the deployment resources of the to-be-deployed algorithm container, the releasable status of the algorithm containers already deployed in the server is judged, and the releasable algorithm containers are determined from the already deployed algorithm containers; based on the releasable resources of the releasable algorithm containers and the deployment resources of the to-be-deployed algorithm container, the algorithm containers to be deleted are determined from the releasable algorithm containers; the algorithm containers to be deleted are deleted, and the to-be-deployed algorithm container is deployed to the server to obtain the already deployed algorithm containers. When a deployment request for a to-be-deployed algorithm container is obtained, the remaining resources of the server and the deployment resources of the to-be-deployed algorithm container are obtained. When the remaining resources do not meet the deployment resources, the releasable status of the algorithm containers already deployed in the server is judged, the releasable algorithm containers are determined, the algorithm containers to be deleted are determined according to the releasable resources of the releasable algorithm containers and the deployment resources, the algorithm containers to be deleted are deleted in the server, and the to-be-deployed algorithm container is deployed. By comprehensively analyzing the already deployed algorithm containers and judging their releasable status, the already deployed algorithm containers can be automatically deleted, thereby improving the efficiency of algorithm container management. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0042] Figure 1 is a flowchart of an algorithm container management method provided by an embodiment of the present invention;

[0043] Figure 2 is a flowchart of another algorithm container management method provided by an embodiment of the present invention;

[0044] Figure 3 is a flowchart of a resource monitoring method provided by an embodiment of the present invention;

[0045] Figure 4 is a flowchart of another algorithm container management method provided by an embodiment of the present invention;

[0046] Figure 5 It is a schematic structural diagram of an algorithm container management system provided by an embodiment of the present invention;

[0047] Figure 6 It is a schematic structural diagram of an algorithm container management device provided by an embodiment of the present invention;

[0048] Figure 7 It is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. Specific embodiments

[0049] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.

[0050] As Figure 1 shown, Figure 1 It is a flowchart of an algorithm container management method provided by an embodiment of the present invention. The algorithm container management method includes the steps:

[0051] 101. When receiving a deployment request for an algorithm container to be deployed, obtain the remaining resources of the server and the deployment resources of the algorithm container to be deployed.

[0052] In the embodiment of the present invention, the above algorithm container management method can be deployed in an algorithm container management platform. The above algorithm container management platform can be constructed by a server or a server cluster. The above server or server cluster can be any electronic device with functions such as data processing, data scheduling, data management, data storage, and data transmission.

[0053] The above algorithm container management platform can obtain the algorithm to be deployed (i.e., the algorithm container to be deployed) through the above data transmission function, and deploy the above algorithm container to be deployed to a suitable server by applying the above algorithm container management method.

[0054] The above algorithm container can be understood as a container for storing and managing algorithms, which can be used to store, retrieve, modify, and delete algorithms. The above algorithm container usually includes a container component, an algorithm component, an iterator component, a functor component, and an adapter component. The above container component is a container for storing algorithms and can be a data structure such as an array, a linked list, or a tree. The above algorithm component can be an algorithm stored in the container and can be any executable code, such as a function, a method, or a procedure. The above iterator component is an iterator for traversing the algorithms in the container and can be used to access and operate on the algorithms in the container. The above functor component can be understood as similar to a function pointer and can be used for callback functions or callback methods to execute algorithms in the container. The above adapter component can be understood as similar to an interface in programming and can be used to convert or adapt algorithms between different containers. The above to-be-deployed algorithm container can be understood as an algorithm container that has not been deployed yet but will be used next.

[0055] The above deployment request can be a request initiated by a user or other platforms to the above algorithm container management platform through the interface of the algorithm container management platform (i.e., it can be an API) when they need to use the to-be-deployed algorithm container. The above server can be any electronic device capable of deploying the above algorithm container, and the above deployed algorithm container can be deployed in the server. It can be understood that when deploying the algorithm container to the server, it will occupy the resources of the above server, and the above resources can include the CPU (i.e., central processing unit) resources, memory resources, and GPU (i.e., graphics processing unit) resources of the server. The remaining resource amount of the above server can be the remaining CPU quantity, remaining memory quantity, and remaining GPU chip quantity of the above server. The above deployment resource amount can be the CPU usage, memory usage, and GPU usage required when deploying the above to-be-deployed algorithm container.

[0056] Specifically, a server resource collector can be deployed on each server to collect the IP address of each server, the total amount and usage of the CPU, the total amount and usage of the memory. A GPU resource collector can be deployed on each server to collect the total number of GPU chips on each server and the resource usage of each GPU chip. The remaining CPU resource amount can be calculated based on the above total amount and usage of the CPU. The remaining memory resource amount can be calculated based on the above total amount and usage of the content. Or if the above to-be-deployed algorithm container is not deployed for the first time, the deployment resource amount of the above to-be-deployed algorithm container can be determined based on the historical resource occupancy of the above to-be-deployed algorithm container. The remaining GPU resource amount can be calculated based on the total number of GPU chips and the resource usage of each GPU chip above. The above remaining CPU resource amount, remaining memory resource amount, and remaining GPU resource amount are combined to obtain the remaining resource amount of the above server.

[0057] The above deployment request may include the algorithm name, task name, task priority, task start time, task end time, etc. of the algorithm to be deployed. Based on the algorithm name and task name of the above deployment algorithm, the algorithm type of the above algorithm and the task type of the above task can be determined. According to the above algorithm type and task type, the CPU occupancy, GPU occupancy, and memory occupancy required when deploying the above algorithm to be deployed are estimated, and the above CPU occupancy, GPU occupancy, and memory occupancy are combined to obtain the above deployment resource amount. The above task priority can be understood as the urgency of the task, and the above task name can be understood as what task needs to be performed. For example, the above algorithm name may be a vehicle recognition algorithm, the above task name may be a vehicle recognition task, the above task priority can be set by the user, and the above task start time and task end time can also be set by the user.

[0058] 102. If the remaining resource amount of the server cannot meet the deployment resource amount of the algorithm container to be deployed, judge the releasable state of the algorithm containers already deployed in the server, and determine the releasable algorithm containers among the already deployed algorithm containers.

[0059] In the embodiment of the present invention, when the remaining resource amount of the above server is less than the deployment resource amount of the above algorithm container to be deployed, it means that the above algorithm container to be deployed cannot be deployed to the above server. At this time, it can be judged whether the algorithm containers already deployed in the above server can be deleted (which can also be understood as released, that is, the above releasable can be understood as deletable). Determine the already deployed algorithm containers that can be deleted as the above releasable algorithm containers.

[0060] Specifically, if the above already deployed algorithm container has been deployed in the above server but has not been used for a long time and there is no subsequent task arrangement, the above already deployed algorithm container can be determined as the above releasable algorithm container. Or if the above already deployed algorithm container has been used recently and has a time when it needs to be used next (i.e., the task start time), at this time, the time required for the above algorithm container to be deployed can be judged. According to the current time and the time required for the above algorithm container to be deployed, determine the task end time after the above algorithm container to be deployed is deployed and used. If the above task start time is later than the above task end time, the above already deployed algorithm container can also be determined as the above releasable algorithm container.

[0061] 103. Based on the releasable resource amount of the releasable algorithm container and the deployment resource amount of the algorithm container to be deployed, determine the algorithm container to be deleted among the releasable algorithm containers.

[0062] In an embodiment of the present invention, the above-mentioned releasable algorithm containers can be one or more. The above-mentioned releasable resource amount can be understood as follows: if the above-mentioned releasable algorithm containers are deleted from the above-mentioned server (which can also be understood as released or removed), the amount of remaining resources increased by the above-mentioned server is the above-mentioned releasable resource amount.

[0063] Specifically, the releasable resource amount of the releasable algorithm container can be added to the remaining resource amount of the above-mentioned server to obtain the remaining resource amount after addition. When the remaining resource amount after addition is greater than the deployment resource amount of the above-mentioned to-be-deployed algorithm container, the above-mentioned releasable algorithm container can be used as the above-mentioned to-be-deleted algorithm container.

[0064] More specifically, if there are multiple above-mentioned releasable algorithm containers and the remaining resource amount after addition is much greater than the deployment resource amount of the above-mentioned to-be-deployed algorithm container, it means that it is not necessary to delete all the multiple releasable algorithm containers. Only a part of the releasable algorithm containers can be deleted as long as the deployment resource amount of the above-mentioned to-be-deployed algorithm container can be satisfied. At this time, according to the algorithm names and task names corresponding to each of the above-mentioned releasable algorithm containers, the algorithm types and task types corresponding to each of the above-mentioned releasable algorithm containers can be determined. According to the above algorithm types and task types, the algorithm complexity of each of the above-mentioned releasable algorithm containers can be determined. According to the above algorithm complexity, each of the above-mentioned releasable algorithm containers is sorted. The higher the algorithm complexity of the releasable algorithm container, the higher its priority, and vice versa, the lower its priority. Starting from the lowest to the highest priority, the releasable resource amounts of each releasable algorithm container are added successively until the added releasable resource amount plus the above-mentioned remaining resource amount can satisfy the deployment resource amount of the above-mentioned to-be-deployed algorithm container, and then the addition stops. The releasable algorithm containers corresponding to the different releasable resource amounts used during the addition are used as the above-mentioned to-be-deleted algorithm containers.

[0065] 104. Delete the to-be-deleted algorithm container and deploy the to-be-deployed algorithm container to the server to obtain the deployed algorithm container.

[0066] In an embodiment of the present invention, the above-mentioned to-be-deleted algorithm container can be deleted in the above-mentioned server. After deletion, the remaining resource amount of the above-mentioned server can satisfy the deployment resource amount of the above-mentioned to-be-deployed algorithm container. Therefore, the above-mentioned to-be-deployed algorithm container can be deployed to the above-mentioned server to obtain the deployed algorithm container, and the corresponding algorithm task of the above-mentioned deployed algorithm container can be executed in the above-mentioned server based on the above-mentioned deployed algorithm container.

[0067] Specifically, the above deletion operation and deployment operation can be implemented based on the container orchestration and management tool Kubernetes. Specifically, the above algorithm container management platform can be built based on the container orchestration and management tool Kubernetes, which can provide a user with a visual web page, simplify operations such as the deployment, viewing, updating, upgrading, and deletion of the above algorithm containers, and at the same time can complete the management and scheduling of algorithm containers according to the current server resource usage and the resource usage of algorithm containers.

[0068] It should be noted that the server described in the embodiments of the present invention can be a single server or multiple servers (i.e., a server cluster). If it is a server cluster, the remaining resource amounts of each server in the above server cluster can be used to sort the priorities of each server. If the remaining resource amount of the above server is higher, the server priority of the above server is higher; conversely, the server priority of the above server weapon is lower. According to the above server priorities, it is sequentially determined whether the sum of the releasable resource amount of the releasable algorithm container of the server and the remaining resource amount of the above server meets the deployment resource amount of the to-be-deployed algorithm container.

[0069] Specifically, if the above server cluster includes a first server, a second server, and a third server, where the server priority of the first server is higher than that of the above second server, and the server priority of the second server is higher than that of the above third server. Then it can be preferentially determined whether the sum of the releasable resource amount of the releasable algorithm container of the first server and the remaining resource amount of the first server meets the deployment resource amount of the to-be-deployed algorithm container. If it meets, the releasable algorithm container in the first server can be deleted, and the to-be-deployed algorithm container can be deployed to the first server. At this time, the subsequent second server and the above third server do not need to be judged. If it does not meet, it can then be determined whether the sum of the releasable resource amount of the releasable algorithm container of the second server and the remaining resource amount of the second server meets the deployment resource amount of the to-be-deployed algorithm container. If it meets, the releasable algorithm container in the second server can be deleted, and the to-be-deployed algorithm container can be deployed to the second server. At this time, the subsequent above third server does not need to be judged. The subsequent judgment steps are the same as those of the first server and the second server, and the effects are the same. To avoid repetition and redundancy, they will not be elaborated here.

[0070] In an embodiment of the present invention, when a deployment request for an algorithm container to be deployed is received, the remaining resources of the server and the deployment resources of the algorithm container to be deployed are obtained; if the remaining resources of the server cannot meet the deployment resources of the algorithm container to be deployed, the releasable status of the algorithm containers already deployed in the server is judged, and the releasable algorithm containers are determined from the already deployed algorithm containers; based on the releasable resources of the releasable algorithm containers and the deployment resources of the algorithm container to be deployed, the algorithm containers to be deleted are determined from the releasable algorithm containers; the algorithm containers to be deleted are deleted, and the algorithm container to be deployed is deployed to the server to obtain the already deployed algorithm containers. When a deployment request for an algorithm container to be deployed is received, the remaining resources of the server and the deployment resources of the algorithm container to be deployed are obtained. When the remaining resources do not meet the deployment resources, the releasable status of the algorithm containers already deployed in the server is judged, the releasable algorithm containers are determined, the algorithm containers to be deleted are determined according to the releasable resources of the releasable algorithm containers and the deployment resources, the algorithm containers to be deleted are deleted in the server, and the algorithm container to be deployed is deployed. By comprehensively analyzing the already deployed algorithm containers and judging their releasable status, the already deployed algorithm containers can be automatically deleted, thereby improving the efficiency of algorithm container management.

[0071] Optionally, in the step of judging the releasable status of the algorithm containers already deployed in the server and determining the releasable algorithm containers, the task status and deployment information of the algorithm containers already deployed in the server can also be obtained; based on the task status, among the already deployed algorithm containers, the already deployed algorithm containers that are not executing algorithm tasks and have no task information are judged as candidate releasable algorithm containers; based on the deployment information, the releasable algorithm containers are determined from the candidate releasable algorithm containers.

[0072] In an embodiment of the present invention, the above task status may include the current status of whether the already deployed algorithm container is running a task and the algorithm task that needs to be executed for running the above task. The above deployment information may include the deployment time of deploying the already deployed algorithm container to the above server and the resources occupied by the already deployed algorithm container on the above server after being deployed to the above server (i.e., the deployment resources). The above task information can be understood as the subsequent plan of the already deployed algorithm container after the current time. The above task information may include the start time of the task to be executed subsequently, the end time of the task, the task name, the algorithm name, the task priority, etc. The already deployed algorithm container that is not executing an algorithm task and has no task information can be understood as an already deployed algorithm container that is not currently executing an algorithm task and has no subsequent task arrangement.

[0073] When the task start time and task end time in the task information corresponding to the above-deployed algorithm container are empty, it indicates that there is no task information for the above-deployed algorithm container. When the task status of the above-deployed algorithm container is not executing an algorithm task, it means that the above-deployed algorithm container is not currently executing an algorithm task. Then, the above-deployed algorithm container can be used as a candidate algorithm container to be released. According to the above deployment information, in the above candidate algorithm containers to be released, determine the priority ranking of each candidate algorithm container to be released. According to the above priority ranking, in the above candidate containers to be released, extract the above algorithm containers to be released in ascending order of priority ranking.

[0074] Optionally, in the step of determining the algorithm container to be deleted from the algorithm containers to be released based on the amount of releasable resources of the algorithm containers to be released and the amount of deployment resources of the algorithm containers to be deployed, it is also possible that when there is a single algorithm container to be released, add the amount of releasable resources of the algorithm container to be released to the remaining resources of the server, and then compare the sum with the amount of deployment resources of the algorithm container to be deployed. When the sum of the amount of releasable resources of the algorithm container to be released and the remaining resources of the server is greater than the amount of deployment resources of the algorithm container to be deployed, use the algorithm container to be released as the algorithm container to be deleted; when there are multiple algorithm containers to be released, add the amount of releasable resources of each algorithm container to be released to the remaining resources of the server to obtain the sum of the amount of releasable resources of each algorithm container to be released and the remaining resources of the server, which is the added remaining resource amount; compare the added remaining resource amount with the amount of deployment resources of the algorithm container to be deployed, and use any algorithm container to be released corresponding to the added remaining resource amount that is greater than the amount of deployment resources of the algorithm container to be deployed as the algorithm container to be deleted; if the added remaining resource amounts are all less than the amount of deployment resources of the algorithm container to be deployed, calculate the total amount of releasable resources of each algorithm container to be released. When the sum of the total amount of releasable resources and the remaining resources of the server is greater than the amount of deployment resources of the algorithm container to be deployed, use each algorithm container to be released as the algorithm container to be deleted.

[0075] In an embodiment of the present invention, when there is a single releasable algorithm container, it indicates that there is only one deployed algorithm container in the server or there is only one deployed algorithm container that is not currently executing an algorithm task and has no task information. At this time, the releasable resource amount of the releasable algorithm container can be added to the remaining resource amount of the server and then compared with the deployment resource amount of the to-be-deployed algorithm container. When the sum of the releasable resource amount of the releasable algorithm container and the remaining resource amount of the server is greater than the deployment resource amount of the to-be-deployed algorithm container, it means that only the single releasable algorithm container needs to be used as the to-be-deleted algorithm container, and the to-be-deleted algorithm container is deleted in the server. After deletion, the remaining resource amount of the server can satisfy the deployment resource amount of the to-be-deployed algorithm container. At this time, the to-be-deployed algorithm container can be deployed to the server.

[0076] When there are multiple releasable algorithm containers, the sum of the releasable resource amount of each releasable algorithm container and the remaining resource amount of the server can be calculated to obtain the added remaining resource amount. If at least one added remaining resource amount is greater than the deployment resource amount of the to-be-deployed algorithm container, the releasable algorithm container corresponding to the at least one added remaining resource amount can be used as the to-be-deleted algorithm container, and the to-be-deleted algorithm container is deleted in the server. After deletion, the remaining resource amount of the server can satisfy the deployment resource amount of the to-be-deployed algorithm container. At this time, the to-be-deployed algorithm container can be deployed to the server.

[0077] When the sum of the added remaining resource amount and the remaining resource amount of the server is less than the deployment resource amount of the to-be-deployed algorithm container, it means that deleting only a single releasable algorithm container cannot satisfy the deployment resource amount of the to-be-deployed algorithm container. At this time, the releasable resource amounts of multiple releasable algorithm containers can be added to obtain the total releasable resource amount that can be freed up after deleting the multiple releasable algorithm containers in the server. When the sum of the total releasable resource amount and the remaining resource amount of the server is greater than the deployment resource amount of the to-be-deployed algorithm container, it means that multiple releasable algorithm containers can be deleted simultaneously in the server to satisfy the deployment resource amount of the to-be-deployed algorithm container.

[0078] Optionally, in the step of using each releasable algorithm container as the to-be-deleted algorithm container when the sum of the total releasable resource amount and the remaining resource amount of the server is greater than the deployment resource amount of the to-be-deployed algorithm container, the priority ranking of the deployed algorithm containers in the server can also be determined based on the deployment time and deployment resource amount of the deployed algorithm containers in the server; among each releasable algorithm container, the releasable algorithm container that meets the to-be-deployed resource amount required for the to-be-deployed algorithm container is extracted according to the priority ranking as the to-be-deleted algorithm container.

[0079] In an embodiment of the present invention, the above deployment information includes the deployment time when the algorithm containers already deployed in the server are deployed to the server and the amount of deployment resources used during deployment. The above deployment time can be understood as the time point after the completion of the deployment of the above already deployed algorithm containers to the above server. The amount of deployment resources used during deployment can be understood as the amount of resources of the above server occupied when the above already deployed algorithm containers are deployed to the above server.

[0080] Specifically, the longer the deployment time of the above already deployed algorithm containers, the lower the priority ranking of the above already deployed algorithm containers, and the shorter the deployment time, the higher the priority ranking of the above already deployed algorithm containers. It can be understood that the higher the ranking of the already deployed algorithm containers, the less likely they can be easily deleted. On the contrary, they can be relatively deleted. It should be noted that if the deployment time of the above already deployed algorithm containers is short, it means that the above already deployed algorithm containers were deployed recently and their usage rate is relatively high. Therefore, their priority can be relatively high.

[0081] If the deployment time of the above already deployed algorithm containers is long, it means that the above already deployed algorithm containers were deployed a long time ago and their usage rate is relatively low (that is, they may be algorithm containers that have been deployed for a long time but have not been used and not deleted). Therefore, their priority can be relatively low.

[0082] The above already deployed algorithm containers can be sorted according to the above deployment time, and a deployment time sorting table can be constructed. The above deployment time sorting table includes the already deployed algorithm containers sorted by deployment time.

[0083] The already deployed algorithm containers sorted by deployment time in the above deployment time sorting table are sorted according to the amount of deployment resources used during the above deployment to obtain the priority ranking of the above already deployed algorithm containers. It should be noted that if the amount of deployment resources used when the above already deployed algorithm containers are deployed is high, it means that if the above already deployed algorithm containers are deleted from the above server and then the above already deployed algorithm containers need to be redeployed if they are to be used again later, a large amount of deployment resources will be consumed and the deployment time may be relatively long. Therefore, their priority is relatively high. On the contrary, the priority is relatively low.

[0084] According to the above priority ranking, among the above releasable algorithm containers, the releasable algorithm containers that meet the amount of deployment resources required for the above algorithm containers to be deployed are extracted as the above algorithm containers to be deleted, so as to avoid deleting too many already deployed algorithm containers, which not only wastes time but also occupies a relatively large amount of resources when performing the deletion task.

[0085] Optionally, in the step of determining the algorithm container to be deleted in the releasable algorithm container based on the releasable resource amount of the releasable algorithm container and the deployment resource amount of the algorithm container to be deployed, when the sum of the total releasable resource amount and the remaining resource amount of the server is less than the deployment resource amount of the algorithm container to be deployed, the task start time of each deployed algorithm container with task information can be determined from the deployed algorithm containers based on the task status; based on the task start time of each deployed algorithm container with task information and the task end time of the algorithm container to be deployed, the releasable algorithm container with task information can be determined from the deployed algorithm containers with task information; based on the releasable resource amount of each releasable algorithm container with task information and the releasable resource amount of each releasable algorithm container, the second total releasable resource amount can be determined; when the sum of the second total releasable resource amount and the remaining resource amount of the server is greater than the deployment resource amount of the algorithm container to be deployed, then each releasable algorithm container with task information and each releasable algorithm container can be used as the algorithm container to be deleted.

[0086] In the embodiment of the present invention, it can be understood that the releasable algorithm container corresponding to the above total releasable resource amount is an algorithm container that is not executing an algorithm task and has no task information. When the sum of the above total releasable resource amount and the remaining resource amount of the server still cannot meet the deployment resource amount of the above algorithm container to be deployed, then the deployed algorithm container with task information can be determined according to the task information of the deployed algorithm container. It can be understood that although the deployed algorithm container with task information has task information, it is not currently executing an algorithm task.

[0087] The task end time of the above algorithm container to be deployed can be understood as follows: If at the current moment, the above algorithm container to be deployed is deployed to the above server and the algorithm task is executed, at the time point after the algorithm task is completed, the task information of the above deployed algorithm container can include information such as algorithm name, task name, task start time, and task end time. According to the above task information, the deployed algorithm container corresponding to the task start time later than the task end time of the above algorithm container to be deployed can be screened out from the above deployed algorithm containers as the above releasable algorithm container with task information. The releasable resource amount of each releasable algorithm container with task information and the releasable resource amount of each releasable algorithm container are added to obtain the second total releasable resource amount. When the sum of the second total releasable resource amount and the remaining resource amount of the server is greater than the deployment resource amount of the algorithm container to be deployed, it means that the above releasable algorithm container and the releasable algorithm container with task information can be used as the algorithm container to be deleted. Deleting the above algorithm container to be deleted in the above server can deploy the above algorithm container to be deployed to the above server.

[0088] Optionally, in the step of taking each releasable algorithm container with task information and each releasable algorithm container as the algorithm containers to be deleted, the remaining deployment resource amount required for the to-be-deployed algorithm container can also be calculated based on the releasable resource amount of each releasable algorithm container and the deployment resource amount of the to-be-deployed algorithm container; based on the task start time, determine the time priority ranking of the candidate releasable algorithm containers with task information; based on the priority ranking and the time priority ranking, screen out the releasable algorithm containers with task information that meet the remaining deployment resource amount from the candidate releasable algorithm containers with task information; take the releasable algorithm containers with task information that meet the remaining deployment resource amount and the releasable algorithm containers as the algorithm containers to be deleted.

[0089] In the embodiment of the present invention, the remaining deployment resource amount required for the to-be-deployed algorithm container can be obtained by subtracting the releasable resource amount of each of the above-mentioned releasable algorithm containers and the remaining resource amount of the above-mentioned server from the deployment resource amount of the to-be-deployed algorithm container. Sort each candidate releasable algorithm container with task information according to the task start time of each candidate releasable algorithm container with task information to obtain the above-mentioned time priority ranking. It should be noted that the lower the priority of the candidate releasable algorithm container with text information whose task start time is later, and vice versa. The sooner or later of the time is based on the time point of the current moment. The farther the time point is from the current time, the later the time, and vice versa. It can be understood that if the candidate releasable algorithm container with text information whose task start time is later is deleted, the more time is available for redeploying the candidate releasable algorithm container with text information whose task start time is later subsequently, and vice versa, so the lower the priority of the candidate releasable algorithm container with text information whose task start time is later, and vice versa.

[0090] Specifically, the candidate releasable algorithm containers with task information can be sorted in ascending order according to the above-mentioned time priority ranking to obtain a candidate priority ranking table, and the ranking of the candidate time ranking table can be adjusted through the above-mentioned priority ranking to obtain a priority ranking table. In the above-mentioned priority ranking table, the candidate releasable algorithm containers with task information are sequentially extracted in ascending order of priority until the remaining deployment resource amount is met, and then the extraction is stopped to obtain the releasable algorithm containers with task information, and the releasable algorithm containers with task information and the releasable algorithm containers are used as the above-mentioned algorithm containers to be deleted.

[0091] As Figure 2 shown, Figure 2 is a flowchart of another algorithm container management method provided by the embodiment of the present invention. In Figure 2It includes an algorithm container management platform, a server cluster, an algorithm container screening module, and a resource monitoring platform.

[0092] Among them, the resource monitoring platform regularly and continuously collects the usage of server resources. The algorithm screening module queries the data in the resource monitoring platform to calculate the list of algorithm containers that can be released. When the algorithm container management platform receives a request to deploy an algorithm, it first queries the remaining server resources (i.e., the remaining resources of the above-mentioned server) through the resource monitoring platform. When the server resources are insufficient, it automatically deletes the algorithm and releases sufficient resources according to the list of algorithm containers that can be released obtained by the above-mentioned algorithm container screening module to complete the scheduling and deployment of the new algorithm.

[0093] Specifically, the process of the above-mentioned algorithm container screening module may include:

[0094] In the first step, obtain the CPU, memory, and GPU resources required by the new algorithm container to be deployed (i.e., the above-mentioned algorithm container to be deployed), query the remaining CPU, memory, and GPU resources of each server in the resource monitoring platform, sort each server according to the remaining resource amount, and place the server with the most remaining resource amount at the top, and then execute the second step below;

[0095] In the second step, the above-mentioned algorithm container management platform queries the information of all algorithm containers running on the current server from the resource monitoring platform and places all algorithm containers in the first screening list. Exclude the algorithm containers in which algorithm tasks are running and the current GPU usage is greater than 0 from the first screening list. If the first screening list is empty after exclusion, it means that all algorithm containers on the current server are executing algorithm tasks and there are no algorithm containers that can be deleted, and then jump to the seventh step below. If the first screening list is not empty after exclusion, then execute the third step below;

[0096] In the third step, in the first screening list after exclusion in the second step, query whether there are algorithm containers (i.e., the already deployed algorithm containers) whose CPU, memory, and GPU usage meet the deployment resource amount of the algorithm container to be deployed. If there are algorithm containers that meet the deployment resource amount of the algorithm container to be deployed, then construct a second screening list according to the algorithm containers that meet the deployment resource amount of the algorithm container to be deployed, and execute the fourth step below according to the second screening list. If there are no algorithm containers that meet the deployment resource amount of the algorithm container to be deployed, then execute the fourth step below according to the first screening list;

[0097] Step 4: In the first screening list or the second screening list, query whether there is an algorithm container with an empty task. If not, the screening list remains unchanged (i.e., it can be the first screening list or the second screening list, specifically determined according to the above Step 3) and continue to execute the following Step 5. If there is, sort the first screening list or the second screening list according to the algorithm priority and content usage. The algorithm container with a low algorithm priority and a large content usage has the lowest priority. Remove the queried algorithm container from the first screening list or the second screening list to obtain the third screening list. Add the removed algorithm container to the releasable list, and calculate whether the total CPU, memory, and GPU resources of the releasable list have exceeded the shortage of resources obtained by subtracting the remaining resources of the above server from the above to-be-deployed algorithm container. If exceeded, jump to the following Step 6. If not exceeded, execute the following Step 5;

[0098] Step 5: All the algorithm containers in the third screening list obtained after Step 4 have task information. Query in the third screening list whether there is an algorithm container whose task start time is later than the task end time of the to-be-deployed algorithm container. If there is, extract the algorithm container with a lower algorithm priority and a larger memory usage from the third screening list according to the algorithm priority and content usage and add it to the fourth screening list. The algorithm container with a low algorithm priority and a large memory usage in the above fourth screening list has the lowest priority, and vice versa. The above algorithm priority can be determined according to the complexity of the algorithms in the above algorithm containers. The more complex the algorithm, the higher the algorithm priority, and vice versa. From the fourth releasable list, calculate the total CPU, memory, and GPU resources of the algorithm containers in the above fourth screening list and add them to the remaining resources of the above server. If the deployment resource amount of the to-be-deployed algorithm container is satisfied, it can jump to Step 6. Otherwise, continue to execute the following judgment.

[0099] If the sum of the total CPU, memory, and GPU resources of the algorithm containers in the above fourth screening list and the remaining resources of the above server does not satisfy the deployment resource amount of the to-be-deployed algorithm container, extract the algorithm container with a later task start time from the above third screening list according to the task start time of the algorithm container, add it to the fourth screening list, and recalculate the sum of the total CPU, memory, and GPU resources of the algorithm containers in the above fourth screening list and the remaining resources of the above server. If the deployment resource amount of the to-be-deployed algorithm container is satisfied, it can execute the following Step 6. Otherwise, execute the following Step 7;

[0100] Step 6: Return the list of releasable algorithm containers to the algorithm container management platform;

[0101] Step 7: If no suitable list of releasable algorithm containers is screened, jump to Step 2 and continue to screen the algorithm containers on the next server;

[0102] Step 8: Return an empty list of algorithm containers to the algorithm container management platform.

[0103] As Figure 3 shown, an embodiment of the present invention further provides a flowchart of a resource monitoring method. The above resource monitoring method can be deployed on the above Figure 2 resource monitoring platform, Figure 3 which includes a server resource collector, a GPU resource collector, an algorithm container resource collector, an algorithm container management platform, a server monitoring data aggregator, and an algorithm container monitoring data aggregator, all of which are connected to the resource monitoring platform in the figure:

[0104] Among them, the above server resource collector, GPU resource collector, algorithm container resource collector, and algorithm container management platform are deployed on each server. Through the above aggregator, the data collected by the corresponding collectors is aggregated into a monitoring metric, and the aggregated monitoring metric can contain full information.

[0105] The specific process includes:

[0106] Step 1: Deploy a server resource collector on each server in the server cluster to collect the IP of each server, as well as the total amount and usage of CPU and the total amount and usage of memory;

[0107] Step 2: Deploy a GPU resource collector on each server to collect the total number of GPU chips on each server and the resource usage of each GPU chip;

[0108] Step 3: Deploy an algorithm container resource collector on each server to collect the CPU usage and memory usage of each algorithm container;

[0109] Step 4: Call the HTTP interface of the algorithm container management platform to obtain the basic information of the algorithm, including the algorithm name, task name, task priority, task start time, task end time, etc.;

[0110] Step 5: The server monitoring data aggregator respectively obtains data from the server resource collector deployed in Step 1 and the CPU resource collector deployed in Step 2 to obtain the remaining CPU quantity, remaining memory quantity, and remaining GPU chip quantity of each server;

[0111] Step 6: The algorithm container monitoring data aggregator respectively obtains data from the GPU resource collector deployed in Step 2, the algorithm container resource collector deployed in Step 3, and the interface called in Step 4 to obtain the currently used CPU quantity, used memory quantity, used GPU chip ID, and GPU usage of each algorithm container. Each piece of monitoring data contains detailed information such as the algorithm name and task information;

[0112] In the seventh step, the resource monitoring platform regularly obtains the aggregated monitoring data from the server monitoring data aggregator in the fifth step and the algorithm container monitoring data aggregator in the sixth step every 15 seconds, and saves it.

[0113] It should be noted that the above server resource monitoring data is mainly used to obtain the remaining CPU, memory, and GPU quantities of each server, and is used to subsequently determine whether the server has sufficient resources to deploy new algorithms.

[0114] The above algorithm container resource monitoring data is mainly used to obtain the current and historical CPU, memory, and GPU usage of each algorithm container. At the same time, each data metric contains detailed information such as the algorithm name, task name, task priority, task start time, and task end time of the algorithm container, which facilitates the subsequent quick calculation of the total score and priority of the algorithm container (i.e., the above algorithm priority).

[0115] As Figure 4 shown, the embodiment of the present invention also provides a flowchart of another algorithm container management method, including the following steps:

[0116] In the first step, the user deploys a new algorithm in the algorithm container platform;

[0117] In the second step, the algorithm container platform queries the resource monitoring platform to determine whether the server cluster has sufficient resources to deploy the new algorithm;

[0118] In the third step, if the server cluster has sufficient resources to deploy the new algorithm, then jump to the seventh step below;

[0119] In the fourth step, if the server cluster does not have sufficient resources to deploy the new algorithm, then query the algorithm container screening module to determine whether there are any algorithm containers that can be released;

[0120] In the fifth step, if there are algorithm containers that can be released, then delete some algorithm containers to release sufficient CPU, memory, and GPU resources. And jump to the seventh step below;

[0121] In the sixth step, if there are no algorithm containers that can be released, then return an error message of insufficient resources to the user interface and jump to the eighth step below;

[0122] In the seventh step, deploy the algorithm and jump to the eighth step;

[0123] In the eighth step, end.

[0124] As Figure 5 shown, the embodiment of the present invention also provides a schematic structural diagram of an algorithm container management system, Figure 5 which includes: an algorithm container management device and a server; the above algorithm container management device consists of asFigure 6 It is determined by the algorithm container management device shown. It can be understood that the above-mentioned server can be one or more. When there are multiple servers, the above-mentioned servers can be a server cluster.

[0125] As Figure 6 shown, an embodiment of the present invention further provides an algorithm container management device, and the algorithm container management device includes:

[0126] An acquisition module 601, configured to acquire the remaining resources of the server and the deployment resources of the algorithm container to be deployed when receiving a deployment request for the algorithm container to be deployed;

[0127] A judgment module 602, configured to judge the releasable state of the algorithm containers already deployed in the server when the remaining resources of the server cannot meet the deployment resources of the algorithm container to be deployed, and determine the releasable algorithm containers among the already deployed algorithm containers;

[0128] A determination module 603, configured to determine the algorithm containers to be deleted among the releasable algorithm containers based on the releasable resources of the releasable algorithm containers and the deployment resources of the algorithm container to be deployed;

[0129] A deletion module 604, configured to delete the algorithm containers to be deleted, and deploy the algorithm container to be deployed to the server to obtain the already deployed algorithm containers.

[0130] Optionally, the judgment module 602 includes:

[0131] An acquisition sub-module, configured to acquire the task status and deployment information of the algorithm containers already deployed in the server;

[0132] A first judgment sub-module, configured to judge, among the already deployed algorithm containers, the already deployed algorithm containers that are not executing algorithm tasks and have no task information based on the task status, and use them as candidate releasable algorithm containers;

[0133] A first determination sub-module, configured to determine the releasable algorithm containers among the candidate releasable algorithm containers based on the deployment information.

[0134] Optionally, the determination module 603 includes:

[0135] The first comparison sub-module is used to, if there is a single releasable algorithm container, add the releasable resource amount of the releasable algorithm container to the remaining resource amount of the server, and then compare the sum with the deployment resource amount of the to-be-deployed algorithm container. When the sum of the releasable resource amount of the releasable algorithm container and the remaining resource amount of the server is greater than the deployment resource amount of the to-be-deployed algorithm container, the releasable algorithm container is used as the algorithm container to be deleted;

[0136] The second comparison sub-module is used to, if there are multiple releasable algorithm containers, add the releasable resource amount of each releasable algorithm container in the multiple releasable algorithm containers to the remaining resource amount of the server to obtain the added remaining resource amount obtained by adding the releasable resource amount of each releasable algorithm container and the remaining resource amount of the server;

[0137] The third comparison sub-module is used to compare the added remaining resource amount with the deployment resource amount of the to-be-deployed algorithm container, and use any releasable algorithm container corresponding to the added remaining resource amount that is greater than the deployment resource amount of the to-be-deployed algorithm container in each releasable algorithm container as the algorithm container to be deleted;

[0138] The first calculation sub-module is used to, if the added remaining resource amounts are all less than the deployment resource amount of the to-be-deployed algorithm container, calculate the total releasable resource amount of each of the releasable algorithm containers. When the sum of the total releasable resource amount and the remaining resource amount of the server is greater than the deployment resource amount of the to-be-deployed algorithm container, each of the releasable algorithm containers is used as the algorithm container to be deleted.

[0139] Optionally, the first calculation sub-module includes:

[0140] The first determination unit is used to determine the priority ranking of the algorithm containers already deployed in the server based on the deployment time and the deployment resource amount of the algorithm containers already deployed in the server;

[0141] The first extraction unit is used to extract, from each of the releasable algorithm containers, the releasable algorithm containers that meet the to-be-deployed resource amount of the to-be-deployed algorithm container according to the priority ranking as the algorithm containers to be deleted.

[0142] Optionally, the determination module 603 further includes:

[0143] The second determination sub-module is used to, when the sum of the total releasable resource amount and the remaining resource amount of the server is less than the deployment resource amount of the to-be-deployed algorithm container, determine the task start time of each of the already deployed algorithm containers with task information among the already deployed algorithm containers based on the task status;

[0144] A third determination sub-module, configured to determine, from the deployed algorithm containers with task information, the releasable algorithm containers with task information based on the task start times of the deployed algorithm containers with each piece of task information and the task end time of the to-be-deployed algorithm container;

[0145] A fourth determination sub-module, configured to determine a second total releasable resource amount based on the releasable resource amounts of each of the releasable algorithm containers with task information and the releasable resource amounts of each of the releasable algorithm containers;

[0146] A second judgment sub-module, configured to, when the sum of the second total releasable resource amount and the remaining resource amount of the server is greater than the deployment resource amount of the to-be-deployed algorithm container, use each of the releasable algorithm containers with task information and each of the releasable algorithm containers as the algorithm containers to be deleted.

[0147] Optionally, the second judgment sub-module includes:

[0148] A first calculation unit, configured to calculate a remaining deployment resource amount required for the to-be-deployed algorithm container based on the releasable resource amounts of each of the releasable algorithm containers and the deployment resource amount of the to-be-deployed algorithm container;

[0149] A second determination unit, configured to determine a time priority ranking of the releasable algorithm containers with candidate task information based on the task start time;

[0150] A first screening unit, configured to screen out, from the candidate releasable algorithm containers with task information, the releasable algorithm containers with task information that meet the remaining deployment resource amount based on the priority ranking and the time priority ranking;

[0151] A first judgment unit, configured to use the releasable algorithm containers with task information that meet the remaining deployment resource amount and the releasable algorithm containers as the algorithm containers to be deleted.

[0152] As Figure 7 shown, an embodiment of the present invention further provides an electronic device, including a processor, and the above-mentioned processor can execute any one of the above-mentioned algorithm container management methods.

[0153] Specifically, it includes a processor 701, a memory 702, and a computer program for executing the algorithm container management method stored in the memory 702 and capable of running on the processor 701, where:

[0154] The processor 701 runs the calculator program of the algorithm container management method stored in the memory 702 and executes the following steps:

[0155] When receiving a deployment request for an algorithm container to be deployed, obtain the remaining resources of the server and the deployment resources of the algorithm container to be deployed;

[0156] If the remaining resources of the server cannot meet the deployment resources of the algorithm container to be deployed, judge the releasable status of the algorithm containers already deployed in the server, and determine the releasable algorithm containers among the already deployed algorithm containers;

[0157] Based on the releasable resources of the releasable algorithm containers and the deployment resources of the algorithm container to be deployed, determine the algorithm containers to be deleted among the releasable algorithm containers;

[0158] Delete the algorithm containers to be deleted, and deploy the algorithm container to be deployed to the server to obtain the deployed algorithm containers.

[0159] Optionally, the judgment on the releasable status of the algorithm containers already deployed in the server by the processor 701 to determine the releasable algorithm containers includes:

[0160] Obtain the task status and deployment information of the algorithm containers already deployed in the server;

[0161] Based on the task status, among the already deployed algorithm containers, judge the already deployed algorithm containers that are not executing algorithm tasks and have no task information as candidate releasable algorithm containers;

[0162] Based on the deployment information, determine the releasable algorithm containers among the candidate releasable algorithm containers.

[0163] Optionally, the determination of the algorithm containers to be deleted among the releasable algorithm containers by the processor 701 based on the releasable resources of the releasable algorithm containers and the deployment resources of the algorithm container to be deployed includes:

[0164] If there is a single releasable algorithm container, then add the releasable resources of the releasable algorithm container to the remaining resources of the server, and compare the sum with the deployment resources of the algorithm container to be deployed. When the sum of the releasable resources of the releasable algorithm container and the remaining resources of the server is greater than the deployment resources of the algorithm container to be deployed, use the releasable algorithm container as the algorithm container to be deleted;

[0165] If there are multiple releasable algorithm containers, then for each releasable algorithm container among the multiple releasable algorithm containers, add the amount of releasable resources of the releasable algorithm container to the remaining resources of the server to obtain the added remaining resources obtained by adding the amount of releasable resources of each releasable algorithm container to the remaining resources of the server;

[0166] Compare the added remaining resources with the deployment resources of the algorithm container to be deployed, and use any releasable algorithm container corresponding to the added remaining resources that is greater than the deployment resources of the algorithm container to be deployed as the algorithm container to be deleted;

[0167] If the added remaining resources are all less than the deployment resources of the algorithm container to be deployed, then calculate the total releasable resources of each of the releasable algorithm containers. When the sum of the total releasable resources and the remaining resources of the server is greater than the deployment resources of the algorithm container to be deployed, use each of the releasable algorithm containers as the algorithm container to be deleted.

[0168] Optionally, the deployment information executed by the processor 701 includes the deployment time when the algorithm containers already deployed in the server were deployed to the server and the amount of deployment resources used during deployment. When the sum of the total releasable resources and the remaining resources of the server is greater than the deployment resources of the algorithm container to be deployed, using each of the releasable algorithm containers as the algorithm container to be deleted includes:

[0169] Based on the deployment time and the amount of deployment resources of the algorithm containers already deployed in the server, determine the priority ranking of the algorithm containers already deployed in the server;

[0170] Among each of the releasable algorithm containers, extract the releasable algorithm containers that meet the required amount of deployment resources of the algorithm container to be deployed according to the priority ranking as the algorithm containers to be deleted.

[0171] Optionally, when the processor 701 determines the algorithm container to be deleted among the releasable algorithm containers based on the releasable resources of the releasable algorithm container and the deployment resources of the algorithm container to be deployed, it further includes:

[0172] When the sum of the total releasable resources and the remaining resources of the server is less than the deployment resources of the algorithm container to be deployed, then based on the task status, determine the task start time of each of the deployed algorithm containers with task information among the deployed algorithm containers;

[0173] Based on the task start times of the deployed algorithm containers with each piece of the task information and the task end time of the to-be-deployed algorithm container, determine the releasable algorithm containers with task information among the deployed algorithm containers with task information;

[0174] Based on the releasable resource amounts of each of the releasable algorithm containers with task information and the releasable resource amounts of each of the releasable algorithm containers, determine the second total releasable resource amount;

[0175] When the sum of the second total releasable resource amount and the remaining resource amount of the server is greater than the deployment resource amount of the to-be-deployed algorithm container, then use each of the releasable algorithm containers with task information and each of the releasable algorithm containers as the algorithm containers to be deleted.

[0176] Optionally, the using each of the releasable algorithm containers with task information and each of the releasable algorithm containers as the algorithm containers to be deleted, which is executed by the processor 701, includes:

[0177] Based on the releasable resource amount of each of the releasable algorithm containers and the deployment resource amount of the to-be-deployed algorithm container, calculate the remaining deployment resource amount that the to-be-deployed algorithm container still needs;

[0178] Based on the task start time, determine the time priority ranking of the candidate releasable algorithm containers with task information;

[0179] Based on the priority ranking and the time priority ranking, screen out the releasable algorithm containers with task information that meet the remaining deployment resource amount among the candidate releasable algorithm containers with task information;

[0180] Use the releasable algorithm containers with task information that meet the remaining deployment resource amount and the releasable algorithm containers as the algorithm containers to be deleted.

[0181] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it realizes each process of the algorithm container management method or the application-side algorithm container management method provided by the embodiment of the present invention, and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.

[0182] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above various methods. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.

[0183] The above-disclosed are only the preferred embodiments of the present invention. Of course, the scope of the rights of the present invention cannot be limited thereby. Therefore, equivalent changes made according to the claims of the present invention still fall within the scope covered by the present invention.

Claims

1. An algorithm container management method, characterized in that, The method includes the following steps: When receiving a deployment request for an algorithm container to be deployed, obtain the remaining resources of the server and the deployment resources of the algorithm container to be deployed; If the remaining resources of the server cannot meet the deployment resources of the algorithm container to be deployed, judge the releasable status of the algorithm containers already deployed on the server, and determine the releasable algorithm containers among the already deployed algorithm containers; Based on the releasable resources of the releasable algorithm containers and the deployment resources of the algorithm container to be deployed, determine the algorithm containers to be deleted among the releasable algorithm containers; Delete the algorithm containers to be deleted, and deploy the algorithm container to be deployed to the server to obtain the deployed algorithm containers.

2. The algorithm container management method according to claim 1, wherein The judgment of the releasable status of the algorithm containers already deployed on the server to determine the releasable algorithm containers includes: Obtain the task status and deployment information of the algorithm containers already deployed on the server; Based on the task status, among the already deployed algorithm containers, judge the already deployed algorithm containers that are not executing algorithm tasks and have no task information as candidate releasable algorithm containers; Based on the deployment information, determine the releasable algorithm containers among the candidate releasable algorithm containers.

3. The algorithm container management method according to claim 2, wherein The determination of the algorithm containers to be deleted among the releasable algorithm containers based on the releasable resources of the releasable algorithm containers and the deployment resources of the algorithm container to be deployed includes: If there is a single releasable algorithm container, then add the releasable resources of the releasable algorithm container to the remaining resources of the server, and compare the sum with the deployment resources of the algorithm container to be deployed. When the sum of the releasable resources of the releasable algorithm container and the remaining resources of the server is greater than the deployment resources of the algorithm container to be deployed, use the releasable algorithm container as the algorithm container to be deleted; If there are multiple releasable algorithm containers, then add the releasable resources of each releasable algorithm container to the remaining resources of the server to obtain the sum of the releasable resources of each releasable algorithm container and the remaining resources of the server, which is the added remaining resources; Compare the added remaining resources with the deployment resources of the algorithm container to be deployed, and use any one of the releasable algorithm containers corresponding to the added remaining resources that is greater than the deployment resources of the algorithm container to be deployed as the algorithm container to be deleted; If the added remaining resources are all less than the deployment resources of the algorithm container to be deployed, then calculate the total releasable resources of each of the releasable algorithm containers. When the sum of the total releasable resources and the remaining resources of the server is greater than the deployment resources of the algorithm container to be deployed, use each of the releasable algorithm containers as the algorithm container to be deleted.

4. The algorithm container management method according to claim 3, wherein, The deployment information includes the deployment time when the algorithm containers already deployed in the server are deployed to the server and the amount of deployment resources used during deployment. When the sum of the total releasable resources and the remaining resources of the server is greater than the deployment resources of the to-be-deployed algorithm container, taking each of the releasable algorithm containers as the algorithm container to be deleted includes: Determining the priority ranking of the algorithm containers already deployed in the server based on the deployment time and the amount of deployment resources of the algorithm containers already deployed in the server; Among each of the releasable algorithm containers, extracting the releasable algorithm containers that meet the deployment resources required for the to-be-deployed algorithm container according to the priority ranking as the algorithm containers to be deleted.

5. The algorithm container management method according to claim 3, wherein, Determining the algorithm containers to be deleted among the releasable algorithm containers based on the releasable resources of the releasable algorithm containers and the deployment resources of the to-be-deployed algorithm container further includes: When the sum of the total releasable resources and the remaining resources of the server is less than the deployment resources of the to-be-deployed algorithm container, determining the task start time of each of the deployed algorithm containers with task information among the deployed algorithm containers based on the task status; Determining the releasable algorithm containers with task information among the deployed algorithm containers with task information based on the task start time of each of the deployed algorithm containers with task information and the task end time of the to-be-deployed algorithm container; Determining the second total releasable resources based on the releasable resources of each of the releasable algorithm containers with task information and the releasable resources of each of the releasable algorithm containers; When the sum of the second total releasable resources and the remaining resources of the server is greater than the deployment resources of the to-be-deployed algorithm container, taking each of the releasable algorithm containers with task information and each of the releasable algorithm containers as the algorithm containers to be deleted.

6. The algorithm container management method according to claim 5, wherein, Taking each of the releasable algorithm containers with task information and each of the releasable algorithm containers as the algorithm containers to be deleted includes: Calculating the remaining deployment resources required for the to-be-deployed algorithm container based on the releasable resources of each of the releasable algorithm containers and the deployment resources of the to-be-deployed algorithm container; Determining the time priority ranking of the candidate releasable algorithm containers with task information based on the task start time; Screening out the releasable algorithm containers with task information that meet the remaining deployment resources among the candidate releasable algorithm containers with task information based on the priority ranking and the time priority ranking; Taking the releasable algorithm containers with task information that meet the remaining deployment resources and the releasable algorithm containers as the algorithm containers to be deleted.

7. An algorithm container management device, characterized in that, The algorithm container management device includes: An acquisition module, configured to acquire the remaining resources of the server and the deployment resources of the to-be-deployed algorithm container when receiving a deployment request for the to-be-deployed algorithm container; A judgment module, configured to judge the releasable state of the algorithm containers already deployed in the server when the remaining resources of the server cannot meet the deployment resources of the to-be-deployed algorithm container, and determine the releasable algorithm containers from the already deployed algorithm containers; A determination module, configured to determine the algorithm containers to be deleted from the releasable algorithm containers based on the releasable resources of the releasable algorithm containers and the deployment resources of the to-be-deployed algorithm container; A deletion module, configured to delete the algorithm containers to be deleted, and deploy the to-be-deployed algorithm container to the server to obtain the already deployed algorithm containers.

8. An algorithm container management system, characterized in that, The algorithm container management system includes: an algorithm container management device and a server; The algorithm container management device is determined by an algorithm container management device according to claim 7.

9. An electronic device, characterized in that, Including: A memory, a processor, and a computer program stored on the memory and executable on the processor, where when the processor executes the computer program, the steps in the algorithm container management method according to any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps in the algorithm container management method according to any one of claims 1 to 6 are implemented.