WO2023224549A2 - 调度方法、装置、设备及存储介质 - Google Patents

调度方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2023224549A2
WO2023224549A2 PCT/SG2023/050309 SG2023050309W WO2023224549A2 WO 2023224549 A2 WO2023224549 A2 WO 2023224549A2 SG 2023050309 W SG2023050309 W SG 2023050309W WO 2023224549 A2 WO2023224549 A2 WO 2023224549A2
Authority
WO
WIPO (PCT)
Prior art keywords
algorithm
node
processing
nodes
group
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/SG2023/050309
Other languages
English (en)
French (fr)
Other versions
WO2023224549A3 (zh
Inventor
张乐林
杨池良
蒋祖尧
梅星
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lemon Inc Cayman Island
Original Assignee
Lemon Inc Cayman Island
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lemon Inc Cayman Island filed Critical Lemon Inc Cayman Island
Priority to US18/866,429 priority Critical patent/US20250321785A1/en
Publication of WO2023224549A2 publication Critical patent/WO2023224549A2/zh
Publication of WO2023224549A3 publication Critical patent/WO2023224549A3/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/30076Arrangements for executing specific machine instructions to perform miscellaneous control operations, e.g. NOP
    • G06F9/3009Thread control instructions
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5033Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering data affinity
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5066Algorithms for mapping a plurality of inter-dependent sub-tasks onto a plurality of physical CPUs
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/483Multiproc
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/484Precedence
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/486Scheduler internals
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5017Task decomposition
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Definitions

  • Embodiments of the present disclosure provide a scheduling method, device, equipment and storage medium, which can schedule algorithm nodes in parallel and improve the throughput rate and computing efficiency during target task processing.
  • a scheduling method including: obtaining an algorithm directed graph corresponding to a target task; wherein, the algorithm directed graph includes a plurality of algorithm nodes. Multiple algorithm nodes in are grouped to obtain multiple node groups; the multiple node groups are scheduled serially, and the processing algorithms corresponding to at least - ⁇ algorithm nodes in the node group are scheduled in parallel.
  • embodiments of the present disclosure also provide a scheduling device, including: an algorithm directed graph acquisition module, configured to obtain an algorithm directed graph corresponding to a target task; wherein, the algorithm directed graph includes multiple algorithm nodes. ; Algorithm node grouping module, configured to group multiple algorithm nodes in the algorithm directed graph to obtain multiple node groups; Scheduling module, configured to schedule the multiple node groups serially, and schedule the multiple node groups in parallel to within the node group A processing algorithm corresponding to one less algorithm node.
  • embodiments of the present disclosure also provide an electronic device.
  • the electronic device includes: one or more processing devices; a storage device configured to store one or more programs.
  • embodiments of the present disclosure also provide a computer-readable medium.
  • the computer-readable medium stores a computer program.
  • the computer program is executed by a processing device, the computer program is implemented as in the embodiments of the present disclosure.
  • Figure 1 is a flow chart of a scheduling method in an embodiment of the present disclosure
  • Figure 2 is an example diagram of an algorithm directed graph in an embodiment of the present disclosure
  • Figure 4 is an example diagram of grouping algorithm nodes in an embodiment of the present disclosure
  • Figure 5 is an example diagram of grouping algorithm nodes in an embodiment of the present disclosure
  • Figure 6 is an example diagram of algorithm scheduling in an embodiment of the present disclosure
  • FIG. 7 is a schematic structural diagram of a scheduling device in an embodiment of the present disclosure
  • FIG. 8 is a schematic structural diagram of an electronic device in an embodiment of the present disclosure.
  • the term “include” and its variations are open-ended, ie, “including but not limited to.”
  • the term “based on” means “based at least in part on.”
  • the term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one additional embodiment”; the term “some embodiments” means “at least some implementations” Example”. Relevant definitions of other terms will be given in the following description. It should be noted that the concepts such as “first”, “second” mentioned in this disclosure are only used to distinguish different devices, modules or units. It is not intended to limit the order or interdependence of the functions performed by these devices, modules or units.
  • Intelligent creation refers specifically to image and video content generation methods based on computer vision and graphics used in video social platforms, through artificial intelligence (such as traditional machine learning or deep learning) Learning) and the application of virtual reality/augmented reality technology, the video content provided by users has more diverse and rich content.
  • Algorithm platform used when users use mobile platforms or other personal computer (PC) platforms for intelligent creation
  • PC personal computer
  • a software system that supports algorithm scheduling and execution.
  • the input of the system is the picture or video information from the camera and the algorithms that need to be run.
  • the execution order and dependencies of these algorithms are described and connected through a directed graph.
  • the output of the system It is the result of the algorithm running, including image classification information, target object detection bounding box and confidence, object segmentation information, generated images, human body or object key point information, etc.
  • Parallel asynchronous framework Based on Central Processing Unit (CPU)
  • CPU Central Processing Unit
  • FIG. 1 is a flow chart of a scheduling method provided by Embodiment 1 of the present disclosure. This embodiment can be applied to the situation of parallel scheduling of algorithm nodes in an algorithm graph.
  • the method can be executed by a scheduling device, and the device can be composed of hardware and/or Or software, and generally can be integrated in a device with a scheduling method function.
  • the device can be an electronic device such as a server, a mobile terminal or a server cluster. As shown in Figure], this method may include the following steps:
  • the algorithm directed graph contains multiple algorithm nodes, each algorithm node is connected by a directed edge, the algorithm nodes on both sides of the directed edge have a dependency relationship, and the algorithm node at the end of the directed edge depends on the algorithm node at the starting end.
  • Figure 2 is an example diagram of an algorithm directed graph in this embodiment. As shown in Figure 2, the algorithm directed graph contains 6 algorithm nodes, where both algorithm node 2 and algorithm node 3 depend on algorithm Node 1, algorithm node 4 depends on algorithm node 2, algorithm node 5 depends on algorithm node 3, algorithm node 6 depends on algorithm node 'point 4' and algorithm node 'point 5'.
  • the target task may be a data processing task that needs to be completed by calling multiple algorithms, for example, it may be an image processing task or an audio processing task.
  • the method of obtaining the algorithm directed graph corresponding to the target task may be: obtaining multiple processing algorithms required for the target task; determining the dependencies of the multiple processing algorithms; and establishing the algorithm directed graph based on the dependencies.
  • the process of obtaining multiple processing algorithms required for the target task can be: first determine the initial state and final state of the object (such as image or audio) that the target task needs to process, and then divide the target task based on the initial state and the final state. into multiple stages, and then determine the processing algorithm that needs to be called for each stage.
  • the method of determining the dependency relationship between multiple processing algorithms may be: determining the dependency relationship between the processing algorithms based on the execution order of the multiple processing algorithms.
  • the way to build an algorithm directed graph based on dependencies can be: Add a directed edge to the algorithm node corresponding to the two processing algorithms with adjacent dependencies, set the dependent algorithm node at the starting end of the directed edge, and set the dependent algorithm node at the beginning of the directed edge. End end settings.
  • Dependent algorithm nodes For example, a target task is to process audio, and the stages it goes through are: first filtering the audio, then performing volume detection on the filtered audio, then amplifying the volume of the audio, and finally performing pitch modification on the audio. .
  • the algorithms that need to be called for this target task include: audio filtering algorithm, volume detection algorithm, volume amplification algorithm and audio pitch modification algorithm.
  • the dependencies of each algorithm are: the volume detection algorithm relies on the processing results of the audio filtering algorithm, the volume amplification algorithm relies on the processing results of the volume detection algorithm, and the audio pitch modification algorithm relies on the processing results of the volume amplification algorithm. Therefore, the directed graph of the algorithm determined is shown in Figure 3.
  • the technical solution of this embodiment establishes an algorithm directed graph based on the dependency relationship between processing algorithms, which can improve the accuracy of the algorithm directed graph.
  • the basis for executing the parallel asynchronous framework is first to find algorithm nodes in the algorithm directed graph that can be executed in parallel. From a structural point of view, when the depth of the algorithm directed graph is equal to the total number of algorithm nodes, there is no possibility of parallel execution of any two algorithm nodes at this time.
  • the depth of the algorithm directed graph may be the number of algorithm nodes included in the longest link. When the depth of the algorithm directed graph is less than the total number of algorithm nodes, the solution of this embodiment is executed. For example, it is necessary to find algorithm nodes that can be processed in parallel in the algorithm directed graph, and divide these algorithm nodes into a group to obtain multiple node groups .
  • the way to group nodes can be: extract the data intersection nodes in the algorithm directed graph; divide the upstream algorithm nodes of the data intersection nodes into a group, divide the downstream algorithm nodes of the data intersection nodes into a group, and use the data intersection nodes as One group, get more Among the node groups, the data sink node can also be called a "bottleneck" node.
  • the # point of the data sink node is that its upstream algorithm nodes need to communicate with its downstream algorithm nodes through this node.
  • the upstream algorithm node can be understood as the algorithm node between the data intersection node and the previous data intersection node
  • the downstream algorithm node of the data intersection node can be understood as the algorithm node between the data intersection node and the next data intersection node.
  • each data intersection node is divided into a group
  • the algorithm nodes between adjacent data intersection nodes are divided into a group.
  • Figure 4 is this embodiment.
  • An example diagram of grouping algorithm nodes in as shown in Figure 4, node 1 and node 4 are data intersection nodes, node 2 and node 3 are both located between node 1 and node 4, node 5 and node 5 are located next to node 4 Downstream, the node will be!
  • the node group obtained using the above solution still has multiple structural forms within the node group. Therefore, a task scheduler is still needed to filter and schedule the nodes in the node group to achieve temporal parallelism.
  • the solution of this embodiment groups algorithm nodes based on data intersection points, which can improve the speed of grouping.
  • the method of grouping multiple algorithm nodes in the algorithm directed graph can be: Obtain the depth of each algorithm node in the algorithm directed graph; Divide algorithm nodes with the same depth into i groups to obtain multiple node groups .
  • the depth of the algorithm node can be understood as the depth of the link where the algorithm node is located. If the algorithm node is on multiple links, the depth of the algorithm node on each link is obtained separately, and the maximum depth is determined as the final depth. . Exemplarily, the maximum depth of each algorithm node in the algorithm directed graph is obtained, and the algorithm nodes with the same maximum depth are divided into a group, thereby obtaining multiple node groups.
  • Figure 5 is a diagram of the algorithm in this embodiment An example diagram of node grouping, as shown in Figure 5, node 2 and node 3 have the same depth, node 4, node 5 and node 6 have the same depth, node 7 and node 8 have the same depth, therefore, node 1 needs to be divided As a group, node 2 and node 3 are divided into a group, node 4, node 5 and node 6 are divided into a group, and node 7 and node 8 are divided into a group.
  • grouping algorithm nodes based on depth can improve the accuracy of grouping.
  • scheduling multiple node groups in series can be understood as scheduling each node group in sequence.
  • the method of serially scheduling multiple node groups may be: if the processing algorithms corresponding to each algorithm node in the currently scheduled node group are all executed, continue to schedule the next node group.
  • the next node group is continued to be scheduled, so that the target tasks are executed in an orderly manner, thereby ensuring the correctness of the results.
  • multiple node groups are scheduled serially, and at least one algorithm node pair within the node group is scheduled in parallel.
  • the corresponding method of processing the algorithm can be: Create threads for multiple algorithm nodes respectively, and set the threads corresponding to the algorithm nodes that have not been found to be in a waiting state; When the current node group is scheduled, start the corresponding thread of the current node group thread, causing the started thread to execute the processing algorithm corresponding to at least one algorithm node in the current node group.
  • the entire algorithm directed graph is automatically executed through the waiting (Waif) and starting (Signed) mechanisms provided by the operating system.
  • the input dependence on the preceding node causes it to automatically enter the waiting state after initialization, and the execution of the completed algorithm node will trigger the start of its subsequent algorithm node thread after outputting the processing result.
  • the source node (Source) of the algorithm directed graph since the source node (Source) of the algorithm directed graph does not depend on any preceding node, it will become the first node to be executed. After the execution is completed, multiple subsequent nodes will be triggered in sequence, and the execution of points until The entire algorithm directed graph execution ends. For example, after creating threads for multiple algorithm nodes respectively, first start the thread corresponding to the starting node group, execute the processing algorithm corresponding to at least one algorithm node in the starting node group in parallel, and the thread corresponding to the subsequent node group enters the waiting state.
  • the thread of the processing algorithm is terminated.
  • the thread corresponding to the next node group is started, so that the starting thread executes the current process in parallel.
  • the algorithm nodes in the node group correspond to the processing algorithms, and so on, until the entire algorithm directed graph is executed.
  • threads are pre-created for multiple algorithm nodes, and then the entire process is controlled by the operating system.
  • the method also includes the following steps: setting a cache pool; storing the processing results of the processing algorithms corresponding to each algorithm node in the cache pool, so that the post-algorithm nodes read the processing results from the cache pool for processing.
  • information between groups can be shared through a unified buffer pool (BufferContainer), which can avoid wasting computing resources.
  • the method of serially scheduling multiple node groups and parallel scheduling the processing algorithm corresponding to at least one algorithm node in the node group can be: when scheduling to the current node group, create and start the thread corresponding to the current node group, so that The started thread executes the processing algorithm corresponding to at least one algorithm node in the current node group; when the processing algorithm corresponding to the algorithm node is completed, the thread corresponding to the algorithm node is terminated, and the processing result is stored in the queue O, where A queue can be used to store the processing results of algorithm nodes.
  • the execution allocation and suspension of threads are implemented through the task scheduler, and the thread pool allocates the processing algorithm corresponding to the thread execution algorithm node.
  • the process of processing the algorithm corresponding to at least one algorithm node in the group may be: reading the processing results from the first queue, and determining the current node group based on the processing results; writing the algorithm node information contained in the current node group into the second queue ; Create and start a thread based on the algorithm node information in the second queue, so that the started thread executes the processing algorithm corresponding to the algorithm node information.
  • the second queue is used to store algorithm node information, that is, node tasks.
  • FIG. 6 is an example diagram of algorithm scheduling in this embodiment.
  • the task scheduler reads the processing results from the first queue, determines the post-node group of the read processing results according to the priority in the algorithm directed graph, and assigns the algorithm nodes of the post-node group to The information is written into the second queue, and the thread pool creates and allocates threads based on the algorithm node information in the first queue to execute the processing algorithms in the post-node group, and writes the processing results of each processing algorithm into the first queue until the algorithm has After the execution of the graph is completed, the final result is output.
  • the solution of this embodiment is implemented to create a startup thread to execute the processing algorithm corresponding to the algorithm node, which can avoid waste of resources and improve the execution efficiency of the algorithm.
  • the technical solution of the embodiment of the present disclosure is to obtain the algorithm directed graph corresponding to the target task; wherein, the algorithm directed graph contains multiple algorithm nodes; group the multiple algorithm nodes in the algorithm directed graph to obtain multiple node groups; Multiple node groups are scheduled serially, and the processing algorithm corresponding to at least one algorithm node in the node group is scheduled in parallel.
  • the scheduling method provided by the embodiment of the present disclosure after grouping multiple algorithm nodes in the algorithm directed graph, schedules multiple node groups in series, and schedules the processing algorithm corresponding to at least one algorithm node in the node group in parallel, which can improve the target task. Throughput and computational efficiency during processing.
  • Figure 7 is a schematic structural diagram of a scheduling device provided by an embodiment of the present disclosure.
  • the device includes: an algorithm directed graph acquisition module 210, configured to obtain an algorithm directed graph corresponding to a target task; wherein the algorithm directed graph contains multiple algorithm nodes; an algorithm node grouping module 220, configured to Group multiple algorithm nodes in the algorithm directed graph to obtain multiple node groups; Scheduling module 23. , is set to serially schedule multiple node groups, and the processing algorithm corresponding to at least one algorithm node in the parallel scheduling node group is optional.
  • the algorithm directed graph acquisition module 210 is set to establish an algorithm directed graph in the following manner: Obtain multiple processing algorithms required for the target task; determine the dependencies of multiple processing algorithms; establish an algorithm directed graph based on dependencies.
  • the algorithm node grouping module 220 is configured to group multiple algorithm nodes in the algorithm directed graph through the following equations j to obtain multiple node groups: Extract the data intersection nodes in the algorithm directed graph; divide the upstream algorithm nodes of the data intersection nodes into - ⁇ groups, divide the downstream algorithm nodes of the data intersection nodes into a group, use the data intersection nodes as ⁇ groups to obtain multiple Node group.
  • the algorithm node grouping module 220 is also configured to group multiple algorithm nodes in the algorithm directed graph in the following manner to obtain multiple node groups: obtain the depth of each algorithm node in the algorithm directed graph; The same algorithm nodes are divided into a group to obtain multiple node groups.
  • the scheduling module 230 is configured to schedule multiple node groups in series in the following manner: If the processing algorithms corresponding to each algorithm node in the currently scheduled node group are all executed, continue to schedule the next node group.
  • the scheduling module 230 is configured to schedule multiple node groups serially in the following manner, and schedule the processing algorithm corresponding to at least one algorithm node in the node group in parallel: create threads for multiple algorithm nodes respectively, and set the The thread corresponding to the scheduled algorithm node is in a waiting state; when the current node group is scheduled, the thread corresponding to the current node group is started, so that the started thread executes the processing algorithm corresponding to at least ⁇ algorithm nodes in the current node group.
  • the device also includes: a cache pool setting module, set to: set the cache pool; store the processing results of the processing algorithms corresponding to each algorithm node in the cache pool, so that the post-algorithm nodes read the processing results from the cache pool Perform processing.
  • a cache pool setting module set to: set the cache pool; store the processing results of the processing algorithms corresponding to each algorithm node in the cache pool, so that the post-algorithm nodes read the processing results from the cache pool Perform processing.
  • the scheduling module 230 is configured to schedule multiple node groups serially in the following manner, and schedule the processing algorithm corresponding to at least one algorithm node in the node group in parallel: When scheduling to the current node group, create and Start the thread corresponding to the current node group, so that the started thread executes the processing algorithm corresponding to at least one algorithm node in the current node group; when the execution of the processing algorithm corresponding to the algorithm node is completed, terminate the thread corresponding to the algorithm node and process the results Store in the first queue.
  • scheduling module 23 When scheduling to the current node group, create and Start the thread corresponding to the current node group, so that the started thread executes the processing algorithm corresponding to at least one algorithm node in the current node group; when the execution of the processing algorithm corresponding to the algorithm node is completed, terminate the thread corresponding to the algorithm node and process the results Store in the first queue.
  • scheduling module 23 When scheduling to the current node group, create and Start the thread corresponding to the current node group, so that the started thread executes
  • the above-mentioned device can execute the methods provided by all the foregoing embodiments of the present disclosure, and has the functional modules and beneficial effects required for executing the above-mentioned methods.
  • FIG. 8 a schematic structural diagram of an electronic device 300 suitable for implementing embodiments of the present disclosure is shown.
  • Electronic devices in embodiments of the present disclosure may include mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (Penscmal PDA), tablet computer
  • Mobile terminals such as (Portable Android Device, PAD), Portable Media Player (PMP), vehicle-mounted terminals (such as vehicle navigation terminals), fixed terminals such as digital TVs, desktop computers, etc., or various forms of servers , such as a standalone server or a server cluster.
  • the electronic device shown in Figure 8 is only an example .
  • the electronic device 300 may include a processing device (such as a central processing unit, a graphics processor, etc.) 301, and the processing device 301 may be stored in a read-only storage device (The program in the Read Only Memory (ROM) 302 or the program loaded from the storage device 308 into the Random Access Memory (Random Access Memory, RAM) 303 executes various appropriate actions and processes.
  • ROM Read Only Memory
  • RAM Random Access Memory
  • I/O interface 305 is also connected to bus 304.
  • input devices including, for example, touch screens, touch pads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.
  • FIG. 8 illustrates electronic device 300 with various means, it should be understood that implementation or availability of all illustrated means is not required. More or fewer means may alternatively be implemented or provided.
  • the processes described above with reference to the flowcharts may be implemented as a computer software program in accordance with embodiments of the present disclosure.
  • embodiments of the present disclosure include a computer program product including a computer program carried on a computer-readable medium, the computer program including program code for executing a scheduling method.
  • the computer program may be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302 ⁇ .
  • the computer program is executed by the processing device 301, the above functions defined in the method of the embodiment of the present disclosure are executed.
  • the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or a combination of the above two.
  • the computer-readable storage medium may, for example, It can be an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or a combination of the above.
  • Examples of computer readable storage media may include: an electrical connection having one or more wires, a portable computer disk, a hard drive, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (such as Electronic Programable Read Only Memory (EPROM) or flash memory), optical fiber, portable compact disk read-only memory
  • the computer-readable storage medium may be a tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus or device.
  • the computer-readable signal medium may include A data signal propagated in baseband or as part of a carrier wave that carries computer-readable program code. This propagated data signal can take many forms, including electromagnetic signals, optical signals, or a suitable combination of the above.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device .
  • Program codes contained on computer-readable media can be transmitted using any appropriate medium, including: wires, optical cables, radio frequency (Radio Frequency, RF), etc., or appropriate combinations of the above.
  • the client and server can communicate using any currently known or future developed network protocol such as HyperText Transfer Protocol (HTTP), and can communicate with digital data in any form or medium. Communication (e.g., communication network) interconnection.
  • HTTP HyperText Transfer Protocol
  • Examples of communication networks include Local Area Network (LAN), Wide Area Network (WAN), Internet (eg, Internet), and end-to-end networks (eg, ad hoc end-to-end network), as well as currently known or networks for future research and development.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; it may also exist independently without being assembled into the electronic device.
  • the above-mentioned computer-readable medium carries at least one program. When the above-mentioned at least one program is used by the electronic device, When executed, the electronic device: obtains the algorithm directed graph corresponding to the target task; wherein the algorithm directed graph contains multiple algorithm nodes; groups the multiple algorithm nodes in the algorithm directed graph to obtain multiple algorithm nodes.
  • the processing algorithm O can be written in one or more programming languages or a combination thereof for executing the present invention.
  • the above-mentioned programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as "C" language or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer Execution, or execution entirely, on a remote computer or server.
  • the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as through the Internet using an Internet service provider)
  • LAN local area network
  • WAN wide area network
  • O Internet service provider
  • each block in the block diagram and/or flowchart illustration, and combinations of blocks in the block diagram and/or flowchart illustration can be constructed by specialized hardware-based systems that perform the specified functions or operations. Implementation, or can be implemented by a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments described in the present disclosure can be implemented by software or hardware. Among them, the name of a unit does not constitute a limitation on the unit itself under certain circumstances.
  • the functions described above herein may be performed, at least in part, by at least one hardware logic component.
  • machine-readable media may be tangible media that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device.
  • the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • Machine-readable media may include electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or devices, or suitable combinations of the foregoing.
  • Examples of machine-readable storage media may include data based on one or more Electrical connections of individual wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), fiber optics, portable compact disks Read memory (CD-ROM), optical storage device, magnetic storage device, or a suitable combination of the above.
  • the embodiments of the present disclosure disclose a scheduling method, including: Obtain the algorithm directed graph corresponding to the target task; wherein, the algorithm directed graph contains multiple algorithm nodes.
  • obtaining the algorithm directed graph corresponding to the target task includes: obtaining multiple processing algorithms required for the target task; determining the dependencies of the multiple processing algorithms; establishing an algorithm directed graph based on the dependencies picture.
  • grouping multiple algorithm nodes in the algorithm directed graph includes: extracting the number ⁇ intersection node in the algorithm directed graph; dividing the upstream algorithm node of the data intersection node into group, divide the downstream algorithm nodes of the data intersection node into a group, and use the data intersection node as a group to obtain multiple node groups.
  • grouping multiple algorithm nodes in the algorithm directed graph includes: obtaining the depth of each algorithm node in the algorithm directed graph; dividing algorithm nodes with the same depth into ⁇ groups, obtaining Multiple node groups.
  • serially scheduling the multiple node groups includes: if the processing algorithm corresponding to each algorithm node in the currently scheduled node group is completed, continue to schedule the next node group.
  • scheduling the plurality of node groups in series, and scheduling the processing algorithm corresponding to at least one algorithm node in the node group in parallel includes: creating threads for the multiple algorithm nodes respectively, and setting unused threads.
  • the thread corresponding to the scheduled algorithm node is in a waiting state; when the current node group is scheduled, the thread corresponding to the current node group is started, so that the started thread executes the processing corresponding to at least one algorithm node in the current node group algorithm.
  • the method further includes: setting up a cache pool; and storing the processing results of the processing algorithms corresponding to each algorithm node in the cache pool, so that the post-algorithm nodes read the processing results from the cache pool for processing. deal with.
  • the plurality of node groups are scheduled in series, and at least one computing node in the node group is scheduled in parallel.
  • the processing algorithm corresponding to the method node includes: when scheduling to the current node group, create and start the thread corresponding to the current node group, so that the started thread executes the processing corresponding to at least ⁇ algorithm nodes in the current node group Algorithm; When the execution of the processing algorithm corresponding to the algorithm node is completed, the thread corresponding to the algorithm node is terminated, and the processing result is stored in the first queue.
  • create and start a thread corresponding to the current node group so that the started thread executes a processing algorithm corresponding to at least one algorithm node in the current node group, including: reading processing from the first queue result, and determine the current node group according to the processing result; write the algorithm node information contained in the current node group into the second queue; create and start a thread based on the algorithm node information in the second queue, so that the started The thread executes the processing algorithm corresponding to the algorithm node information.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Multi Processors (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • General Factory Administration (AREA)

Abstract

说明书摘要本公开实施例公开了一种调度方法、装置、设备及存储介质。该方法包括:获取目标任务对应的算法有向图;其中,所述算法有向图包含多个算法节点;对所述算法有向图中的多个算法节点进行分组,获得多个节点组;串行调度所述多个节点组,并行调度所述节点组内的至少一个算法节点对应的处理算法。

Description

调度 方法、 装置、 设备及存储 介质 本公 开要求在 2022年 5月 16日提交中国专 利局、申请号为 202210527828.7 的 中国专利 申请的优 先权, 以上申请的全部 内容通过 引用结合 '在本公开中。 技术 领域 本公 开实施例 涉及计 算机技 术领域 , 例如涉及一种 调度方 法、 装置、 设备 及存 储介质 。 背素 技术 随着 计算机视 觉和 图形学的 快速发 展, 通过人工智 能 (如: 机器学习或者 深度 学习) 和虚拟增 强现实技 术可以 生成丰富 多样的 图像。 对于 一个图像 处理任 务, 通常需要 调用多个 算法实 现。 相关技术 中, 各算 法 以一定的顺 序依次 执行, 影响了整 个任务的 吞吐率及 计算效 率。 发明 内容 本公 开实施例 提供一 种调度 方法、 装置、 设备及存储介质 , 可以并行调度 算法 节点, 提高目标 任务处理 时的吞 吐率及计 算效率 。 第一 方面, 本公开实 施例提供 了 --种调度方法, 包括: 获取 目标任 务对应 的算法有 向图; 其中, 所述算法有向 图包含多 个算法 节 占 - 对所 述算法有 向图中 的多个算 法节点进 行分组 , 获得多个节点 组; 串行 调度所 述多个 节点组, 并行调度所述 节点组 内的至少- ■■个算法节点对 应的 处理算 法。 第二 方面, 本公开实施例还提 供了一种 调度装 置, 包括: 算法 有向图获 取模块 , 设置为获取 目标任 务对应的 算法有 向图; 其中, 所 述算 法有向 图包含多 个算法 节点; 算法 节点分组 模块, 设置为对所 述算法 有向图 中的多个 算法节点 进行分 组, 荻得 多个节 点组; 调度 模块, 设置为串行调度 所述多 个节点 组, 并行调度所 述节点 组内的 至 少一 •个算法节点对应 的处理算 法 第三 方面, 本公开实 施例还提 供了一种 电子设 备, 所述电子设备 包括 : 一个 或多个处 理装置 ; 存储 装置, 设置为存储 一个或 多个程序 ; 当所 述一个 或多个程 序被所 述一个 或多个 处理装 置执行, 使得所述一个或 多个 处理装 置实现如 本公开实 施例所 述的调度 方法。 第四 方面, 本公开实施例还 提供 了一种计算 机可读 介质, 所述 .计算机可读 介质 上存储 甫计算机 程导 , 所述计算机程 ./予被处理装置执行时实现如本公 开实 施例 所述.的调度方法 O 附 图说明 图 1是本公开实 施例中 的 ' 1种调度方法的流程图; 图 2是本公开实 施例中 的一种算 法有向 图的示例 图;
Figure imgf000004_0001
图 4是本公开实 施例中 的对算法 节点进行 分组的 示例图 ; 图 5是本公开实 施例中 的对算法 节点进行 分组的 示例图 ; 图 6是本公开实 施例中 的算法调 度示例 图; 图 7是本公开实 施例中 的一种调 度装置的 结构示 意图; 图 8是本公开实 施例中 的一种电 子设备的 结构示 意图。 具体 实施方 式 下面 将参照 附图描述 本公开 的实施 例 O 虽然附图中显 示了本 公开的 某些实 施例 , 然而应当理解 的是 , 本公开可以通 过各种形 式来实 现。 应当理解 的是, 本公 开的附 图及实施 例仅用于 示例性 作用。 应 当理解-, 本公开的方法实 施方式 中记载 的各个 步骤可 以按照不 同的顺序 执行 , 和 /'或并行执行。 此外, 方法实施方式可以包括附加的 步骤和/或省略 执行 示 出的步骤 。 本文 使用的术 语 “包括 ”及其变形是开放性 包括,即 “包括但不限于”。术语 “基 于 ”是 “至少部分地基于”。 术语 “一个实施例 ”表示 “至少一个实施例” ; 术语 “另一 实施 例 ”表示 “至少一个另外的 实施例 ”; 术语 “一些实施例 ”表示 “至少一些实施 例 ”。 其他术语的相关 定义将 .在下文描述中给出 需要 注意, 本公开中提 及的 “第一 ”、 “第二 ”等概念仅用于对不同的装置、模 块或 单元进 行区分 , 并非用于限定 这些装 置、 模块或单元 所执行 的功能 的顺序 或者 相互依 存关系 O 需要 注意, 本公开中提 及的 “一个”、 "多个 ”的修饰是示意性的, 本领域技术 人 员应当理解 , 除非在上下文 另有明确 器出, 否则应该理解为 “一个或多 个”. 本公 开实施 方式中 的多个装 置之间 所交互 的消息或 者信息 的名称 仅用于说 明性 的目的 , 而并不是用于对 这些消 息或信 息的范围进 行限制 。 智能 创作: 特指视频类社 交平台中 所使用 的基于计 算机视 觉和图 形学的 图 像视 频内容 生成方 法, 通过人工智 能 (例如传统机 器学习或 深度学 习) 和虚拟 现实/增强 现实技 术的应 用, 使用户提供的视 频内容具 备更加 多元丰富 的内容 。 算法 平台:在用户 使用移动 平台或 其他个人 计算机 (Personal Computer , PC ) 平 台进行智 能创作 时所使 用的支持 算法调 度与执行 的软件 系统 , 该系统的 输入 为来 自相机 的图片 或视频信 息以及 所需要 运行的算 法, 这些算法 的执行 顺序与 依赖 关系通 过有向 图来描述 和连接 , 该系统的输 出为算法 运行的 结果, 包括图 像分 类信息 、 目标物体检测 包围框 及置信 度、 物体分割信 息、 生成图像 、 人体 或物 体关键 点信息等. 并行 异步框架 : 基于中央处理 器 (Central Processing Unit, CPU) 多线程加 速或 其他硬 件的软件 优化框 架, 该框架的主 要作 用是在多 线程技 术的支持 下, 通过 拆解和动 态分配 可以并 发执行的 任务来提 高系统 的整体吞 吐率和 计算效率 O
.在当前的智 能创作 计算平 台上, 对每一张 图像, 算法图 中的各个 计算节 点 均 以顺序方 式执行 , 且节点之间不 存在多 帧结果 的缓存 , 造成了潜在的 计算资 源浪 费。 图 1为本公开实 施例一提 供的一 种调度 方法的流 程图, 本实施例可 适用于并 行调 度算法 图中的 算法节 点的情况 , 该方法可以 由调度装 置来执 行, 该装置可 由硬 件和/或软件 组成, 并一般可集成在 具有调度 方法功 能的设备 中, 该设备可 以是 服务器 , 移动终端或服务 器集群 等电子设 备。 如图]所示, 该方法可包括如 下 步骤:
S110 , 获取目标任务 对应的 算法甫 向图。 其 中, 算法有向图 包含多个 算法节 点, 各算法节 点之间通 过有向 边连接 , 有 向边两湍 的算法 节点具有 依赖关 系, 有向边结束 端的算 法节点 依赖起始 端的 算 法节点。 示例性的, 图 2是本实施例中的 一种算 法有向 图的示例 图, 如图 2所 示, 该算法有向图包 含 6个算法节点, 其中, 算法节点 2和算法节 点 3均依赖算法 节点 1 , 算法节点 4依赖算法节点 2, 算法节点 5依赖算法节点 3 , 算法节点 6依赖 算法 节'点 4和算法节'点 5。 其 中, 目标任务可 以是需要 调用多 种算法 完成的数 据处理 任务, 例如可以 是 图像处理任 务或者 音频处理 任务等 。 示例 性的, 获取 目标任务对 应的算 法有向 图的方 式可以是 : 获取目标任 务 所需 的多个 处理算 法 ; 确定多个处理 算法的依 赖关 系; 基于依赖关 系建立算 法 有 向图。 其 中, 获取目标任务 所需的 多个处 理算法 的过程可 以是 : 首先确定目标任 务所 需处理 的对象 (如图像或者音 频) 的初始状 态以及最 终状态 , 然后基于初 始状 态和最 终状态将 目标任 务划分 为多个 阶段, 然后确定出每个 阶段所 需调用 的处 理算法 。 确定多个处理 算法的 依赖关 系的方 式可以是 : 根据多个处 理算法 的执 行顺序 确定出处 理算法 间的依 赖关系 。 基于依赖关 系建立算 法有向 图的方 式可 以是 : 在具有相邻依赖 关系的 两个处 理算法对 应的算 法节点 添加有 向边 , 有 向边的起始 端设置 被依赖的 算法节 点 , 有向边的结束端 设置 .依赖的算法节点。 示例 性的, 一目标任务是对 音频进 行处理 , 其经历的阶段 为: 首先对音频 进行 滤波 处理, 然后对滤波后的 音频进 行音量检 测, 再然后对 音频进 行音量放 大, 最后 对音频进 行变调 处理。 从上述可 以看出, 该目标任 务需要调 用的算 法包括: 音频 滤波算 法、 音量检测算 法、 音量放大 算法及音 频变调 算法。 且各算法的依 赖关 系为 : 音量检测算法依 赖音频 滤波算 法的处理 结果、 音量放大算法依 赖音 量检 测算法 的处理 结果, 音频变调 算法依 赖音量放 大算法 的处理 结果。 因此确 定 出的算法 有向图参 见图 3。 本实施例的技术方 案, 基于处理算 法间的依 赖关系 建立 算法有 向图, 可以提高算 法有向 图的准确 性 O
S120, 对算法有向 图中的多 个算法节 点进行分 组, 获得多个 节点组。 本实 施例中 , 并行异步框架 执行的 基础首先 在于找 到算法 有向图 中可以并 行执 行的算 法节点 。 从结构上来看 , 当算法有向 图的深度 与算法 节点总数 量相 等时 , 此时没有任何 两个算 法节点 存在并 行执行的 可能性 。 其中, 算法有向图 的深 度可 以是最长 的链路 中包含的 算法节 点的数量 , 当算法有向 图的深度 小于 算法 节点总数 量时, 执行本实施 例的方 案。 示例 性的, 需要在算法有 向图中查 找到可 以并行处 理的算 法节点 , 将这些 算法 节点划分 为一组 , 从而获得多个 节点组 o 可选 的, 对算法有向 图中的多 个算法 节点进行 分组的 方式可 以是: 提取算 法有 向图 中的数据 交汇节 点; 将数据交汇 节点的上 游算法 节点划 分为一 组, 将 数据 交汇节 点的下 游算法 节点划分 为一组 , 将数据交汇 节点作为 一组, 获得多 个 节点组 其 中 ,数据吏汇节 点也可 以称之为 "瓶颈 "节点 ,数 <交汇节点的 #点 是其上 游的 算法节 点均需 通过该 节点与其 .下游的算法节 点进行联 通 O 数据交汇节 点的 上游 算法节 点可以 理解为处 于该数 据交汇 节点与上 一个数 据交汇 节点间 的算法 节 点, 数据交汇节 点的下游 算法节 点可以 理解为 处于该数 据交汇 节点与 下一个 数据 交汇节 点间的 算法节 点。 示例性的, 当确定出多个数 据交汇 节点, 将各数 据 交汇节点 分别划分 为一组 , 将相邻数据交汇 节点之 间的算法 节点划分 为一组 O 示例 性的, 图 4是本实施例中对算法节 点进行分 组的示例 图, 如图 4所示, 节点 1 和 节点 4为数据交汇 节点, 节点 2和节点 3均位于节点 1与节点 4之间, 节点 5和节 点 5位于节点 4的下游, 则将节点!划分为 1组, 节点 2和节点 3划分为一组, 节点 4 划分 为 1组, 节点 5和节点 6划分为一组。 需要注意的是, 采用上述 方案获得 的节 点组 , 节点组内仍 然存在 多种结构 形式, 因此还是需要任 务调度 器来对 节点组 内的 节点进 行筛选 和调度 , 从而实现时序 上的并行 。 本实施例的 方案, 基于数 据 交汇点时 算法节点 进行分组 , 可以提高分组 的速度 。 可选 的, 对算法有 向图中的 多个算 法节点进 行分组 的方式 可以是 : 获取算 法有 向图 中各算法 节点的深 度; 将深度相 同的算 法节点划 分为 i组 , 获得多个 节 点组。 其 中, 算法节点的深 度可 以理解为 算法节 点所处链 路的深 度, 若算法节 点 处于 多个链 路上, 则分别获取算法 节点在 各链路上 的深度 , 将最大的深 度确定 为最 终的深 度。 示例性的, 获取各算 法节点 在算法 有向图的 最大深 度 , 将最大 深度 相同的 算法节点 划分为一 ■组, 从而获得多个节点 组. 示例性的, 图 5是本实 施例 中对算 法节点进 行分组 的示例 图, 如图 5所示, 节点 2和节点 3的深度相同, 节 点 4、 节点 5和节点 6的深度相同, 节点 7和节点 8的深度相同, 因此, 需要将节 点 1划分为一 组, 节点 2和节点 3划分为一组, 节点 4、 节点 5和节点 6划分为一组, 节 点 7和节点 8划分为一组。 本实施例中, 基于深度 对算法 节点进行 分组, 可以 提 高分组的 准确性。
S130, 串行调度多 个节点 组, 并行调度节 点组内 的至少一 个算法 节点对 应 的处 理算法 。 其 中, 串行调度多个 节点组 可以理 解为依 次调度各 节点组 。 示例性的, 串 行调 度多个 节点组 的方式 可以是 : 若当前调度的 节点组 内的各算 法节点 对应的 处理 算法均 执行完 成, 则继续调度 下一个 节点组 。 本实施例中, 当前节点组的 各算 法节点 对应的 处理算 法均执行 完成后 , 才继续调度下 一个节 点组, 使得 目 标任 务的有 序执行 , 从而保证结 果的正确 性。 可选 的, 串行调度多个节 点组, 并行调度 节点组 内的至少 一个算 法节点对 应的 处理算 法的方 衣,可以是: 对多个算法节点分 别创建 线程, 并设置未被倜度 到的 算法节 点对应 的线程处 于等待 状态; 当调度到当前节 点组时 , 启动当前节 点组 对应的 线程, 使得启动 的线程 执行当 前节点组 内的至 少一个 算法节 点对应 的处 理算法 。 本实 施例中 , 对多个算法节 点分别 创建线程 之后 , 整个算法有向 图通过操 作 系统提供 的等待 (Waif) 与启动 (Signed)机制自动执行。 对每一个算法节点, 对前 置节点 的输入依 赖使其 在初始 化之后 t)动进入等待状态, 而执行完成 的算 法节 点输出 处理结果 后会触 发其后置 算法节点 线程的启 动, 在这种规则框 架下, 由于 算法有 向图的源 节点 ( Source) 不依赖于任何前置节点 , 将成为第一个被执 行的 节点, 执行结束后将顺 次触发 多个后 置节 ,点、的执行直至整个算法有向图执 行结 束。 示例 性的, 对多个算法节点 分别创 建线程之 后, 首先启动 起始节 点组对应 的线 程, 并行执行起 始节 点组内至 少一个 算法节 点对应的 处理算 法, 后置节点 组对 应的线 程进入 等待状 态。 当起始节点 组内的一 个处理 算法执 行完成 后, 终 止该 处理算 法的线程 , 当起始节点 组内所 有处理算 法均执 行完成 后, 启动下一 个节 点组对 应的线程 , 使得启动线程 并行执 行当前 节点组 内的算 法节点对 应的 处理 算法, 依次类推, 直到整个算 法有向 图执行 完成。 本实施例 中, 对多个算 法节 点预先 创建线程 , 然后整个过 程由操 作系统 掌控完成 , 其优势在于执 行过 程可 以针对 不同平台 上。 可选 的, 该方法还 包括如下 步骤: 设置缓存池; 将各算法 节点对 应的处理 算法 的处理 结果存储 至缓存 池, 使得后置 算法节 点从缓存 池中读 取处理 结果进 行处 理。 本实 施例中, 组间信息可以通 过统一的 缓存池 ( BufferContainer) 实现输入 输 出信息的共 享, 可以避免浪 费计算 资源。 可选 的, 串行调度 多个节点 组, 并行调度 节点组 内的至 少一个算 法节点对 应的 处理算 法的方 式可以是 : 当调度到当 前节点组 时, 创建并启 动当前 节点组 对应 的线程 , 使得启动的线 程执行 当前节 点组内 的至少一 个算法 节点对 应的处 理算 法; 当算法节点对应的 处理算 法执行 完成时 , 终止算法节点 对应的 线程, 并将 处理结 果存入第 --队列 O 其 中, 第一队列可 以用于存 储算法 节点的 处理结 果。 本实施例中 , 通过任 务调 度器来 实现线程 的实施 分配和 中止, 由线程池分配线 程执行 算法节 点对应 的处 理算法 。 其 中, 创建并启动 当前节点 组对应 的线程 , 使得启动的线程 执行 当前 ■节点 组 内的至少 一个算 法节点对 应的处 理算法 的过程 可以是 : 从第 —队列中读 取处 理结 果, 并根据处 理结果确 定当前 ■节点组; 将当前节点组 包含的 算法节 点信息 写入 第二 队列; 基于第二 队列中的 算法节 点信息 创建并启 动线程 , 使得启动的 线程 执行算 法节点信 息对应 的处理算 法。 其 中, 第二队列用于 存储算法 节点信 息, 即节点任务 。 示例 性的, 图 6是本实施例中算法调 度示例 图。 如图 6所示, 任务调度器从 第一 队列 中读取处 理结果, 根据算法 有向图 中的优 先级, 确定读取到 的处理结 果的 后置节 点组, 将后置 节点组的 算法节 点信息 写入第二 队列, 线程池根据第 一 队列中的 算法节 点信息创 建并分 配线程 来执行后 置节点 组内的 处理算 法, 并 将各 处理算 法的处 理结果 写入第一 队列, 直到算法有向 图执行完 成, 将最终的 结果 输出. 本实施例 的方案 , 实施的创建启 动线程 以执行算 法节点 对应的 处理 算 法, 可以避免资源 的浪费 , 并可以提高算 法的执行 效率。 本公 开实施 例的技术 方案 , 获取目标任务 对应的算 法有向 图; 其中, 算法 有 向图包含 多个算 法节点 ; 对算法有向图 中的多个 算法 节点进行 分组, 获得多 个 节点组 ; 串行调度多个 节点组 , 并行调度 节点组 内的至 少一个算 法节点 对应 的处 理算法 。 本公开实施例 提供的 调度方 法, 对算法有 向图中的 多个算 法节点 分组 后, 串行调度多个节 点组, 并行调度 节点组 内的至 少一个算 法节点 对应的 处理 算法, 可以提高目标任 务处理时 的吞吐率 及计算 效率。 图 7是本公开 实施例提 供的一 种调度 装置的 结构示意 图。 如图 7所示, 该装 置 包括: 算法 有向图获 取模块 210, 设置为获 取目标任 务对应 的算法有 向图; 其中, 算 法有向图 包含多个 算法节 点; 算法 节点分组 模块 220, 设置为对算 法有向 图中的多 个算法节 点进行分 组, 获得 多个节 点组; 调度 模块 23。, 设置为串行调度多个节点 组, 并行调度节 点组内的 至少一 个 算 法节点对-应的处理 算法 可选 的, 算法有向图获 取模块 210, 设置为通过以下 方式建立 算法有 向图: 获取 目标任 务所需的 多个处理 算法; 确定 多个处理 算法的依 赖关 系; 基于 依赖关 系建立算 法有向 图。 可选 的, 算法节点分 组模块 220, 设置为通过 以下方衣 j对算法有向图 中的多 个算 法节点进 行分组 , 获得多个节点 组: 提取 算法有向 图中的数 据交汇 节点; 将数 据交汇 节点的上 游算法 节点划 分为- ■■组 , 将数据交汇节点的下游 算法 节点 划分为一 组, 将数据交汇 节点作 为 ~组, 获得多个 节点组。 可选 的, 算法节点分组 模块 220, 还设置为通过 以下方 式对算法 有向图 中的 多个 算法节 点进行分 组, 获得多个节 点组: 获取 算法有向 图中各算 法节点 的深度 ; 将深 度相同的 算法节 点划分为 一组, 获得多个 节点组。 可 .选的, 调度模块 230, 设置为通过以下方式 串行调度 多个节 点组: 若 当前调度 的节点组 内的各 算法节 点对应 的处理算 法均执 行完成 , 则继续 调度 下一个 节点组。 可 .选的, 调度模块 230, 设置为通过以下方式 串行调度 多个节 点组, 并行调 度 节点组内 的至少一 个算法 节点对应 的处理算 法: 对多 个算法 节点分别 创建线 程, 并设置未被 调度到 的算法 节点对 应的线程 处于 等待状 态; 当调 度到当前 节点组 时, 启动当前 节点组对 应的线 程, 使得启动的 线程执 行 当前节点组 内的至 少 ~个算法 节点对应 的处理 算法。 可选 的, 该装置还包括 : 缓存池设置模 块, 设置为: 设置 缓存池 ; 将各 算法节 点对应的 处理算 法的处 理结果存 储至缓 存池, 使得后置算法 节 点从 缓存池 中读取处 理结果进 行处理. 可.选的, 调度模块 230, 设置为通过 以下方式 串行调度 多个节 点组, 并行调 度 节点组内 的至少一 个算法 节点对应 的处理算 法: 当调 度到当前 节点组 时, 创建并启动 当前 节点组对 应的线程 , 使得启动的 线程.执行当前 节点组 内的至少 一个算 法节点对 应的处理 算法 ; 当算 法节点对 应的处 理算法 执行完 成时, 终止算法 节点对 应的线程 , 并将 处理 结果存 入第一队 列。 可 .选的, 调度模块 23。, 设置为通过以下方式创建并启动 当前节点 组对应的 线程 , 使得启动的线程 执行当前 节点组 内的至 少一个算 法节点对 应的处理 算法 : 从第 一队列 中读取处理 结果, 并根据处理结果确 定当前 节点组 ; 将当 前节点组 包含的算 法节点 信息写 入第二队 列; 基于 第二队 列中的 算法节 点信息创 建并启 动线程 , 使得启动的线程 执行算 法 节点信息 对应的处 理算法 。 上述 装置可 执行本公 开前 述所有实 施例所 提供的 方法, 具备执行 上述方 法 才目应的功能模块 和有益 效果。 未在本实施例中 详尽描述 的技术 细节, 可参见本 公 开前述所 有实施例 所提供 的方法。 下 面参考 图 8, 其示出了适于 用来实现 本公开 实施例 的电子设 备 300的结构 示 意图。 本公开实施例中 的电子设 备可 以包括诸如 移动 电话、 笔记本电脑 、 数 字 广播接 收器、 个人数字助 理 (Penscmal
Figure imgf000011_0001
PDA ) 、 平板电脑
(Portable Android Device, PAD)、便携式多媒体播放器 (Portable Media Player, PMP) 、 车载终端 (例如车载 导航终端) 等的移 动终端 以及诸如 数字 TV、 台式 计算 机等的 固定终端 , 或者各种形式 的服务 器, 如独立服务器 或者服务 器集群 。 图 8示出的电 子设备仅 仅是一 个示例 0 如 图 8所示, 电子设备 300可以包括处理 装置 (例如中央 处理器 、 图形处理 器 等) 301 , 处理装置 301可以根据存储在只读 存储装 置 ( Read Only Memory, ROM ) 302中的程序 或者从 存储 装置 308加载到 随机访 问存 储装 置 ( Random Access Memory, RAM) 303中的程序而执 行各种 适当的动 作和处 理。在 RAM 303 中 , 还存储有电子设备 300操作所需 的各种程 序和数 据。处理装 置 301、 ROM 302 以 及 RAM 303 M过总线 304彼此相连。 输入 /输出 (Input/Output, I/O) 接口 305 也连 接至总 线 304。 通 常, 以下装置可 以连接至 1/'0接口 305 : 包括例如触摸屏、 触摸板、 键盘、 鼠 标、 摄像头、 麦克风、 加速度计、 陀螺仪等的输入装 <306 ; 包括例如液晶 显 示 器 (Liquid Crystal Display, LCD) 、 扬声器、 振动器等的输出装置 307 ; 包括 例如 磁带、 硬盘等的 存储装置 308 ; 以及通信装置 309. 通信装置 309可以允许电 子设 备 300与其他设备 进行无 线或有 线通信 以交换数 据。 虽然图 8示出了具有 各 种装 置的电 子设备 300,但是应 理解的是 ,并不要求 实施或具 备所有示 出的装 置。 可 以替代地 实施或具 备更多 或更少的 装置。 在一 实施例 中, 根据本公 开的实施 例 , 上文参考流程 图描述 的过程 可以被 实现 为计算 机软件 程序。 例如, 本公开的实施例 包括一种 计算机 程序产 品, 其 包括 承载在 计算机 可读介 质上的计 算机程 序, 该计算机程 序包含 用于执 行调度 方 法的程序 代码。 在这样的实 施例中 , 该计算机程序 可以通过 通 .信装置 309从网 络上 被下载 和安装, 或者从存储装置 308被安装, 或者从 ROM 302<安装。 在该 计算 机程序 被处理装 置 301^1行时, 执行本公开实施例 的方法 中限定 的上述功 能。 需要 说明的 是, 本公开上 述的计算 机可读 介质可 以是计算 机可读 信号介 质 或 者计算机 可读存 储介质 或者是上 述两者 的组合 。 计算机可读存 储介质 例如可 以是 电、 磁、 光、 电磁、 红外线、 或半导体的系 统、 装置或器件, 或者以 上的 组 合。 计算机可读 存储介 质的示例 可以包 括: 具有一个或 多个导 线的电 连接、 便携 式计算 机磁盘、 硬盘、 随机访问存储器 (RAM) 、 只读存储器 (ROM) 、 可 擦式可 编程只 读存储 器 (如电子可 编程只 读存储 器 (Electronic Programable Read Only Memory, EPROM) 或 闪存) 、 光纤、 便携式紧凑磁 盘只读 存储 器
( Compact Di sc-Read Only Memory , CD-ROM ) 、 光存 ■储器件、 磁存储器件、 或 者上述 的合适的 组合。 在本公开 中, 计算机可 读存储介 质可 以是包含 或存储 程序 的有形 介质, 该程序可以被指 令执行 系统、 装置或者器件使 用或者 与其结 合使 用. 而在本公开 中, 计算机可读 信号介 质可以 包括在基 带中或 者作为 载波 一部 分传播 的数据 信号, 其中承载了计算 机可读 的程序代 码。 这种传播 的数据 信 号可以采 用多种 形式, 包括电磁信 号、 光信号或 上述的合 适的组 合。 计算机 可 读信号介 质还可 以是计 算机可读 存储介 质以外 的任何计 算机可 读介质 , 该计 算机 可读信 号介质 可以发送 、 传播或者传 输用于 由指令执 行系统 、 装置或者器 件使 用或者 与其结 合使用 的程序 。 计算机可读介 质上包含 的程序 代码可 以用任 何适 当的介 质传输, 包括: 电线、 光缆、 射频 (Radio Frequency, RF) 等, 或 者上 述的合 适的组合 。 在 一些 实施 方式 中 , 客户 端、 服务 器可 以利 用诸 如超 文本 传输 协议 (HyperText Transfer Protocol, HTTP) 之类的任何当前已知或未来 研发的 网络 协 议进行通 信, 并且可以与任 意形式 或介质的 数字数据 通信 (例如, 通信网络) 互连 。通信网络 的示例 包括局域 网 (Local Area Network, LAN) , 广域网 (Wide Area Network, WAN) , 网际网 (例如, 互联网) 以及端对端 网络 (例如, ad hoc 端对 端网络) , 以及当前已知或未 来研发 的网络。 上述 计算机 可读介质 可以是上 述电子 设备中所 包含的 ; 也可以是单独存在, 而 未装配入 该电子设 备中 O 上述 计算机 可读介 质承载 有至少一 个程序, 当上述 至少一 个程序被 该电子 设备 执行 时, 使得该电子设备 : 获取目标任 务对应 的算法有 向图 ; 其中 , 所述 算 法有向 图包含多个 算法节 点 ; 对所述算法有向 图中的 多个算法 节点进行 分组, 获得 多个 节点组; 串行调度 所述多个 节点组, 并行调 度所述 节点组 内的至少 一 个算 法节点 对应的处 理算法 O 可 以以一种 或多种程 序设 计语言或 其组合 来编写 用于执行 本公开 的操作 的 计 算机程序 代码 , 上述程序设计 语言包 括面向 对象的程 .序设计语言诸 如 Java.、 Smalltalk. C++, 还包括常规 的过程 式程序设 计语言 诸如 “C"语言或类似 的程序 设 计语言 。 程序代码可以 完全地在 用户计 算机上 执行、 部分地在 用户计 算机上 执 行、 作为一个独 立的软件 包执行 、 部分在用户 计算机上 部分在 远程计 算机上 执 行、 或者完全 .在远程计算机或服 务器上 执行。 在涉及远程计算 机的情 形中, 远程 计算机 可以通 过任 意种类的 网络包 括局域 网 (LAN)或广域网 (WAN) 连接到 用 户计算机 , 或者, 可以连接到外 部计算 机 (例如利用因特 网服务 提供商 来通 过 因特网连接) O 附 图中的流 程图和 框图, 图示了按照本公 老各种 实施例的 系统、 方法和计 算机 程序产 品的可 能实现 的体系架 构、 功能和操作 。 在这点上, 流程图或框图 中 的每个方 框可以代 表一 ■个模块、 程序段、 或代码的一部分, 该模块、 程序段、 或代 码的一 部分包 含一个 或多个 用于实现 规定的 逻辑功 能的可执 行指令 o 也应 当 注意, 在有些作 为替换 的实现 中, 方框中所标 注的功能 也可 以以不同 于附图 中所 标注 的顺序发 生。 例如, 两个接连地 表示的 方框实际 上可以 基本并 行地执 行 , 它们有时也可 以按相反 的顺序 执行, 这依所涉及的功 能而定 。 也要注意的 是 , 框图和 /'或流程图中的每个方框、 以及框图和/或流程 图中的 方框的组 合, 可 以 用执行规 定的功 能或操 作的专 用的基于 硬件的 系统来 实现, 或者可以 用专用 硬件 与计算 机指令的 组合来 实现 O 描述 于本公 开实施例 中所 涉及到的 单元可 以通过 软件的 方式实现 , 也可以 通过 硬件的 方式来 实现。 其中, 单元的名称在某 种情况下 并不构 成对该 单元本 身 的限定。 本文 中以上 描述的 功能可 以至少部 分地由 至少一 个硬件逻 辑部件 来执行 。 例 如, 可以使 用的 示范 类 型的 硬件 逻辑 部 件包 括 : 现场可 编程 门阵 列 (Field-Programmable Gate An'ay, FPGA) 、 专用集成电路 (Application Specific Integrated Circuit, ASIC) 、 专用标准产品 (Apphcation Specific Standard Parts, ASSP) 、 片上系统 (System on Chip, SOC) 、 复杂可编程逻辑设备 (Complex Programmable Logic Device , CPLD ) 等。 在 本公开的 上下文 中, 机器可读介 质可以 是有形 的介质 , 其可以包含或 存 储 以供指令 执行 系统、 装置或设备 使用或 与指令 执行系 统、 装置或设备 结合地 使 用的程序 。 机器可读介 质可以是 机器可 读信号 介质或机 器可读 储存介 质。 机 器 可读介质 可以包 括电子 的、 磁性的、 光学的、 电磁的、 红外的、 或半导体系 统 、 装置或设备, 或者上述内容的 合适组 合 r 机器可读存储 介质的 示例可 包括 基 于— 个或多 个线的 电气连接 、便携式计算机 盘、硬盘、随机存取存 储器 ( RAM )、 只读 存储器 (ROM) 、 可擦除可编程 只读存储 器 (EPROM 或快闪存 储器) 、 光 纤 、 便捷式紧凑盘 只读存 储器 ( CD-ROM) 、 光学储存设备、 磁储存设 备、 或 上 述内容的 合适组合 O 根据 本公开 实施例 的一个 或多个实 施例, 本公开实施例公 开了一 种调度 方 法 , 包括: 获取 目标任 务对应的 算法有 向图; 其中, 所述算法有向图 包含多 个算法 节 占 ・ 对所 述算法有 向图中 的多个算 法节点进 行分组 , 获得多个节点 组; 串行 调度所 述多个节 点组 , 并行调度 所述节 点组内的 至少一 个算法 节点对 应的 处理算 法。 可选地 , 获取目标任 务对应的 算法有 向图, 包括: 获取 所述 .目标任务所需的多个 处理算 法; 确定所 述多个 处理算 法的依赖 关系; 基于 所述依赖 关系建立 算法有 向图。 可选地 , 对所述算法有 向图 中的多个算 法节点进 行分组 , 包括: 提取 所述 .算法有向图中的数 <交 汇节点 ; 将所 述数据 交汇节点 的上游 算法节 点划分 为一组 , 将所述数据交 汇节点的 下游 算法节 点划分为 一组, 将所述数据 交汇 节点作为一 组, 获得多个 节点组。 可选地 , 对,所述算法有向图中的多个 算法节 点进行分 组, 包括: 获取 所述算法 有向图 中各算法 节点的深 度; 将深 度 .相同的算法节点划分为 ~组, 获得多个节 点组 可选地 , 串行调度所述 多个节 点组, 包括: 若 当前调度 的节点组 内的各 算法节 点对 -应的处理算法均执 行完成 , 则继续 调度 下一个 节点组。 可选 地, 串行调度所 述 .多个节点组, 并行调度所述 节点组 内的至 少一 ■个算 法节 点对应 的处理算 法, 包括: 对所 述多个算 法节点 分别创 建线程 , 并设置未被调度 到的算 法节点 对应的 线程 处于等待 状态; 当调 度到当前 节点组 时 , 启动所述当前 节点组 对应的 线程 , 使得启动的 线 程执 行所述 当前节点 组内的至 少一个 算法节点 对应的 处理算法 。 可选地 , 所述方法还 包括: 设置 缓存池 ; 将各 算法节 点对应的 处理算 法的处 理结果存 储至所 述缓存 池 , 使得后置算 法节 点从所述 缓存池 中读取所 述处理 结果进行 处理。 可选 地, 串行调度所 述多个 节点组 , 并行调度所述节 点组 内的至少 一个算 法节 点对应 的处理算 法, 包括: 当调 度到当前 节点组 时, 创建并启动 所述当前 节点组 对应的 线程 , 使得启 动的 线程.执行所述当 前节点组 内的至 少 ~个算法 节点对应 的处理 算法; 当算 法节点对 应的处 理算法 执行完 成时 , 终止所述算 法节点 对应的 线程 , 并将 处理结果 存入第-一队列。 可选 地, 创建并启动 所述 当前节点 组时应的 线程, 使得启动的线程 执行所 述 当前节点组 内的至 少一个算 法节点 对应的处 理算法 , 包括: 从所 述第一 队列中读取 处理结 果, 并根据所述 .处理结果确定当前 节点组 ; 将所 述当前节 点组包含 的算法 节点信 息写入第 二队列 ; 基于 所述第二 队列 中的算法 节点信 息创建并 启动线 程 , 使得启动的 线程执 行所 述算法 节点信息 对应的处 理算法 。 应该 理解, 可以使用上面所 示的各 种形式 的流程, 重新排序、 增加或删除 步骤 。 例如, 本公开中记载 的各步 骤可以 并行地执 行也可 以顺序 地执行 也可以 不 同的次序执 行, 只要能够实 现本公 开的技术 方案所期 望的结 果。

Claims

权 利 要 求 书
1. —种 调度万 法丫 包括: 获取 目标任 务对应的 算法有 向图; 其中, 所,述算法有向图包含多个算 ■法节
>占 < 5 对所 述算法有 向图中 的多个算 法节点进 行分组 , 获得多个节点 组; 串行 调度所 述多个节 点组, 并行调度所述 节点组 内的至少 一个算 法节点对 应的 处理算 法。
2. 根据权利 要求 !所述的万 法, 其中, 所述获取 目标任务对 应的算 法有向 图, 包括: 获取 所述目标 任务所 需的多个 处理算 法; 确定所 述多个 处理算 法的依赖 关系; 基于 所述依赖 关系建立 算法有 向图。
3. 根据权利 要求 1所述.的方法, 其中, 所述对所述算 法有向 图中的多 个算 法 节点进行分 组 , 包括: 提取 所述算法 有向图 中的数据 交汇节 点 ; 将所 述,数据交汇节点的上 游算法 节点划分 为一组 , 将所述数据交 汇节点的 下游 算法节 点划分为 一组, 将所述数据 交汇 节点作为一 组, 获得多个 节点组。
4. 根据权利 要求 1所述的万法 , 其中, 所述对所述算 法有向 图中的多 个算 法节 点进行分 组, 包括: 获取 所述算法 有向图 中的多个 算法节 点的深度 ; 将深 度相同的 算法节 点划分为 一组, 获得多个 节点组。
5. 根据权利 要求 1所述的方法 , 其中, 所述串行调度所 述多个 节点组 , 包 括 : 响应 于当前调 度的 '节点组内的所述至 少一个 算法 '节点对应的处理算 法均执 行完 成, 继续调度下 i ■个节点组。
6. 根据权利 要求 [或 5所述的 方法, 其中, 所述串行调度所述 多个节 点组, 并行 调度所述 节点组 内的至 少一个算 法节点对 应的处理 算法, 包括: 对所 述多个算 法节点 分别创 建线程 ., 并设置未被调度到的 算法节 点对 -应的 线程 .处于等待状态; 当调 度到当 前节点组 时, 启动所述 当前节 点组对应 的线程 , 使得启动的线 程执 行所述 当前节点 组内的至 少一个 算法节点 对应的处 理算法 。
7. 根据权利 要求 6所述的方法 , 所述方法还包摇 : 设置 缓存池 ; 将所 述至少 一个算 法节点对 应的处 理算法 的处理 结果存储 至所述 缓存池 , 使得 后置算 法节点从 所述缓存 池中读 取所述处 理结果进 行处理 。
8, 根据权利 要求 1所述的方法 , 其中, 所述 .串行调度所述.多个节点组, 并 行调 度所述 节点组 ■内的至少一个算法 节点对应 的处理算 法, 包括: 当调 度到当 前节点组 时, 创建并启 动所述 当前节点 组对应 的线程 , 使得启 动的 线程执行 所述 .当前节点组 ■内的至少一个算法节点对 应的处 理算法 ; 当算 法节点 对应的处 理算法 执行完 成时, 终止所述算法节 点对应 的线 •程 , 并将 处理结 果存入第 一队列 O
9. 根据权利要求 8所述的方法 , 其中, 所述创建并启动 所述 当前节点 组对 应的 线程, 使得启动的线程 执行所 述当前 节点组 内的至少 一个算 法节点对 应的 处理 算法, 包括: 从所 述第一 队列中读取 处理结 果, 并根据所述 .处理结果确定当前 节点组 ; 将所 述当前节 点组包含 的算法 节点信 息写入第 二队列 ; 基于 所述第 二队列 中的算法 节点信 息创建 并启动线 程, 使得启动 的线程执 行所 述算法 节点信息 对应的处 理算法 。
10. —种 调度装 置, 包括: 算法 有向图 获取模块 , 设置为获取 目标任 务对应的 算法有 向图; 其中, 所 述算 法有向 图包含多 个算法 节点; 算法 节点分组 模块, 设置为对所 述 .算法有向图中的多个 算法节点 进行分 组, 获得 多个节 点组; 调度 模块, 设置为 串行调度 所述多 个节点 组, 并行调度所 述节点 组内的至 少一 个算法 节点对应 的处理算 法。
11. 一种电子设 备, 所述电子设 备包括 : 一个 或多个处 理装置 ; 存储 装置 , 设置为存储一 个或多 个程序 ; 当所 述一 •个或多个程序被所 述一个 或多个 处理装置 执行 , 使得所述 一个或 多个 处理装 置实现如 权利要求 1-9中任一所述 的调度 方法。
12. 一种计算 机可读介 质, 所述计算机可 读介质上 存储有 计算机程 序, 所述 计算 机程序被 处理装 置执行时 实现如权 利要求 1-9中任- -所述的调度方法 。
PCT/SG2023/050309 2022-05-16 2023-05-05 调度方法、装置、设备及存储介质 Ceased WO2023224549A2 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/866,429 US20250321785A1 (en) 2022-05-16 2023-05-05 Scheduling method, apparatus, device and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210527828.7A CN114968516A (zh) 2022-05-16 2022-05-16 调度方法、装置、设备及存储介质
CN202210527828.7 2022-05-16

Publications (2)

Publication Number Publication Date
WO2023224549A2 true WO2023224549A2 (zh) 2023-11-23
WO2023224549A3 WO2023224549A3 (zh) 2024-01-04

Family

ID=82984127

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/SG2023/050309 Ceased WO2023224549A2 (zh) 2022-05-16 2023-05-05 调度方法、装置、设备及存储介质

Country Status (3)

Country Link
US (1) US20250321785A1 (zh)
CN (1) CN114968516A (zh)
WO (1) WO2023224549A2 (zh)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8166479B2 (en) * 2007-06-26 2012-04-24 Softlife Projects Limited As Applied Cytometry Systems Optimizing data analysis through directional dependencies of a graph including plurality of nodes and attributing threading models and setting status to each of the nodes
US10949319B2 (en) * 2018-07-25 2021-03-16 EMC IP Holding Company LLC Performance monitoring and enhancement
CN110362315B (zh) * 2019-07-17 2023-05-12 中国工商银行股份有限公司 基于dag的软件系统调度方法及装置
CN111367995B (zh) * 2020-02-10 2023-07-21 北京百度网讯科技有限公司 基于服务锁的数据同步方法及装置、电子设备与存储介质
CN112068959A (zh) * 2020-09-04 2020-12-11 北京明略昭辉科技有限公司 自适应任务调度方法、系统及包括该方法的检索方法
CN112905259A (zh) * 2021-02-05 2021-06-04 北京有竹居网络技术有限公司 数据处理方法、装置、设备及存储介质
CN114116481A (zh) * 2021-11-26 2022-03-01 上海道客网络科技有限公司 基于Kubernetes系统的人工智能算法模型的测试方法和系统

Also Published As

Publication number Publication date
US20250321785A1 (en) 2025-10-16
CN114968516A (zh) 2022-08-30
WO2023224549A3 (zh) 2024-01-04

Similar Documents

Publication Publication Date Title
CN114020470B (zh) 资源分配方法、装置、可读介质及电子设备
CN111427706B (zh) 数据处理方法、多服务器系统、数据库、电子设备及存储介质
CN111259636B (zh) 文档渲染方法、装置和电子设备
CN114780263B (zh) 服务调用方法、装置、设备和存储介质
CN117170986B (zh) 芯片一致性处理系统,及其方法、装置、设备及介质
CN116360971A (zh) 基于异构计算框架的处理方法、装置、设备及介质
CN111258736B (zh) 信息处理方法、装置和电子设备
CN113521728A (zh) 云应用的实现方法、装置、电子设备和存储介质
CN114625479A (zh) 边缘计算中云边协同应用管理方法及对应的装置
CN111460211A (zh) 音频信息播放方法、装置和电子设备
CN115604191A (zh) 业务流量控制方法、装置、电子设备及可读存储介质
WO2023197868A1 (zh) 图像处理方法、装置、系统和存储介质
WO2026056709A1 (zh) 配置数据处理流的交互方法、装置、电子设备及存储介质
WO2023224549A2 (zh) 调度方法、装置、设备及存储介质
WO2021227953A1 (zh) 图像特效配置方法、图像识别方法、装置及电子设备
US20250055954A1 (en) Video effect packet generation method and apparatus, device, and storage medium
CN113791908B (zh) 服务运行方法、装置和电子设备
CN112799822B (zh) 一种程序启动方法、装置、设备及介质
WO2023224547A2 (zh) 数据处理方法、装置、设备及存储介质
CN116302271A (zh) 一种页面展示方法、装置及电子设备
CN117118976A (zh) 文件下载方法、装置、电子设备以及存储介质
CN114647472B (zh) 图片处理方法、装置、设备、存储介质和程序产品
CN114095907A (zh) 蓝牙连接的控制方法、装置及设备
CN115718625B (zh) 设备驱动方法、装置和电子设备
CN116977468A (zh) 图像帧的绘制处理方法、装置、设备及介质

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 18866429

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 23808012

Country of ref document: EP

Kind code of ref document: A2

WWP Wipo information: published in national office

Ref document number: 18866429

Country of ref document: US