A containerized atomic capability sharing scheduling method and system based on DAG pre-scanning
By combining DAG pre-scanning and reference counting sharing and reuse mechanisms with continuous counting hysteresis mechanisms, the decoupling problem between DAG orchestration and containerized scheduling in AI workflows is solved, enabling container pre-launch and resource optimization, thereby improving execution success rate and resource utilization efficiency.
Patent Information
- Application Number
- CN202611099094.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-23
- Publication Date
- 2026-11-17
AI Technical Summary
In AI workflow scenarios, existing technologies decouple DAG orchestration from containerized scheduling, leading to cold start blind spots and resource waste. This is especially true when multiple nodes, parallel branches, and loops exist, causing nodes to time out or fail on their first execution, and resulting in high resource consumption.
By triggering container pre-pull through DAG pre-scanning, and combining reference counting sharing reuse and continuous counting hysteresis mechanism, deep coupling of DAG orchestration and containerized atomic capabilities is achieved, eliminating cold start blind spots and optimizing resource utilization.
It eliminates the cold start blind spot, reduces resource consumption, improves execution success rate, and stabilizes the scaling up and down process, with a resource saving rate of up to 90%.
Smart Images

Figure CN123114645A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cloud-native computing power scheduling and workflow orchestration technology, and in particular to a containerized atomic capability scheduling method and system that uses a directed acyclic graph (DAG) as the orchestration carrier, drives container pre-pull-up through DAG pre-scanning, realizes cross-workflow sharing and reuse based on reference counting, and uses a hysteresis mechanism to suppress scaling jitter. Background Technology
[0002] With the engineering implementation of large models and AI workflows, more and more businesses are encapsulating model inference, algorithm computation, and tool calls into fine-grained, independently deployable atomic capabilities (Atoms), and orchestrating these atomic capabilities into complete workflow business flows using a Directed Acyclic Graph (DAG) approach. The current mainstream implementation paths in the industry include the following categories: 1. DAG orchestration engines: Represented by open-source frameworks such as LangGraph, Dify Workflow, Spring AI Alibaba Graph, and Apache DolphinScheduler, these engines can parse graph structures, schedule nodes in topological order, and support conditional and parallel branches. These engines treat each node as a service to be invoked, calling a pre-existing, stable interface address (URL) via HTTP / gRPC protocol. The engine does not participate in the lifecycle management of the target service.
[0003] 2. Containerized scheduling solutions: These are represented by Kubernetes Deployment plus HPA (Horizontal PodAutoscaler) plus API gateways (such as APISIX and Istio), which can elastically scale container replicas based on CPU / memory or custom metrics. These solutions focus on resource usage metrics of individual services and are completely unaware of the topology of the upper-layer call graph.
[0004] 3. Function as a Service (FaaS) type: Represented by Knative and OpenFaaS, it launches function containers based on event triggers and supports scaling down to zero to save resources. However, its cold start latency is usually in the range of seconds to tens of seconds, which is particularly disadvantageous for GPU-based model inference services (large image size, slow startup).
[0005] The three solutions described above address the issues of graph orchestration, container elasticity, and on-demand startup, respectively. However, in AI workflow scenarios, these three are two independent layers (orchestration layer and scheduling layer): the DAG engine is only responsible for sequentially calling URLs and does not participate in container lifecycle management at all; the container orchestrator only scales replicas of a single service based on resource metrics and is completely unaware of the upper-layer DAG topology. When a workflow contains multiple atomic capability nodes, and there are parallel branches and loops between nodes, this decoupling will create a significant cold start blind spot in actual operation—the DAG engine only initiates an HTTP call when it reaches a node, while the underlying container may not have been started or the image may not have been distributed, causing the node's first execution to time out or fail. Summary of the Invention
[0006] The technical problem to be solved by this invention is to provide a containerized atomic capability sharing scheduling method and system based on DAG pre-scanning. The method triggers container pre-launch during the DAG parsing stage, eliminates the cold start blind spot, and enables multiple workflows to be deployed through the same container. It deeply couples the DAG orchestration process with the full lifecycle scheduling of containerized atomic capabilities, thereby improving the execution success rate while significantly reducing resource consumption.
[0007] In a first aspect, the present invention provides a containerized atomic capability sharing scheduling method based on DAG pre-scanning, applied to the orchestration plane and the scheduling plane, the method comprising: DAG pre-scanning and container pre-pull-up process: After receiving the workflow in the orchestration plane, a directed acyclic graph is constructed. The topology is traversed throughout the graph to filter out all ATOM nodes. Meta-information of each node is extracted, including atomId. After packaging the meta-information, a pre-pull-up request is sent to the scheduling plane all at once. Reference counting sharing and reuse process: In the scheduling plane, query the reference count by atomId. If an ACTIVE reference record already exists, reuse it directly; otherwise, enter the full start-up process and create a reference record; after all containers enter RUNNING, return "atomId → route URL" to the orchestration plane. DAG execution process: In the orchestration plane, the returned "atomId→route URL" mapping is written into the route address mapping table routeUrlMap; When the DAG is executed to the ATOM node in topological order, the node executor obtains the route address from routeUrlMap, directly initiates an HTTP call to the gateway, and reaches the target container through load balancing.
[0008] Furthermore, when querying the reference count by atomId, if an ACTIVE reference record already exists, the existing container deployment and routing address are directly reused, and only the refCount is incremented by 1, without the need for image distribution and container deployment; if no ACTIVE reference record exists, image distribution, Kubernetes deployment, and gateway routing configuration are completed in sequence, and then the reference record is created.
[0009] Furthermore, when a workflow stops, the refCount of each atomic capability referenced by that workflow is decremented by 1. When the refCount reaches zero, the reference is put into the cooldown delayed recycling queue. If a new workflow requests an atomic capability with the same atomId during the cooldown period, the recycling is canceled, the ACTIVE state is restored, and the timer is reset. After the cooldown expires, Kubernetes resources and gateway routes are deleted in sequence, and containers are physically released.
[0010] Furthermore, two independent continuous counters are maintained in the scheduling plane: a continuous high load count counter (overload_count) and a continuous low load count counter (underload_count). Request metrics for each atomic capability are collected, and after each collection, it is determined that: if the request metric exceeds the high load threshold, overload_count is incremented by 1 while underload_count is reset to 0; if the request metric is below the low load threshold, underload_count is incremented by 1 while overload_count is reset to 0; expansion / shrinkage is triggered only when N consecutive unidirectional accumulations occur.
[0011] Furthermore, expansion / reduction must also meet the cooldown period constraint.
[0012] Secondly, the present invention provides a containerized atomic capability sharing scheduling system based on DAG pre-scanning, including an orchestration plane and a scheduling plane; The arrangement plane includes: The DAG parsing and pre-scanning module is used to construct a directed acyclic graph after receiving the workflow, perform topological traversal of the entire graph to filter out all ATOM nodes, and extract the meta-information of each node, including atomId. The orchestration-scheduling bridge module is used to package metadata and send a pre-pull request to the scheduling plane in one go. The workflow context module is used to maintain the route address mapping table routeUrlMap, which is used for node execution to look up the table; The scheduling plane includes: Runtime services are used to manage the entire lifecycle of containers; The reference counting reuse module is used to query the reference count by atomId. If an ACTIVE reference record already exists, it is reused directly; otherwise, the full startup process is entered and a reference record is created. The image distribution and container deployment module is used to manage Deployments / Services via the Kubernetes API; The gateway routing management module is used to manage routing and load balancing by atomId.
[0013] Furthermore, the reference counting reuse module is specifically used to, when querying the reference count by atomId, if there is already an ACTIVE reference record, directly reuse the existing container deployment and routing address, only increment refCount by 1, without image distribution and container deployment; if there is no ACTIVE reference record, complete image distribution, Kubernetes deployment and gateway routing configuration in sequence, and then create the reference record.
[0014] Furthermore, the reference counting reuse module is also used to decrement the refCount by 1 for each atomic capability referenced by the workflow when the workflow stops. When the refCount reaches zero, the reference enters the cooldown delayed recycling queue. If a new workflow requests an atomic capability with the same atomId during the cooldown period, the recycling is canceled, the ACTIVE state is restored, and the timer is reset. After the cooldown expires, Kubernetes resources and gateway routes are deleted in sequence, and containers are physically released.
[0015] Furthermore, it also includes a hysteresis scaling controller, used to maintain two independent continuous counters in the scheduling plane: a continuous high load count counter (overload_count) and a continuous low load count counter (underload_count); it collects the request metric for each atomic capability, and after each collection, it judges: if the request metric exceeds the high load threshold, overload_count is incremented by 1 and underload_count is reset to 0; if the request metric is below the low load threshold, underload_count is incremented by 1 and overload_count is reset to 0; scaling up / down is triggered only when N consecutive counts are accumulated in one direction.
[0016] Furthermore, the hysteresis expansion / shrinkage controller is also used to enforce cooldown constraints, and expansion / shrinkage must also meet the cooldown constraints.
[0017] The technical solutions provided in the embodiments of the present invention have at least the following technical effects: 1. Eliminate cold start blind spots: By using DAG pre-scanning technology, all required containers are pre-pushed before the workflow is executed. When the DAG executes to any atomic capability node, the corresponding container must be in the RUNNING state. The first-start latency of the GPU model is reduced from 30 to 120 seconds to less than 10 seconds.
[0018] 2. Significantly reduce container resource consumption: Through the reference counting reuse mechanism, only one container deployment needs to be maintained when N workflows share the same atomic capability. If 10 workflows share the same LLM inference service (single copy 16GB of video memory), the resource saving rate can reach 90% (160GB → 16GB).
[0019] 3. Stable expansion / contraction without jitter: The continuous counting hysteresis mechanism requires N consecutive observation cycles in one direction to trigger expansion / contraction. During alternating observations, the counters reset each other, fundamentally eliminating the problem of repeated expansion / contraction near the threshold boundary. Combined with a cooldown period, the frequency of change is further constrained.
[0020] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0021] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0022] Figure 1 This is a schematic diagram of the overall process of the method in Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the execution flow of the method in Embodiment 1 of the present invention; Figure 3 This is a schematic diagram of the continuous counting hysteresis expansion and contraction mechanism in Embodiment 1 of the present invention; Figure 4 This is an example diagram of the continuous counting hysteresis expansion and contraction timeline in Embodiment 1 of the present invention; Figure 5 This is a schematic diagram of the system framework in Embodiment 2 of the present invention. Detailed Implementation
[0023] This application provides a containerized atomic capability sharing scheduling method and system based on DAG pre-scanning. It triggers container pre-launch during the DAG parsing stage, eliminates the cold start blind spot, and enables multiple workflows to be deployed through the same container. It deeply couples the DAG orchestration process with the full lifecycle scheduling of containerized atomic capabilities, thereby improving the execution success rate while significantly reducing resource consumption.
[0024] The overall concept of the technical solution in this application is as follows: A method and system are provided to deeply couple the DAG orchestration process with the full lifecycle scheduling of containerized atomic capabilities, specifically achieving the following objectives: (1) triggering container pre-pull during the DAG resolution phase to eliminate the cold start blind zone; (2) allowing multiple workflows to share the same container deployment through reference counting, significantly reducing resource consumption; and (3) using a continuous counting hysteresis mechanism to suppress scaling jitter. Example 1
[0025] This embodiment provides a containerized atomic capability sharing scheduling method based on DAG pre-scanning, such as... Figure 1 As shown, applied to the orchestration plane and scheduling plane, the method includes: S1. DAG pre-scanning and container pre-pull-up process: After receiving the workflow in the orchestration plane, a directed acyclic graph is constructed. The topology is traversed throughout the graph to filter out all ATOM nodes. Meta-information of each node is extracted, including atomId. After packaging the meta-information, a pre-pull-up request is sent to the scheduling plane at once. S2, Reference Count Sharing and Reuse Process: In the scheduling plane, query the reference count by atomId. If an ACTIVE reference record already exists, reuse it directly; otherwise, enter the full start-up process and create a reference record. After all containers enter RUNNING, return "atomId → route URL" to the orchestration plane. S3, DAG execution process: In the orchestration plane, the returned "atomId→route URL" mapping is written into the route address mapping table routeUrlMap; when the DAG is executed to the ATOM node in topological order, the node executor obtains the route address from routeUrlMap, directly initiates an HTTP call to the gateway, and reaches the target container through load balancing.
[0026] In one embodiment, the DAG pre-scanning and container pre-pull-up process is specifically implemented as follows: This transforms the traditional approach of passively launching containers during invocation into actively pre-launching them during orchestration, fundamentally eliminating the cold start blind spot. For example... Figure 2As shown, the specific process is as follows: After receiving the workflow JSON, the orchestration engine constructs a directed acyclic graph, traverses the entire graph to filter out all ATOM nodes, and extracts the atomId and metadata such as image, port, resource specifications, and environment variables of each node. The bridging module packages this information and sends a pre-start request to the scheduling plane at once. The scheduling plane queries the reference count by atomId - if there is an ACTIVE reference, it is reused directly; if not, it completes image distribution, Kubernetes deployment, and gateway routing configuration in sequence. The bridging module polls the status at 5-second intervals until all containers enter RUNNING, and then writes the returned (atomId→route URL) mapping into the routeUrlMap of the workflow context. When the DAG is executed to the ATOM node in the topological order, the node executor obtains the route address from the routeUrlMap in O(1) time complexity, directly sends an HTTP call to the gateway, and reaches the target container through load balancing. Compared with the lazy loading method of the traditional solution, the image distribution and container startup are completed in parallel during the DAG parsing stage, and the first-run delay of the GPU model is reduced from 30 to 120 seconds to less than ten seconds.
[0027] In one embodiment, the reference counting sharing and reuse process is implemented as follows: Deduplication via atomId enables cross-workflow container sharing, ensuring that only one container deployment is maintained when N workflows share the same atomic capability. When a new workflow requests to use an atomic capability, it first checks the reference table by atomId to see if an ACTIVE reference record already exists. Case A (existing): The existing container deployment and route address are directly reused, only the refCount is incremented by 1, without image distribution or container deployment. Case B (not existing): The complete startup process (image distribution → Kubernetes deployment → route configuration) is initiated, and a reference record is created (refCount=1, status=ACTIVE). When the workflow stops, the refCount is decremented by 1 for each atomic capability referenced by that workflow. When the refCount reaches zero, the reference enters the cooldown delayed recycling queue (default 5 minutes, to prevent ping-pong jitter from releasing and re-applying within a short period). During the cooldown period, if a new workflow requests an atomic capability with the same atomId, the recycling is canceled, the ACTIVE state is restored, and the timer is reset; after the cooldown expires, the Kubernetes resource and gateway route are deleted sequentially, and the container is physically released. Taking LLM inference service (single copy 16GB video memory) as an example, when 10 workflows share the same memory, only one copy of 16GB video memory is needed, which saves 90% of resources (the traditional solution requires 10 copies totaling 160GB).
[0028] In a preferred embodiment, a continuous counting hysteresis scaling mechanism is incorporated, eliminating the repetitive jitter problem near the critical value in traditional threshold scaling from the algorithm design level. For example... Figure 3 As shown, two independent continuous counters are maintained in the scheduling plane: `overload_count` for consecutive high loads and `underload_count` for consecutive low loads. The scheduler collects metrics such as the number of requests for each atomic capability through the routing management module. After each collection, it judges: if the metric exceeds the high load threshold, `overload_count` is incremented by 1 while `underload_count` is reset to 0; if the metric is below the low load threshold, `underload_count` is incremented by 1 while `overload_count` is reset to 0. The mutual reset of the two counters is the core of the hysteresis mechanism—when high / low load signals alternate, the other counter immediately resets to zero, forcing a continuous accumulation of N times (e.g., 5 times) in one direction before triggering scaling. Scaling / scaling also needs to meet the cooldown constraint (the time since the last scaling operation must exceed this period). Scaling is performed by cloning an existing Deployment template, and scaling directly reduces the number of replicas. Figure 4 The example timeline illustrates this: From T0 to T4, five consecutive high load events trigger expansion (oc=5, reaching the threshold); after T5, the oc is reset to zero under normal load; T6 experiences low load (uc=1), and T7 returns to normal – since uc only accumulated one instance below the threshold N, shrinkage is not triggered. This mechanism ensures that the replica count does not frequently change during boundary load fluctuations.
[0029] Based on the same inventive concept, this application also provides an apparatus corresponding to the method in Embodiment 1, as detailed in Embodiment 2. Example 2
[0030] This embodiment provides a containerized atomic capability sharing scheduling system based on DAG pre-scanning, such as Figure 5 As shown, it includes the orchestration plane and the scheduling plane; The arrangement plane includes: The DAG parsing and pre-scanning module is used to construct a directed acyclic graph after receiving the workflow, perform topology traversal of the entire graph to filter out all ATOM nodes, and extract the metadata of each node, including the atomId. Specifically, the DAG parsing and pre-scanning module is based on the JGraphT directed acyclic graph data structure and supports topology scheduling of node types such as Start / End / Atom / LLM / API / Judge / Iterator / Parallel. The orchestration-scheduling bridge module is used to package the metadata and send a pre-pull request to the scheduling plane once during the execution phase of the Start node; The workflow context module is used to maintain the route address mapping table routeUrlMap, which allows nodes to perform O(1) table lookups during execution; The scheduling plane includes: The runtime service, AgentRuntimeService, is used to manage the entire lifecycle of containers; The reference counting reuse module is used to query the reference count by atomId. If an ACTIVE reference record already exists, it is reused directly; otherwise, the full startup process is entered and a reference record is created. It is also used to maintain the refCount reference count and the cooldown delayed recycling queue. The image distribution and container deployment module is used to manage Deployments / Services via the Kubernetes API; The gateway routing management module is used to manage routing and load balancing by atomId.
[0031] Preferably, the reference counting reuse module is specifically used to, when querying the reference count by atomId, if there is already an ACTIVE reference record, directly reuse the existing container deployment and routing address, only increment refCount by 1, without image distribution and container deployment; if there is no ACTIVE reference record, complete image distribution, Kubernetes deployment and gateway routing configuration in sequence, and then create the reference record.
[0032] Preferably, the reference counting reuse module is further configured to decrement the refCount by 1 for each atomic capability referenced by the workflow when the workflow stops. When the refCount reaches zero, the reference enters the cooldown delayed recycling queue. If a new workflow requests an atomic capability with the same atomId during the cooldown period, the recycling is canceled, the ACTIVE state is restored, and the timer is reset. After the cooldown expires, the Kubernetes resources and gateway routes are deleted in sequence, and the containers are physically released.
[0033] Preferably, it also includes a hysteresis scaling controller for maintaining two independent consecutive counters in the scheduling plane: a consecutive high load count counter (overload_count) and a consecutive low load count counter (underload_count); collecting the request metric for each atomic capability, and after each collection, determining: if the request metric exceeds the high load threshold, incrementing overload_count by 1 and resetting underload_count to 0; if the request metric is below the low load threshold, incrementing underload_count by 1 and resetting overload_count to 0; scaling up / down is triggered only when N consecutive counts are accumulated in one direction.
[0034] Preferably, the hysteresis expansion / shrinkage controller is also used to enforce cooldown constraints, and expansion / shrinkage must also meet the cooldown constraints.
[0035] Since the system described in Embodiment 2 of this invention is a system used to implement the method of Embodiment 1 of this invention, those skilled in the art can understand the specific structure and variations of this system based on the method described in Embodiment 1 of this invention, and therefore will not be repeated here. All systems used in the method of Embodiment 1 of this invention fall within the scope of protection of this invention.
[0036] The technical solutions provided in the embodiments of the present invention have at least the following technical effects: 1. Eliminate cold start blind spots: By using DAG pre-scanning technology, all required containers are pre-pulled up before the workflow is executed. When the DAG executes to any atomic capability node, the corresponding container must be in the RUNNING state. This transforms the passive pull-up during the traditional call into an active pre-pulling during orchestration, fundamentally eliminating cold start blind spots. The first-run latency of the GPU model is reduced from 30 to 120 seconds to less than 10 seconds.
[0037] 2. Significantly Reduce Container Resource Consumption: Through a reference counting reuse mechanism, only one container deployment needs to be maintained when N workflows share the same atomic capability, enabling cross-workflow container sharing. If 10 workflows share the same LLM inference service (single copy 16GB VRAM), resource savings can reach 90% (160GB → 16GB). refCount precisely manages the lifecycle, and combined with the cooldown period, further constrains the frequency of changes, while delayed garbage collection prevents ping-pong jitter.
[0038] 3. Stable expansion and contraction without jitter: The continuous counting hysteresis mechanism requires N consecutive observation cycles in one direction to trigger expansion and contraction. During alternating observations, the counters are reset to each other. Expansion and contraction are only triggered after N consecutive accumulations in one direction and the cooling period constraint is met, which fundamentally eliminates the problem of repeated expansion and contraction near the threshold boundary.
[0039] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0040] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0041] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0042] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0043] While specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and not intended to limit the scope of the present invention. Equivalent modifications and variations made by those skilled in the art in accordance with the spirit of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A containerized atomic capability sharing scheduling method based on DAG pre-scanning, characterized in that, Applied to the orchestration and scheduling planes, the method includes: DAG pre-scanning and container pre-pull-up process: After receiving the workflow in the orchestration plane, a directed acyclic graph is constructed. The topology is traversed throughout the graph to filter out all ATOM nodes. Meta-information of each node is extracted, including atomId. After packaging the meta-information, a pre-pull-up request is sent to the scheduling plane all at once. Reference counting sharing and reuse process: In the scheduling plane, query the reference count by atomId. If an ACTIVE reference record already exists, reuse it directly; otherwise, enter the full start-up process and create a reference record; after all containers enter RUNNING, return "atomId→routing URL" to the orchestration plane. DAG execution process: In the orchestration plane, the returned "atomId→route URL" mapping is written into the route address mapping table routeUrlMap; When the DAG is executed to the ATOM node in topological order, the node executor obtains the route address from routeUrlMap, directly initiates an HTTP call to the gateway, and reaches the target container through load balancing.
2. The method according to claim 1, characterized in that: When querying the reference count by atomId, if an ACTIVE reference record already exists, the existing container deployment and routing address are directly reused, and only the refCount is incremented by 1, without the need for image distribution and container deployment; if no ACTIVE reference record exists, image distribution, Kubernetes deployment, and gateway routing configuration are completed in sequence, and then the reference record is created.
3. The method according to claim 2, characterized in that: When a workflow stops, the refCount of each atomic capability referenced by that workflow is decremented by 1. When the refCount reaches zero, the reference is put into the cooldown deferred reclamation queue. If a new workflow requests an atomic capability with the same atomId during the cooldown period, the reclamation is canceled, the ACTIVE state is restored, and the timer is reset. After the cooldown expires, Kubernetes resources and gateway routes are deleted sequentially, and containers are physically released.
4. The method according to claim 1, characterized in that: Two independent continuous counters are maintained in the scheduling plane: a continuous high load count counter (overload_count) and a continuous low load count counter (underload_count). Request metrics for each atomic capability are collected, and after each collection, it is determined that: if the request metric exceeds the high load threshold, overload_count is incremented by 1 and underload_count is reset to 0; if the request metric is below the low load threshold, underload_count is incremented by 1 and overload_count is reset to 0; expansion / shrinkage is triggered only when N consecutive counts are accumulated in one direction.
5. The method according to claim 4, characterized in that: Expansion / reduction of capacity must also meet the cooldown period constraint.
6. A containerized atomic capability sharing scheduling system based on DAG pre-scanning, characterized in that, Includes orchestration plane and scheduling plane; The arrangement plane includes: The DAG parsing and pre-scanning module is used to construct a directed acyclic graph after receiving the workflow, perform topological traversal of the entire graph to filter out all ATOM nodes, and extract the meta-information of each node, including atomId. The orchestration-scheduling bridge module is used to package metadata and send a pre-pull request to the scheduling plane in one go. The workflow context module is used to maintain the route address mapping table routeUrlMap, which is used for node execution to look up the table; The scheduling plane includes: Runtime services are used to manage the entire lifecycle of containers; The reference counting reuse module is used to query the reference count by atomId. If an ACTIVE reference record already exists, it is reused directly; otherwise, the full startup process is entered and a reference record is created. The image distribution and container deployment module is used to manage Deployments / Services via the Kubernetes API; The gateway routing management module is used to manage routing and load balancing by atomId.
7. The system according to claim 6, characterized in that: The reference counting reuse module is specifically used to, when querying the reference count by atomId, directly reuse the existing container deployment and routing address if there is already an ACTIVE reference record, simply incrementing refCount by 1, without needing image distribution and container deployment; if there is no ACTIVE reference record, complete image distribution, Kubernetes deployment and gateway routing configuration in sequence, and then create the reference record.
8. The system according to claim 6, characterized in that: The reference counting reuse module is also used to decrement the refCount of each atomic capability referenced by the workflow when the workflow stops. When the refCount reaches zero, the reference enters the cooldown delayed recycling queue. If a new workflow requests an atomic capability with the same atomId during the cooldown period, the recycling is canceled, the ACTIVE state is restored, and the timer is reset. After the cooldown expires, Kubernetes resources and gateway routes are deleted sequentially, and containers are physically released.
9. The system according to claim 6, characterized in that: It also includes a hysteresis scaling controller, which maintains two independent consecutive counters in the scheduling plane: a consecutive high load count counter (overload_count) and a consecutive low load count counter (underload_count); it collects the request metrics for each atomic capability, and after each collection, it determines: if the request metric exceeds the high load threshold, overload_count is incremented by 1 and underload_count is reset to 0; if the request metric is below the low load threshold, underload_count is incremented by 1 and overload_count is reset to 0; scaling up / down is triggered only when there are N consecutive accumulations in one direction.
10. The system according to claim 6, characterized in that: The hysteresis expansion / shrinkage controller is also used to enforce cooldown constraints, and expansion / shrinkage must also meet the cooldown constraints.
