Computing task arrangement, video generation method, device and computer readable medium

By generating task topology sequences and dynamic resource management, the problems of independent computing tasks and improper resource management in the video generation process are solved, and efficient video generation and quality improvement are achieved.

CN119166296BActive Publication Date: 2025-09-30SHANGHAI BILIBILI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411164101.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2025-09-30
Estimated Expiration
2044-08-22

AI Technical Summary

Technical Problem

In the existing video generation process, computing tasks are independent of each other, resources cannot be reused, the way of transferring context or intermediate products between processes is unclear, and there is a lack of fine-grained computing resource management, resulting in low video generation efficiency and quality.

Method used

By generating single-point tasks and task flows, based on the dependencies and execution order of computing tasks, a task topology sequence is generated, and computing tasks are executed according to preset orchestration rules. Resource quotas are dynamically adjusted to achieve fine-grained resource management and efficient computing.

Benefits of technology

It improves the efficiency and quality of video generation, increases resource reuse, reduces resource transfer consumption, and optimizes the execution efficiency of computing tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166296B_ABST
    Figure CN119166296B_ABST
Patent Text Reader

Abstract

The present application provides a computing task orchestration method, device, computer-readable medium and program product. The computing task orchestration method described in the application includes: obtaining video materials and computing tasks in response to a computing task orchestration request; generating single-point tasks and task flows based on the dependencies of the computing tasks; generating a task topology sequence based on the execution order of the single-point tasks and task flows; and executing the single-point tasks and the task flows according to preset orchestration rules based on the task topology sequence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of video generation, and in particular to a computing task scheduling method, device, computer-readable medium, and program product. Background Art

[0002] This section is intended to provide a background or context to the embodiments of the present application that are recited in the claims. Nothing herein is admitted to be prior art by virtue of its inclusion in this section.

[0003] Video production involves a series of steps, from video submission to video processing and finally to video presentation. Video processing includes tasks such as video transcoding, video enhancement, video frame capture, video inference, and optical character recognition, which require significant computing resources and execution time. The current video production process faces the following technical issues:

[0004] 1. Processes are independent of each other and resources cannot be reused;

[0005] 2. The way to pass context or intermediate products between processes is unclear;

[0006] 3. Different computing tasks require different computing resources, and there is a lack of fine-grained computing resource management methods;

[0007] Therefore, there is an urgent need to propose a computing task scheduling method, device, computer-readable storage medium and program product that can improve video generation efficiency and quality. Summary of the Invention

[0008] Multiple aspects of the present application provide a computing task scheduling method, device, computer-readable storage medium, and program product to improve video generation efficiency and quality.

[0009] In one aspect of the present application, a computing task scheduling method is provided, which is applied to video generation and includes:

[0010] Responding to a computing task scheduling request, obtaining video material and computing tasks;

[0011] Based on the dependency relationship of the computing tasks, generating single-point tasks and task flows;

[0012] Generate a task topology sequence based on the execution order of the single-point tasks and task flows;

[0013] Based on the task topology sequence and in accordance with preset orchestration rules, the single-point task and the task flow are executed.

[0014] Furthermore, based on the dependency relationship of the computing tasks, single-point tasks and task flows are generated, including: obtaining computing tasks without dependency relationships, and generating single-point tasks based on the computing tasks; obtaining computing tasks with dependency relationships, and generating task flows based on the execution order of the computing tasks; wherein the computing tasks include the computing tasks and the computing tasks.

[0015] Furthermore, based on the task topology sequence, the single-point task and the task flow are executed according to preset orchestration rules, including: based on the task topology sequence, the single-point task and the task flow are executed sequentially; wherein, the sequential execution of the single-point task and the task flow includes: executing the single-point task according to a first orchestration rule; executing the task flow according to a second orchestration rule.

[0016] Furthermore, based on the first orchestration rule, executing the single-point task includes: sending the single-point task to the computing node, and receiving the sending result and execution result returned by the computing node; if the sending result is that the sending fails due to insufficient resources, then re-sending the single-point task when the resources meet the sending conditions; if the execution result is an execution failure, or the execution result is not successfully received within a preset time, then re-sending the single-point task to the computing node; if the execution result is a successful execution, then sending the next single-point task to the computing node until all single-point tasks are sent.

[0017] Further, based on the second orchestration rule, the task flow is executed, including: obtaining the number of times the computing tasks of the task flow are issued; if the number of times the computing tasks are issued is 0, the first computing task and the second computing task are issued to the computing cluster to execute the first computing task and the second computing task, and the number of times the computing tasks are issued is added by 1; if the number of times the computing tasks are issued is not 0, and the execution status of the n-1 computing task and the n-th computing task are both executed, the n+1 computing task is issued to the computing cluster for the nth time to execute the n-1 computing task and the n+1 computing task, until the computing tasks in the task flow are completed; wherein, n is equal to the number of times the computing tasks are issued.

[0018] Further, based on the second orchestration rule, the task flow is executed, including: the nth computing task and the n+1th computing task simultaneously perform task calculations, wherein the nth computing task performs physical calculations and the n+1th computing task performs logical calculations; establishing a communication connection to the nth computing task and the n+1th computing task; when the nth computing task has completed physical calculations and the n+1th computing task has completed logical calculations, releasing the nth computing task, the n+1th computing task performs logical calculations, and issuing the n+2th computing task to perform physical calculations, until the computing tasks in the task flow are completed.

[0019] Furthermore, based on the second orchestration task, the task flow is executed, including: issuing the computing task in the task flow to the computing cluster, and receiving the issuance result and execution result returned by the computing cluster; if the execution result is an execution failure, or the execution result is not successfully received within a preset time, the computing task is re-issued to the computing cluster; if the issuance result is a failure due to insufficient resources, it is determined whether the computing task is the first computing task and the judgment result is determined; based on the judgment result, the computing task in the task flow is issued.

[0020] Further, based on the judgment result, the computing task in the task flow is issued, including: if the computing task is the first computing task, then the computing task is re-issued when the resources meet the issuance conditions; if the computing task is the n+1th computing task, then it is determined whether the resource quota of the nth computing task is greater than the resource requirement of the n+1th computing task; if the resource quota of the nth computing task is greater than the resource requirement of the n+1th computing task, then the resource quota of the nth computing task is adjusted until the resource requirement of the n+1th computing task is met; if the resource quota of the nth computing task is not greater than the resource requirement of the n+1th computing task, then the n+1th computing task is re-issued when the resource requirement of the n+1th computing task is met.

[0021] Furthermore, if the resource quota of the nth computing task is not greater than the resource requirement of the n+1th computing task, the method also includes: transferring the n+1th computing task and the execution information of the nth computing task to the central service; when the resources of the computing cluster meet the resource requirement of the n+1th computing task, retrieving the n+1th computing task and the execution information of the nth computing task from the central service and reissuing the n+1th computing task.

[0022] In another aspect of the present application, a video generation method is provided, which generates a video using the aforementioned computing task scheduling method.

[0023] In another aspect of the present application, a computing task scheduling system is provided, the system comprising:

[0024] A task acquisition unit, which acquires video material and computing tasks in response to a computing task scheduling request;

[0025] A task generation unit, configured to generate single-point tasks and task flows based on the dependencies of the computing tasks;

[0026] A sequence generation unit, configured to generate a task topology sequence based on the execution order of the single-point tasks and task flows;

[0027] A task execution unit is configured to execute the single-point task and the task flow based on the task topology sequence and in accordance with preset orchestration rules.

[0028] Another aspect of the present application provides an electronic device, comprising:

[0029] at least one processor; and

[0030] a memory communicatively connected to the at least one processor; wherein,

[0031] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the computing task scheduling method described above.

[0032] In another aspect of the present application, a computer-readable storage medium is provided, on which computer program instructions are stored. The computer program instructions can be executed by a processor to implement the computing task scheduling method.

[0033] In another aspect of the present application, a computer program product is provided, comprising a computer program, wherein the computer program implements the computing task scheduling method when executed by a processor.

[0034] In the solution provided in the embodiment of the present application, video materials and computing tasks are obtained by responding to computing task scheduling requests; single-point tasks and task flows are generated based on the dependencies of the computing tasks; a task topology sequence is generated based on the execution order of the single-point tasks and task flows; based on the task topology sequence, the single-point tasks and the task flows are executed according to preset scheduling rules to achieve the beneficial effect of improving video generation efficiency and quality.

[0035] Compared with the existing technology, on the one hand, the present application creatively generates a task flow based on the execution order of computing tasks with dependencies, clearly sorts out the order of computing tasks, improves resource reuse rate and improves the execution efficiency of computing tasks;

[0036] On the other hand, the present application creatively distributes the computing tasks in the task flow to the same computing cluster for execution, thereby reducing resource transfer consumption and improving computing efficiency.

[0037] On the other hand, in the process of executing calculations on computing tasks in the task flow, the present application creatively proposes to execute calculations on two computing tasks at the same time, dynamically adjust the resource quota between the two computing tasks, and timely release or pre-allocate computing resources, thereby realizing fine-grained management of resources and achieving the beneficial effect of improving computing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application, a brief introduction will be given below to the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0039] Other features, objects and advantages of the present application will become more apparent upon reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0040] Figure 1 A flowchart of a computing task scheduling method provided in one embodiment of the present application;

[0041] Figure 2 A schematic diagram of the structure of a computing task scheduling device provided in one embodiment of the present application;

[0042] Figure 3 A schematic diagram of the structure of an electronic device suitable for implementing the solution in the embodiments of the present application;

[0043] The same or similar reference numerals in the drawings represent the same or similar components. DETAILED DESCRIPTION

[0044] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0045] In a typical configuration of the present application, the terminal and the equipment of the service network each include one or more processors (CPUs), input / output interfaces, network interfaces and memories.

[0046] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0047] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology for information storage. The information can be computer program instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc-read only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.

[0048] The present invention provides a method for arranging computing tasks, which is applied to video generation and includes:

[0049] Responding to a computing task scheduling request, obtaining video material and computing tasks;

[0050] Based on the dependency relationship of the computing tasks, generating single-point tasks and task flows;

[0051] Generate a task topology sequence based on the execution order of the single-point tasks and task flows;

[0052] Based on the task topology sequence and in accordance with preset orchestration rules, the single-point task and the task flow are executed.

[0053] In actual scenarios, the execution subject of this method can be a user device, or a device formed by integrating a user device and a network device through a network, or an application running on the above device. The user device includes but is not limited to various terminal devices such as computers, mobile phones, tablets, smart watches, and bracelets. The network device includes but is not limited to network hosts, single network servers, multiple network server sets, or cloud computing-based computer collections, which can be used to implement some processing functions when setting an alarm. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing (Cloud Computing), where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computers.

[0054] Example 1

[0055] Figure 1 The following is a processing flow of a computing task scheduling method provided by an embodiment of the present application, wherein the method includes at least the following processing steps:

[0056] Step S101: The scheduling service responds to the computing task scheduling request and obtains video material and computing tasks;

[0057] Step S102: The scheduling service generates single-point tasks and task flows based on the dependencies of the computing tasks;

[0058] Step S103: The scheduling service generates a task topology sequence based on the execution order of the single-point tasks and task flows;

[0059] Step S104: The scheduling service executes the single-point task and the task flow based on the task topology sequence and according to preset orchestration rules.

[0060] Based on the execution order of the single-point tasks and task flows, a task topology sequence is generated. This is applicable to business scenarios such as task scheduling, compiler optimization, and data processing where computing task dependencies are clear and the execution order is fixed, thereby achieving the technical goal of improving task execution performance.

[0061] Specifically, the topological sequence is a directed acyclic graph (DAG). This DAG determines the order and parallel / serial relationships of single-point tasks and task flows. For example, the video decoding and frame extraction task must be successfully completed before the keyframe deduplication task can be executed. Furthermore, the keyframe deduplication task and the audio recognition task can be executed simultaneously on different computing nodes.

[0062] In one embodiment, the scheduling service, in response to a computing task scheduling request, obtains video material and computing tasks, including real-time monitoring of the message writing status of a preset message queue. If a message is detected being written to the message queue, the video generation process is initiated, assuming the computing task scheduling request has been received. When a user uploads a video to the object storage service, the object storage service writes the message to the message queue.

[0063] In one embodiment, the scheduling service generates single-point tasks and task flows based on the dependencies of the computing tasks, including: obtaining computing tasks that have no dependencies and generating single-point tasks based on the computing tasks; obtaining computing tasks that have dependencies and generating task flows based on the execution order of the computing tasks; wherein the computing tasks include the computing tasks and the computing tasks.

[0064] Specifically, a computing task with a dependency relationship is a computing task with context dependency or intermediate product dependency.

[0065] In one embodiment, the scheduling service executes the single-point task and the task flow based on the task topology sequence and in accordance with preset orchestration rules, including: sequentially executing the single-point task and the task flow based on the task topology sequence; wherein, sequentially executing the single-point task and the task flow includes: executing the single-point task in accordance with a first orchestration rule; and executing the task flow in accordance with a second orchestration rule.

[0066] In one embodiment, based on the first orchestration rule, executing the single-point task includes: sending the single-point task to the computing node, and receiving the sending result and execution result returned by the computing node; if the sending result is that the sending fails due to insufficient resources, then re-sending the single-point task when the resources meet the sending conditions; if the execution result is an execution failure, or the execution result is not successfully received within a preset time, then re-sending the single-point task to the computing node; if the execution result is a successful execution, then sending the next single-point task to the computing node until all single-point tasks are sent.

[0067] Specifically, based on the first orchestration rule, executing the single-point task includes: the scheduling service sends the single-point task to the computing node, the computing node executes the single-point task and returns the execution result to the scheduling service through a callback function, and when a computing node is completed, the next computing node is sent to the computing node in sequence according to the direction of the directed graph ring graph or the task flow is sent to the computing cluster.

[0068] In one embodiment, based on the second orchestration rule, the task flow is executed, including: obtaining the number of times the computing tasks of the task flow are issued; if the number of times the computing tasks are issued is 0, the first computing task and the second computing task are issued to the computing cluster to execute the first computing task and the second computing task, and the number of times the computing tasks are issued is added by 1; if the number of times the computing tasks are issued is not 0, and the execution status of the n-1 computing task and the n-th computing task are both executed, the n+1 computing task is issued to the computing cluster for the nth time to execute the n-1 computing task and the n+1 computing task, until the computing tasks in the task flow are completed; wherein, n is equal to the number of times the computing tasks are issued.

[0069] In one embodiment, based on the second orchestration rule, the task flow is executed, including: the nth computing task and the n+1th computing task simultaneously perform task calculations, wherein the nth computing task performs physical calculations and the n+1th computing task performs logical calculations; establishing a blocking connection (channel) to the nth computing task and the n+1th computing task; when the nth computing task has completed physical calculations and the n+1th computing task has completed logical calculations, releasing the nth computing task, the n+1th computing task performs logical calculations, and issuing the n+2th computing task to perform physical calculations, until the computing tasks in the task flow are completed.

[0070] It should be understood that the n+2 in releasing the nth computing task, the n+1th computing task to perform logical calculations, and sending the n+2th computing task to perform physical calculations refers to sending the n+2th computing task for the n+1th time, that is, the relationship between the number of times the task is sent and the sequential position of the computing tasks remains unchanged.

[0071] Specifically, based on the second orchestration rule, the task flow is executed, including: when the computing task in the task flow is first issued to the computing cluster, the first computing task and the second computing task are simultaneously issued to the computing cluster in the order of the computing tasks in the task flow, and a communication connection is recommended between the first computing task and the second computing task; when the first computing task is executed normally, physical computing resources are occupied to perform physical computing, and when the second computing task is executed normally, logical computing resources are occupied to perform logical computing; when the physical computing of the first computing task is completed, and when the logical computing of the second computing task is completed, both return execution results; the second computing resource obtains the execution result returned by the first computing task; when the execution result returned by the first computing task is that the execution is completed, the first computing task is released, the second computing task is enabled to perform physical computing, and the third computing task is issued to perform logical computing at the same time; when the second computing task completes the physical computing, the third computing task performs physical computing, and the fourth computing task is issued to perform logical computing... and so on until all computing tasks in the task flow are executed.

[0072] In order to reduce the transmission of cross-cluster resources and improve resource transmission efficiency, in one embodiment, based on the second orchestration task, the task flow is executed, including: sending all computing tasks in the task flow to the same computing cluster, and receiving the sending results and execution results returned by the computing cluster; if the execution result is an execution failure, or the execution result is not successfully received within a preset time, the computing task is re-sent to the computing cluster; if the sending result is a sending failure due to insufficient resources, it is determined whether the computing task is the first computing task and the judgment result is determined; based on the judgment result, the computing task in the task flow is sent.

[0073] Further, based on the judgment result, the computing task in the task flow is issued, including: if the computing task is the first computing task, then the computing task is re-issued when the resources meet the issuance conditions; if the computing task is the n+1th computing task, then it is determined whether the resource quota of the nth computing task is greater than the resource requirement of the n+1th computing task; if the resource quota of the nth computing task is greater than the resource requirement of the n+1th computing task, then the resource quota of the nth computing task is adjusted until the resource requirement of the n+1th computing task is met; if the resource quota of the nth computing task is not greater than the resource requirement of the n+1th computing task, then the n+1th computing task is re-issued when the resource requirement of the n+1th computing task is met.

[0074] Specifically, before each computing task is sent to the computing cluster, the resource requirements of the task to be sent need to be evaluated. It should be understood that n in this application is the number of times the task is sent. That is, when the number of computing tasks in the task flow is 10, the maximum value of n is 9; conversely, when the maximum value of n is 9, it indicates that the number of computing tasks in the task flow is at most 10.

[0075] In one specific application scenario, assuming that there are 10 computing tasks in the task flow, before issuing the sixth computing task, it will be determined whether the remaining resource quota of the computing cluster meets the resource requirements of the sixth computing task; if not, it will be determined whether the resource quota of the fifth computing task meets the resource requirements of the sixth computing task; if so, the resources of the fifth computing task will be allocated to the sixth computing task until the resource requirements of the sixth computing task are met; if not, the issuance of the sixth to tenth computing tasks will be stopped until the resource quota of the computing cluster meets the resource requirements of the sixth computing task, and then the sixth to tenth computing tasks will continue to be issued according to the rules for issuing computing tasks in the task flow.

[0076] In one embodiment, if the resource quota of the nth computing task is not greater than the resource requirement of the n+1th computing task, the method further includes: transferring the n+1th computing task and the execution information of the nth computing task to the central service; when the resources of the computing cluster meet the resource requirement of the n+1th computing task, retrieving the n+1th computing task and the execution information of the nth computing task from the central service and reissuing the n+1th computing task.

[0077] Specifically, the execution information includes the identity of the task flow, the identity of the computing task in the task flow, and the execution results of the computing tasks that have been calculated in the task flow.

[0078] Example 2

[0079] This embodiment provides a video generation method, which generates a video using the computational arrangement method described in the first embodiment.

[0080] Example 3

[0081] like Figure 2 As shown, this embodiment provides a computing task scheduling device, which includes:

[0082] A task acquisition unit, which acquires video material and computing tasks in response to a computing task scheduling request;

[0083] A task generation unit, configured to generate single-point tasks and task flows based on the dependencies of the computing tasks;

[0084] A sequence generation unit, configured to generate a task topology sequence based on the execution order of the single-point tasks and task flows;

[0085] A task execution unit is configured to execute the single-point task and the task flow based on the task topology sequence and in accordance with preset orchestration rules.

[0086] Example 4

[0087] Based on the same inventive concept, an electronic device is also provided in an embodiment of the present application. The corresponding method of the electronic device may be the method for writing data to a raw device and the method for reading data from a raw device in the aforementioned embodiment, and the principle of solving the problem is similar to that of the method. The electronic device provided in an embodiment of the present application includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the methods and / or technical solutions of the aforementioned multiple embodiments of the present application.

[0088] The electronic device may be a user device, or a device formed by integrating a user device and a network device via a network, or an application running on the above device. The user device includes but is not limited to various terminal devices such as computers, mobile phones, tablets, smart watches, and bracelets. The network device includes but is not limited to network hosts, single network servers, multiple network server sets, or cloud computing-based computer collections, and can be used to implement some of the processing functions when setting an alarm. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing (Cloud Computing), where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computers.

[0089] Figure 3 The structure of an electronic device suitable for implementing the method and / or technical solution in the embodiment of the present application is shown. The device 300 includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 302 or the program loaded from the storage part 308 into the random access memory (RAM) 303. In RAM 303, various programs and data required for system operation are also stored. CPU 301, ROM 302 and RAM 303 are connected to each other through a bus 304. An input / output (I / O) interface 303 is also connected to the bus 304.

[0090] The following components are connected to the I / O interface 303: an input section 306 including a keyboard, a mouse, a touch screen, a microphone, an infrared sensor, etc.; an output section 307 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), an LED display, an OLED display, etc., and a speaker; a storage section 308 including one or more computer-readable media such as a hard disk, an optical disk, a magnetic disk, a semiconductor memory, etc.; and a communication section 309 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 309 performs communication processing via a network such as the Internet.

[0091] In particular, the methods and / or embodiments in the embodiments of the present application can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. When the computer program is executed by the central processing unit (CPU) 301, the above-mentioned functions defined in the method of the present application are performed.

[0092] Example 5

[0093] Another embodiment of the present application further provides a computer-readable storage medium having computer program instructions stored thereon, which can be executed by a processor to implement the methods and / or technical solutions of any one or more embodiments of the present application.

[0094] Specifically, the present embodiment can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.

[0095] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. This propagated data signal may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0096] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0097] Computer program code for performing the operations of the present application can be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0098] Example 6

[0099] This embodiment also provides a computer program product, including a computer program, which, when processed by an executor, implements the methods and / or technical solutions of any one or more embodiments of the present application.

[0100] The flow chart or block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the equipment, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code include one or more executable instructions for realizing the logical function of the specification. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated system for hardware that performs the function or operation of the specification, or can be implemented with a combination of dedicated hardware and computer instructions.

[0101] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

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

[0103] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0104] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0105] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program code.

[0106] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

[0107] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a device claim may also be implemented by a single unit or device through software or hardware. Terms such as "first" and "second" are used to indicate names and do not imply any particular order.

Claims

1. A method for scheduling computing tasks, wherein: The method is applied to video generation, and the method comprises: Responding to a computing task scheduling request, obtaining video material and computing tasks; Based on the dependency relationship of the computing tasks, generating single-point tasks and task flows; Generate a task topology sequence based on the execution order of the single-point tasks and task flows; Based on the task topology sequence and in accordance with preset orchestration rules, executing the single-point task and the task flow; Wherein, based on the task topology sequence and in accordance with a preset orchestration rule, executing the single-point task and the task flow includes: sequentially executing the single-point task and the task flow based on the task topology sequence; wherein, sequentially executing the single-point task and the task flow includes: executing the single-point task in accordance with a first orchestration rule; executing the task flow in accordance with a second orchestration rule; Wherein, based on the second orchestration rule, executing the task flow includes: obtaining the number of times the computing tasks of the task flow are issued; if the number of times the computing tasks are issued is 0, issuing the first computing task and the second computing task to the computing cluster to execute the first computing task and the second computing task, and recording the number of times issued plus 1; if the number of times the computing tasks are issued is not 0, and the execution status of the n-1th computing task and the nth computing task are both executed, then issuing the n+1th computing task to the computing cluster for the nth time to execute the nth computing task and the n+1th computing task, until the computing tasks in the task flow are completed; wherein, n is equal to the number of times the computing tasks are issued.

2. The computing task scheduling method according to claim 1, wherein: Based on the dependencies of the computing tasks, single-point tasks and task flows are generated, including: Obtaining computing tasks that do not have dependencies, and generating single-point tasks based on the computing tasks; Obtaining computing tasks with dependencies, and generating a task flow based on the execution order of the computing tasks; The computing tasks include the computing tasks with dependency relationships and the computing tasks without dependency relationships.

3. The computing task scheduling method according to claim 2, wherein: Executing the single-point task based on the first orchestration rule includes: Send the single point task to the computing node, and receive the sending result and execution result returned by the computing node; If the dispatching result is that the dispatching fails due to insufficient resources, the single point task is dispatched again when the resources meet the dispatching conditions; If the execution result is an execution failure, or if the execution result is not successfully received within a preset time, the single point task is re-issued to the computing node; If the execution result is successful, the next single-point task is sent to the computing node until all single-point tasks are sent.

4. The computing task scheduling method according to claim 3, wherein: Executing the task flow based on the second orchestration rule includes: The nth computing task and the n+1th computing task simultaneously perform task computing, wherein the nth computing task performs physical computing and the n+1th computing task performs logical computing; Establishing a communication connection to the nth computing task and the n+1th computing task; When the nth computing task has completed physical calculation and the n+1th computing task has completed logical calculation, the nth computing task is released, the n+1th computing task performs logical calculation, and the n+2th computing task is issued to perform physical calculation until the computing tasks in the task flow are completed.

5. The computing task scheduling method according to claim 4, wherein: Executing the task flow based on the second orchestration task includes: Sending the computing tasks in the task flow to the computing cluster, and receiving the sending results and execution results returned by the computing cluster; If the execution result is execution failure, or if the execution result is not successfully received within the preset time, the computing task is re-issued to the computing cluster; If the sending result is that the sending fails due to insufficient resources, determining whether the computing task is the first computing task and determining the determination result; Based on the judgment result, the computing task in the computing tasks in the task flow is issued.

6. The computing task scheduling method according to claim 5, wherein: Based on the judgment result, issuing the computing task in the task flow includes: If the computing task is the first computing task, re-issuing the computing task when the resource meets the issuance condition; If the computing task is the n+1th computing task, determining whether the resource quota of the nth computing task is greater than the resource requirement of the n+1th computing task; If the resource quota of the nth computing task is greater than the resource requirement of the n+1th computing task, adjust the resource quota of the nth computing task until the resource requirement of the n+1th computing task is met; If the resource quota of the nth computing task is not greater than the resource requirement of the n+1th computing task, the n+1th computing task will be reissued when the resource requirement of the n+1th computing task is met.

7. The computing task scheduling method according to claim 6, wherein: If the resource quota of the nth computing task is not greater than the resource requirement of the (n+1)th computing task, the method further includes: Transfer the execution information of the n+1th computing task and the nth computing task to the central service; When the resources of the computing cluster meet the resource requirements of the n+1th computing task, the execution information of the n+1th computing task and the nth computing task is retrieved from the central service and the n+1th computing task is reissued.

8. A video generation method, wherein: The method generates a video using the computing task scheduling method according to any one of claims 1 to 7.

9. A computing task scheduling device, wherein: The device comprises: A task acquisition unit, which acquires video material and computing tasks in response to a computing task scheduling request; A task generation unit, configured to generate single-point tasks and task flows based on the dependencies of the computing tasks; A sequence generation unit, configured to generate a task topology sequence based on the execution order of the single-point tasks and task flows; A task execution unit, configured to execute the single-point task and the task flow based on the task topology sequence and in accordance with preset orchestration rules; Wherein, based on the task topology sequence and in accordance with a preset orchestration rule, executing the single-point task and the task flow includes: sequentially executing the single-point task and the task flow based on the task topology sequence; wherein, sequentially executing the single-point task and the task flow includes: executing the single-point task in accordance with a first orchestration rule; executing the task flow in accordance with a second orchestration rule; Wherein, based on the second orchestration rule, executing the task flow includes: obtaining the number of times the computing tasks of the task flow are issued; if the number of times the computing tasks are issued is 0, issuing the first computing task and the second computing task to the computing cluster to execute the first computing task and the second computing task, and recording the number of times issued plus 1; if the number of times the computing tasks are issued is not 0, and the execution status of the n-1th computing task and the nth computing task are both executed, then issuing the n+1th computing task to the computing cluster for the nth time to execute the nth computing task and the n+1th computing task, until the computing tasks in the task flow are completed; wherein, n is equal to the number of times the computing tasks are issued.

10. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 8.

11. A computer-readable medium having computer program instructions stored thereon, wherein the computer program instructions can be executed by a processor to implement the method according to any one of claims 1 to 8.

12. A computer program product comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Video processing task scheduling method, thread allocation information generation method and equipment

    CN114253677A

  • Automatically orchestrating a computerized workflow

    US20230409386A1