Service-based calculation task dynamic abstraction method and system

By dividing tasks into service units and building directed acyclic graphs for topological sorting and dynamically scheduling resources, the problems of rigid resources and insufficient real-time performance of traditional task scheduling methods in heterogeneous environments are solved, and efficient and flexible computing task management is achieved.

CN120386602APending Publication Date: 2025-07-29SUZHOU MIWEI TECHNOLOGY CO LTD

Patent Information

Application Number
CN202510535484.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-07-29

AI Technical Summary

Technical Problem

Traditional task scheduling methods cannot dynamically adapt to heterogeneous computing environments, have low hardware utilization, rely on manual definition of execution sequence, lack of automated orchestration capabilities, lack of real-time performance, and are difficult to meet efficient and flexible computing needs.

Method used

Divide tasks into independent service units, build directed acyclic graphs for topological sorting, dynamic resource scheduling is performed according to resource requirements and device status, and manage the life cycle of the service unit through the remote process call framework.

Benefits of technology

It realizes the reusability, state-independent and interface standardization of services, improves hardware utilization and parallel orchestration efficiency, and can dynamically adjust resource allocation to meet efficient and flexible computing needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120386602A_ABST
    Figure CN120386602A_ABST
Patent Text Reader

Abstract

The invention discloses a service-based calculation task dynamic abstraction method and system, and relates to the technical field of calculation task scheduling. The service-based calculation task dynamic abstraction method comprises the following steps: receiving and analyzing a to-be-executed task, and dividing the to-be-executed task into a plurality of independent service units; constructing a directed acyclic graph representing the dependency relationship between the service units, and executing topological sorting based on the directed acyclic graph to determine an execution sequence; and according to the resource demand of each service unit and the current system equipment state. According to the method, the technical problems that a traditional task scheduling method comprises but is not limited to the following technical problems that resource allocation is rigid, a heterogeneous computing environment cannot be dynamically adapted, and the hardware utilization rate is low; parallel arrangement is low in efficiency, depends on manual definition of an execution sequence, lacks an automatic arrangement capability and is difficult to deal with a complex task process; the real-time performance is insufficient, the task execution process is solidified, and the resource allocation and execution path cannot be dynamically adjusted according to the runtime state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computing task scheduling, and particularly to a service-based dynamic abstraction method and system for computing tasks. Background Art

[0002] With the increasing complexity of computing tasks, traditional task scheduling methods have the following technical problems, including but not limited to: rigid resource allocation, inability to dynamically adapt to heterogeneous computing environments (such as GPU, NPU, CPU hybrid deployment), and low hardware utilization; low parallel orchestration efficiency, relying on manual definition of execution order, lacking automated orchestration capabilities, and being difficult to handle complex task processes; insufficient real-time performance, the task execution process is solidified, unable to dynamically adjust resource allocation and execution paths according to the runtime state, thus making it difficult to meet the requirements of high efficiency and flexibility. Summary of the Invention

[0003] Object of the Invention: To provide a service-based dynamic abstraction method and system for computing tasks to at least solve one of the problems existing in the above prior art.

[0004] Technical Solution: A service-based dynamic abstraction method for computing tasks includes:

[0005] Receiving and parsing a task to be executed, and dividing the task to be executed into multiple independent service units;

[0006] Constructing a directed acyclic graph representing the dependency relationship between service units, and performing topological sorting based on the directed acyclic graph to determine the execution order;

[0007] Performing dynamic resource scheduling and parallel deployment according to the resource requirements of each service unit and the current system device status;

[0008] Completing the startup, initialization, service execution, and resource release of each service unit in sequence through a remote procedure call framework, and sending the output result to the target node.

[0009] Preferably, receiving and parsing a task to be executed, and dividing the task to be executed into multiple independent service units includes:

[0010] Dividing the task into multiple service units according to functions;

[0011] Defining the hardware mapping, parallelism, and input / output interfaces of each service through a configuration file to standardize the data link between services.

[0012] Preferably, constructing a directed acyclic graph representing the dependency relationship between service units, and performing topological sorting based on the directed acyclic graph to determine the execution order includes:

[0013] Reading the dependency relationship fields in the configuration file to construct DAG graph nodes;

[0014] Use a topological sorting algorithm to sort the DAG graph and automatically identify parallel execution paths and dependent execution paths;

[0015] Perform service orchestration based on the sorting result to determine the running sequence of each service unit.

[0016] Preferably, perform dynamic resource scheduling and parallel deployment according to the resource requirements of each service unit and the current system device status, including:

[0017] Real-time monitor the resource status of each computing device; wherein, the resource status includes: GPU video memory, CPU load, and memory usage rate;

[0018] Match the current idle resources according to the device list in the service unit configuration and dynamically allocate the service unit to the target device;

[0019] When it is detected that the device resources are overloaded, automatically migrate the service to other available nodes and adjust the parallelism parameter to adapt to the number of service instances.

[0020] Preferably, complete the startup, initialization, service execution, and resource release of each service unit in sequence through a remote procedure call framework, and send the output result to the target node, including:

[0021] Call the startup interface through the remote procedure call framework to start the remote process and establish a communication channel;

[0022] Call the initialization interface to load the configuration file and initialize the model, driver, and upload metric items;

[0023] Call the execution interface to execute the service processing logic defined by the user;

[0024] After the execution is completed, call the stop interface to release the resources, and finally close the communication channel.

[0025] Preferably, the service processing logic includes:

[0026] Receive the data output by the upstream service;

[0027] Perform data processing based on a pre-configured algorithm model or rule;

[0028] Output the processing result to the downstream service or the final output node.

[0029] Preferably, it further includes: a service quality guarantee mechanism, and the service quality guarantee mechanism includes:

[0030] Real-time collect the runtime performance metrics of each service unit;

[0031] When the service delay exceeds the set threshold, automatically adjust the parallelism parameter of the service or migrate the service to other available devices to maintain the overall performance of the system.

[0032] To achieve the above object, according to another aspect of the present application, there is provided a dynamic abstraction system for computing tasks based on services.

[0033] The dynamic abstraction system for computing tasks based on services according to the present application includes:

[0034] A receiving and parsing module, configured to receive and parse a task to be executed, and divide the task to be executed into multiple independent service units;

[0035] A constructing and determining module, configured to construct a directed acyclic graph representing the dependency relationship between service units, and perform topological sorting based on the directed acyclic graph to determine the execution order;

[0036] A dynamic resource scheduling and parallel deployment module, configured to perform dynamic resource scheduling and parallel deployment according to the resource requirements of each service unit and the current system device status;

[0037] An invocation and output module, configured to sequentially complete the startup, initialization, service execution, and resource release of each service unit through a remote procedure call framework, and send the output result to the target node.

[0038] To achieve the above object, according to another aspect of the present application, there is provided an electronic device, the electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the dynamic abstraction method for computing tasks based on services according to any one of the present invention.

[0039] To achieve the above object, according to another aspect of the present application, there is provided a computer-readable storage medium, and the computer-readable storage medium stores computer instructions, and the computer instructions are used to implement the dynamic abstraction method for computing tasks based on services according to any one of the present invention when executed by a processor.

[0040] Beneficial effects: In the embodiments of the present application, a method of dynamically abstracting computing tasks is adopted. By receiving and parsing the tasks to be executed, the tasks to be executed are divided into multiple independent service units; a directed acyclic graph representing the dependency relationships between service units is constructed, and topological sorting is performed based on this directed acyclic graph to determine the execution order; according to the resource requirements of each service unit and the current system device status, dynamic resource scheduling and parallel deployment are carried out; through the remote procedure call framework, the startup, initialization, business execution, and resource release of each service unit are completed in sequence, and the output results are sent to the target node, achieving the purpose that the service has the characteristics of being reusable, state-independent, and interface-standardized, thus realizing the technical effect that the interaction between services is more unified and simple, and further solving the following technical problems existing in traditional task scheduling methods, including but not limited to: rigid resource allocation, inability to dynamically adapt to heterogeneous computing environments (such as GPU, NPU, CPU hybrid deployment), low hardware utilization; low parallel orchestration efficiency, relying on manual definition of the execution order, lacking automated orchestration capabilities, and being difficult to handle complex task processes; insufficient real-time performance, the task execution process is solidified, unable to dynamically adjust resource allocation and execution paths according to the runtime status, and thus difficult to meet the requirements of high efficiency and flexibility. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 is a schematic diagram of the computing process of a typical heterogeneous computing task based on the service-based computing task dynamic abstraction method according to the embodiments of the present application;

[0042] Figure 2 is a schematic diagram of a test case based on the service-based computing task dynamic abstraction method according to the embodiments of the present application;

[0043] Figure 3 is a schematic diagram of the splitting of an unmanned aerial vehicle target detection task based on the service-based computing task dynamic abstraction method according to the embodiments of the present application;

[0044] Figure 4 is a flowchart of the execution of a service based on the service-based computing task dynamic abstraction method according to the embodiments of the present application;

[0045] Figure 5 is a flowchart of the service-based computing task dynamic abstraction method according to the embodiments of the present application;

[0046] Figure 6 is a schematic diagram of the structure of a service-based computing task dynamic abstraction system according to the embodiments of the present application; and

[0047] Figure 7 is a schematic diagram of the structure of an electronic device based on the service-based computing task dynamic abstraction method according to the embodiments of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0048] To enable those skilled in the art to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this application.

[0049] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances for the embodiments of this application described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0050] In addition, the terms "installed", "set", "provided with", "connected", "connected to", "socketed" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral structure; it can be a mechanical connection or an electrical connection; it can be directly connected, or indirectly connected through an intermediate medium, or there can be internal communication between two devices, components or parts. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0051] It should be noted that, without conflict, the embodiments in this application and the features in the embodiments can be combined with each other. The following will refer to the drawings and combine the embodiments to detail this application.

[0052] As Figures 1-5 shown, according to an embodiment of the present invention, a method for dynamically abstracting computing tasks based on services is provided, and the method includes the following steps S101 to S104:

[0053] Step S101, receive and parse the task to be executed, and divide the task to be executed into multiple independent service units;

[0054] The system first receives the task to be executed and parses the task content. The task to be executed is usually relatively complex and contains multiple functions or subtasks, and cannot be directly executed at one time. To better manage and execute this task, the system disassembles it into multiple independent service units, and each service unit is responsible for executing a specific function. Through this disassembly, the task becomes more modular, controllable and easy to optimize.

[0055] According to an embodiment of the present invention, preferably, receive and parse the task to be executed, and divide the task to be executed into multiple independent service units, including:

[0056] Divide the task into multiple service units according to functions;

[0057] Define the hardware mapping, parallelism, and input / output interfaces of each service through a configuration file to standardize the data link between services.

[0058] It has the following effects:

[0059] Task modularization: By decomposing the task into multiple independent service units, the system can manage and schedule each service unit more flexibly, avoiding tight coupling between tasks, and facilitating the upgrade, maintenance, or replacement of individual services.

[0060] Optimized parallel computing: Each service unit can be executed in parallel, reducing the total execution time of the task and improving the computing efficiency.

[0061] Flexible resource allocation: Each service unit can be allocated different hardware resources according to actual needs, such as CPUs, GPUs, etc., which helps to improve the utilization rate of system resources.

[0062] Function-based division: For example, a video processing task can be decomposed into service units such as RTSP decoding, inference, image rendering, and encoding and streaming.

[0063] Configuration file definition: Through the configuration file, define the hardware mapping (running on which devices), parallelism (how many tasks each service can process simultaneously), and input / output interfaces (how to exchange data with other services) of each service. In this way, the communication between services can be standardized.

[0064] Step S102, construct a directed acyclic graph representing the dependency relationship between service units, and perform topological sorting based on the directed acyclic graph to determine the execution order;

[0065] The system constructs a directed acyclic graph (DAG) according to the dependency relationship between service units. Each node in the DAG represents a service unit, and the directed edges between nodes represent the dependency relationship between service units; through the DAG, the system can clearly represent the execution order between each service unit, and perform topological sorting on this basis to determine which services can be executed in parallel and which services must be executed in sequence.

[0066] According to an embodiment of the present invention, preferably, construct a directed acyclic graph representing the dependency relationship between service units, and perform topological sorting based on the directed acyclic graph to determine the execution order, including:

[0067] Read the dependency fields in the configuration file and construct the DAG graph nodes;

[0068] Use the topological sorting algorithm to sort the DAG graph and automatically identify the parallel execution paths and dependent execution paths;

[0069] Perform service orchestration based on the sorting result to determine the running sequence of each service unit.

[0070] It has the following effects:

[0071] Clear dependency management: By constructing a DAG structure, the system can intuitively represent the dependency relationships between service units, ensure that the execution order of services is appropriate, and avoid service conflicts.

[0072] Parallel optimization: The topological sorting algorithm can automatically identify the parallel execution paths between services and maximize the parallelization of tasks to improve the overall system efficiency.

[0073] Flexible task orchestration: According to the topological sorting result, the system can automatically orchestrate the execution order of services, enabling computational tasks to be executed in the optimal order and reducing waiting and latency.

[0074] The dependency relationships are read from the dependency fields in the configuration file, and a DAG graph is constructed based on these fields.

[0075] Topological sorting helps the system automatically determine the execution order of tasks and automatically identify which tasks can be processed in parallel.

[0076] Step S103: Perform dynamic resource scheduling and parallel deployment according to the resource requirements of each service unit and the current system device status;

[0077] The system performs dynamic resource scheduling and parallel deployment according to the resource requirements of each service unit (such as memory, CPU, GPU, etc.) and the resource status of the current device (such as load, idle situation, etc.); the system monitors the resource usage of computing devices in real time and adjusts the resource allocation according to the needs of tasks to ensure that each service unit can run on the most suitable device.

[0078] According to the embodiment of the present invention, preferably, performing dynamic resource scheduling and parallel deployment according to the resource requirements of each service unit and the current system device status includes:

[0079] Real-time monitor the resource status of each computing device; wherein, the resource status includes: GPU video memory, CPU load, and memory usage rate;

[0080] Match the current idle resources according to the device list in the service unit configuration and dynamically allocate the service unit to the target device;

[0081] When it is detected that the device resources are overloaded, the service is automatically migrated to other available nodes, and the parallelism parameter is adjusted to adapt to the number of service instances.

[0082] It has the following effects:

[0083] Resource optimization: Through dynamic monitoring and scheduling, it ensures that each service unit can run on a suitable device, thereby optimizing the system resource utilization rate and avoiding resource waste.

[0084] Improve system stability: When the resources of a certain device are overloaded, the system can automatically migrate the service to other devices, avoiding system crashes or performance bottlenecks caused by overloading of a single device.

[0085] Enhance parallelism: Through parallel deployment, multiple service units can execute simultaneously, reducing the overall execution time of tasks and enhancing system efficiency.

[0086] Step S104: Through the remote procedure call framework, complete the startup, initialization, service execution, and resource release of each service unit in sequence, and send the output result to the target node.

[0087] The system controls the life cycle of each service unit through the remote procedure call (RPC) framework to ensure that the process of each service unit from startup to resource release proceeds in an orderly manner; the communication between service units is achieved through RPC, thereby ensuring that service units on different devices can work together and the output results can be smoothly transmitted to the target node.

[0088] According to the embodiment of the present invention, preferably, through the remote procedure call framework, completing the startup, initialization, service execution, and resource release of each service unit in sequence, and sending the output result to the target node includes:

[0089] Call the startup interface through the remote procedure call framework to start the remote process and establish a communication channel;

[0090] Call the initialization interface to load the configuration file, initialize the model, driver program, and upload metric items;

[0091] Call the execution interface to execute the service processing logic defined by the user;

[0092] After execution, call the stop interface to release resources, and finally close the communication channel.

[0093] It has the following effects:

[0094] Standardized interface management: Through the RPC framework, the communication between service units becomes unified and standardized, simplifying system development and maintenance.

[0095] Enhance system coordination: The remote call framework enables service units to work in coordination across devices, supports distributed computing and cross-node data transmission, and enhances the overall coordination and scalability of the system.

[0096] Automated management: The RPC framework realizes the whole-process management from service startup, initialization to execution and resource release, improves the automation level, and reduces manual intervention.

[0097] According to an embodiment of the present invention, preferably, the service processing logic includes:

[0098] Receive the data output by the upstream service;

[0099] Perform data processing based on a pre-configured algorithm model or rule;

[0100] Output the processing result to the downstream service or the final output node.

[0101] According to an embodiment of the present invention, preferably, it further includes: a service quality guarantee mechanism, and the service quality guarantee mechanism includes:

[0102] Real-time collect the runtime performance indicators of each service unit;

[0103] When the service delay exceeds the set threshold, automatically adjust the parallelism parameter of the service or migrate the service to other available devices to maintain the overall performance of the system.

[0104] Real-time monitor the performance indicators of each service unit, such as execution delay, throughput, success rate, etc. By collecting these indicators, the system can automatically adjust the parallelism parameter or migrate the service unit when the service delay or performance has problems, so as to ensure that the overall performance of the system is not affected.

[0105] The working process of the present invention is as follows:

[0106] The computing task abstraction module splits the computing task into a group of small and highly maintainable services. Each service focuses on a specific business function and provides services to the outside through a unified encapsulated data input and output interface. In addition, based on the data flow mechanism, the task execution process can be equated to the data processing flow, and services interact through a lightweight communication mechanism. This abstraction provides a service-oriented hardware resource scheduling mechanism for service scheduling.

[0107] Such as Figure 1As shown in the figure, a typical computing task usually consists of multiple relatively independent computing steps, and these steps are an independent service. The task includes services such as image acquisition, decoding, image preprocessing, streaming computing management, object detection, object recognition, feature extraction, object tracking, label output, object segmentation, data output, etc. Each service uses specific hardware to complete, and at least one type of hardware is bound to a single service, while a single piece of hardware can be mapped to multiple services.

[0108] Specifically in the actual scenario, such as Figure 2 As shown in the figure, there are two actual test cases. The drone object tracking computing task consists of steps such as image acquisition, decoding, object recognition, object tracking, image drawing, and encoding and pushing the stream. The remote sensing ship task consists of steps such as decoding, inference, drawing, and pushing the stream. From this, we can find that most intelligent scenario computing tasks can be abstracted into several reusable services, and the hardware resources involved only need to be bound and managed at the granularity of services.

[0109] Referring to the SOA concept, the computing task is abstracted into a set of services scheduled in a predefined order. These services are a collection of a group of closely related business functions, and their implementation is usually completed with the help of one or more specific hardware. Services have the characteristics of being reusable, stateless, and having standardized interfaces. Services communicate through well-defined interfaces, making the interaction between services more unified and simple.

[0110] Specifically, the task is defined as a pipeline composed of a series of service bodies through the Streaming Computing model. In the pipeline, the data stream drives the advancement of the computing model, and the advancement order of the data stream is described using JSON. In addition, considering the parallel scenarios between computing tasks, the scheduling order of the service bodies of the computing tasks can be stored in the pipeline through the DAG data structure.

[0111] A DAG is a graphical structure composed of a set of acyclic nodes connected by a set of directed edges, and is often used to represent dependency relationships or execution orders. An application can be abstracted into a set of service bodies, and each service body is a node in the DAG. The dependency relationship between service bodies is abstracted into a directed edge, indicating that a certain service body depends on the output of other service bodies. By sorting the DAG through the topological sorting algorithm, the execution order of the task can be determined. During the topological sorting process, select the nodes with an in-degree of 0, output them, then delete the nodes from the DAG, and update the in-degree of the edges starting from these nodes. Repeat this process until all nodes are output. For the description of the DAG structure in the JSON file, it is planned to be implemented through the next_nodes field in each service. This field is an array, and the values in the array are the names of the service bodies for processing. The parallelism of the task is achieved by increasing the number of subsequent service bodies to be processed in the array.

[0112] As shown Figure 3 in the figure, it is a schematic diagram of the splitting of a drone target detection task. The task is abstracted into services using a horizontal splitting method. Horizontal splitting means splitting into different service bodies according to different business functions, such as image drawing services, video encoding services, inference services, etc., to form an independent cluster of service bodies in different business domains. The drone target detection task can be horizontally split into an RTSP decoding service, an inference service, an image drawing task, and an RTSP encoding and streaming service according to functions. These services comply with the splitting principle of low coupling, high cohesion, and single responsibility among each other.

[0113] After splitting, its manifestation form is a configuration file as follows, where class_name is the service type name, parallelism is the service parallelism, device_list is the list of devices on which the current service can run, next_nodes is the list of subordinate nodes of the service, and custom_params is the unique parameter of the service.

[0114] All services in the computing task are derived classes based on the same interface and have the same RPC remote call interface. This class is generated by the SRPC framework through the ProtoBuf protocol file without the need to write it by oneself. For the data communication method between services, please refer to the communication management description in the computing task scheduling module. The service provides four interfaces, InitService, StartService, ExecService, and StopService, to the control node. Among them, the InitService interface is used for the initialization of service resources, the StartService interface is used to start the service data processing listening, the ExecService interface is used to implement the specific business logic of the service, and the StopService interface is used to release service resources.

[0115] From the above description, it can be seen that the present application has achieved the following technical effects:

[0116] In the embodiments of the present application, a method of dynamically abstracting computing tasks is adopted. By receiving and parsing the tasks to be executed, the tasks to be executed are divided into multiple independent service units; a directed acyclic graph representing the dependency relationships between service units is constructed, and topological sorting is performed based on this directed acyclic graph to determine the execution order; according to the resource requirements of each service unit and the current system device status, dynamic resource scheduling and parallel deployment are carried out; through the remote procedure call framework, each service unit is sequentially started, initialized, its business is executed, and resources are released, and the output results are sent to the target node, achieving the purpose that the services have the characteristics of being reusable, state-independent, and interface-standardized, thus realizing the technical effect that the interaction between services is more unified and simple, and further solving the following technical problems existing in traditional task scheduling methods, including but not limited to: rigid resource allocation, inability to dynamically adapt to heterogeneous computing environments (such as GPU, NPU, CPU hybrid deployment), low hardware utilization; low parallel orchestration efficiency, relying on manual definition of the execution order, lacking automated orchestration capabilities, and being difficult to handle complex task processes; insufficient real-time performance, the task execution process is solidified, unable to dynamically adjust resource allocation and execution paths according to the runtime state, and thus difficult to meet the requirements of high efficiency and flexibility.

[0117] As Figure 6 shown, to achieve the above object, according to another aspect of the present application, a service-based computing task dynamic abstraction system is provided. The service-based computing task dynamic abstraction system includes:

[0118] A receiving and parsing module 601, configured to receive and parse the tasks to be executed, and divide the tasks to be executed into multiple independent service units;

[0119] The system first receives the tasks to be executed and parses the task content. The tasks to be executed are usually complex, containing multiple functions or subtasks, and cannot be directly executed at one time; to better manage and execute this task, the system disassembles it into multiple independent service units, and each service unit is responsible for executing a specific function. Through this disassembly, the task becomes more modular, controllable, and easy to optimize.

[0120] A constructing and determining module 602, configured to construct a directed acyclic graph representing the dependency relationships between service units, and perform topological sorting based on this directed acyclic graph to determine the execution order;

[0121] The system constructs a directed acyclic graph (DAG) according to the dependency relationships between service units. Each node in the DAG represents a service unit, and the directed edges between nodes represent the dependency relationships between service units; through the DAG, the system can clearly represent the execution order between each service unit, and on this basis, perform topological sorting to determine which services can be executed in parallel and which services must be executed in sequence.

[0122] The dynamic resource scheduling and parallel deployment module 603 is used to perform dynamic resource scheduling and parallel deployment according to the resource requirements of each service unit and the current system device status;

[0123] The system performs dynamic resource scheduling and parallel deployment according to the resource requirements of each service unit (such as memory, CPU, GPU, etc.) and the resource status of the current device (such as load, idle situation, etc.); the system monitors the resource usage of the computing device in real time and adjusts the resource allocation according to the needs of the task to ensure that each service unit can run on the most suitable device.

[0124] The call output module 604 is used to sequentially complete the startup, initialization, service execution, and resource release of each service unit through the remote procedure call framework, and send the output result to the target node.

[0125] The system controls the life cycle of each service unit through the remote procedure call (RPC) framework to ensure that the process of each service unit from startup to resource release proceeds in an orderly manner; the communication between service units is implemented through RPC, so as to ensure that the service units on different devices can work together and the output results can be smoothly transmitted to the target node.

[0126] From the above description, it can be seen that the present application achieves the following technical effects:

[0127] In the embodiment of the present application, by adopting the method of dynamic abstraction of computing tasks, the to-be-executed task is received and parsed, and the to-be-executed task is divided into multiple independent service units; a directed acyclic graph representing the dependency relationship between service units is constructed, and topological sorting is performed based on the directed acyclic graph to determine the execution order; according to the resource requirements of each service unit and the current system device status, dynamic resource scheduling and parallel deployment are performed; through the remote procedure call framework, the startup, initialization, service execution, and resource release of each service unit are sequentially completed, and the output result is sent to the target node, achieving the purpose that the service has the characteristics of being reusable, state-independent, and interface-standardized, thus realizing the technical effect that the interaction between services is more unified and simple, and further solving the following technical problems existing in the traditional task scheduling method: the resource allocation is rigid, and it cannot dynamically adapt to heterogeneous computing environments (such as GPU, NPU, CPU hybrid deployment), resulting in low hardware utilization; the parallel orchestration efficiency is low, relying on manual definition of the execution order, lacking the ability of automated orchestration, and it is difficult to handle complex task processes; the real-time performance is insufficient, the task execution process is solidified, and it is impossible to dynamically adjust the resource allocation and execution path according to the runtime status, thus making it difficult to meet the requirements of high efficiency and flexibility.

[0128] Such as Figure 7As shown, the electronic device 10 includes at least one processor 11 and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. The memory stores a computer program executable by the at least one processor. The processor 11 can execute various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0129] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disc, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0130] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include but are not limited to a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the method for dynamically abstracting service-based computing tasks.

[0131] In some embodiments, the method for dynamically abstracting service-based computing tasks can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for dynamically abstracting service-based computing tasks described above can be executed. Alternatively, in other embodiments, the processor 11 can be configured to execute the method for dynamically abstracting service-based computing tasks in any other appropriate way (e.g., by means of firmware).

[0132] The various embodiments of the systems and techniques described above in this specification can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that receives data and instructions from, and transmits data and instructions to, a storage system, at least one input device, and at least one output device.

[0133] The computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The computer programs can be executed entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.

[0134] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0135] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0136] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.

[0137] A computing system can include a client and a server. The client and the server are generally far from each other and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system and solves the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.

[0138] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is imposed herein.

[0139] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims

1. A service-based dynamic abstraction method for computing tasks, characterized in that It includes: Receive and parse the task to be executed, and divide the task to be executed into multiple independent service units; Construct a directed acyclic graph representing the dependency relationships between service units, and perform topological sorting based on the directed acyclic graph to determine the execution order; Perform dynamic resource scheduling and parallel deployment according to the resource requirements of each service unit and the current system device status; Complete the startup, initialization, service execution, and resource release of each service unit in sequence through the remote procedure call framework, and send the output result to the target node.

2. The method for dynamically abstracting computing tasks based on services according to claim 1, wherein Receive and parse the task to be executed, and divide the task to be executed into multiple independent service units, including: Divide the task into multiple service units according to functions; Define the hardware mapping, parallelism, and input / output interfaces of each service through a configuration file to standardize the data link between services.

3. The method for dynamically abstracting a service-based computing task according to claim 1, wherein Construct a directed acyclic graph representing the dependency relationships between service units, and perform topological sorting based on the directed acyclic graph to determine the execution order, including: Read the dependency relationship fields in the configuration file to construct DAG graph nodes; Use a topological sorting algorithm to sort the DAG graph, and automatically identify parallel execution paths and dependent execution paths; Perform service orchestration according to the sorting result to determine the running sequence of each service unit.

4. The method for dynamically abstracting service-based computing tasks according to claim 1, wherein Perform dynamic resource scheduling and parallel deployment according to the resource requirements of each service unit and the current system device status, including: Real-time monitor the resource status of each computing device; wherein, the resource status includes: GPU video memory, CPU load, and memory usage rate; Match the current idle resources according to the device list in the service unit configuration, and dynamically allocate the service unit to the target device; When it is detected that the device resources are overloaded, automatically migrate the service to other available nodes, and adjust the parallelism parameter to adapt to the number of service instances.

5. The method for dynamically abstracting service-based computing tasks according to claim 1, wherein Complete the startup, initialization, service execution, and resource release of each service unit in sequence through the remote procedure call framework, and send the output result to the target node, including: Call the startup interface through the remote procedure call framework to start a remote process and establish a communication channel; Call the initialization interface to load the configuration file, initialize the model, driver program, and upload metric items; Call the execution interface to execute the service processing logic defined by the user; After execution, call the stop interface to release resources, and finally close the communication channel.

6. The method for dynamically abstracting computing tasks based on services according to claim 5, wherein The service processing logic includes: Receive the data output by the upstream service; Perform data processing based on a pre-configured algorithm model or rule; Output the processing result to the downstream service or the final output node.

7. The method for dynamically abstracting service-based computing tasks according to claim 1, wherein It also includes: A service quality guarantee mechanism, and the service quality guarantee mechanism includes: Real-time collect the runtime performance metrics of each service unit; When the service delay exceeds the set threshold, automatically adjust the parallelism parameter of the service or migrate the service to other available devices to maintain the overall performance of the system.

8. Service-based dynamic abstraction system for computing tasks, characterized in that It includes: A receive and parse module, which is used to receive and parse the task to be executed, and divide the task to be executed into multiple independent service units; A construct and determine module, which is used to construct a directed acyclic graph representing the dependency relationships between service units, and perform topological sorting based on the directed acyclic graph to determine the execution order; A dynamic resource scheduling and parallel deployment module, which is used to perform dynamic resource scheduling and parallel deployment according to the resource requirements of each service unit and the current system device status; A call output module, which is used to sequentially complete the startup, initialization, service execution, and resource release of each service unit through a remote procedure call framework, and send the output result to the target node.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor is enabled to execute the service-based computing task dynamic abstraction method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, Computer instructions are stored in the computer-readable storage medium, and when the computer instructions are executed by a processor, the service-based computing task dynamic abstraction method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Task execution method and device based on privacy computing, equipment and storage medium

    CN117113416A

  • Task management method, system, device and medium based on graph structure

    CN119781961A

  • Data processing method for task flow engine, and task flow engine, device and medium

    WO2022135079A1

Cited By

  • Kettle task arrangement method and device, equipment and storage medium

    CN121092293A

  • Physical layer data parallel processing method and device, medium and program product

    CN121387568A

  • Physical layer data parallel processing method, device, medium and program product

    CN121387568B

  • Data processing method and related equipment

    CN121523917A

  • Multi-card cluster heterogeneous scheduling method and system based on event bus

    CN121858233A