Computing task arrangement method and device, video generation method and device and computer readable medium
Through the calculation task orchestration method, single-point tasks and task flows in the video generation process are generated and executed, and the problem of insufficient resource reuse in the existing technology is solved, improving the efficiency and quality of video generation.
Patent Information
- Application Number
- CN202411164101.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-08-22
AI Technical Summary
In the existing video generation process, the process is independent, the resource reuse is insufficient, the computing resource occupies differently for computing tasks and the lack of fine-grained management, resulting in low video generation efficiency and quality.
Through the calculation task orchestration method, video materials and calculation tasks are obtained, single-point tasks and task flow are generated based on dependencies, tasks are executed according to preset orchestration rules, and resources are dynamically adjusted and reused, improving computing efficiency.
The efficiency and quality of video generation are improved, and by clarifying the task sequence and resource management, resource transfer consumption is reduced, and fine-grained resource management is achieved.
Smart Images

Figure CN119166296A_ABST
Abstract
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 application that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
[0003] Video production includes a series of steps from video submission to video processing and then to video presentation. Video processing includes video transcoding, video enhancement, video frame capture, video reasoning, optical character recognition and other computing tasks that require a lot of computing resources and execution time. Based on the current video production process, there are the following technical problems:
[0004] 1. The 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 occupy 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, the method being applied to video generation, the method comprising:
[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 of the computing tasks, single-point tasks and task flows are generated, including: obtaining computing tasks without dependencies, and generating single-point tasks based on the computing tasks; obtaining computing tasks with 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.
[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, sequentially executing the single-point task and the task flow; wherein, sequentially executing the single-point task and the task flow includes: executing the single-point task according to a first orchestration rule; and executing the task flow according to a second orchestration rule.
[0016] Further, 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 a sending failure 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, 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 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 the tasks are issued plus 1; if the number of times the 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 computing task and the n+1th computing task for the nth time, until the computing tasks in the task flow are executed; wherein n is equal to the number of times the tasks are issued.
[0018] Further, based on the second orchestration rule, executing the task flow 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 computing and the n+1th computing task has completed logical computing, releasing the nth computing task, the n+1th computing task performs logical computing, and issuing the n+2th computing task to perform physical computing, until the computing tasks in the task flow are completed.
[0019] Further, based on the second orchestration task, executing the task flow includes: issuing the computing tasks in the task flow to the computing cluster, and receiving the issuing 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, re-issuing the computing task to the computing cluster; if the issuing result is a failure due to insufficient resources, determining whether the computing task is the first computing task and determining the judgment result; based on the judgment result, issuing the computing tasks in the task flow.
[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] According to another aspect of the present application, a video generation method is provided, wherein the method 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, in response to a computing task scheduling request, acquires video material and computing tasks;
[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, for generating a task topology sequence based on the execution order of the single-point tasks and task flows;
[0027] A task execution unit is used to execute the single-point task and the task flow based on the task topology sequence and according to a preset orchestration rule.
[0028] Another aspect of the present application provides an electronic device, the 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, and the instructions are executed by the at least one processor to enable the at least one processor to perform the computing task scheduling method as 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 prior art, on the one hand, the present application creatively generates a task flow based on the computing tasks with dependencies according to their execution order, and clearly sorts out the sequence of computing tasks, thereby improving resource reuse rate and improving the execution efficiency of computing tasks;
[0036] On the other hand, the present application creatively sends the computing tasks in the task flow to the same computing cluster to execute the computing tasks, 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 the description 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 paying any creative labor.
[0039] Other features, objects and advantages of the present application will become more apparent by 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 an embodiment of the present application;
[0041] Figure 2 A schematic diagram of the structure of a computing task scheduling device provided in an 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] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work 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 (CPU), input / output interface, network interface and memory.
[0046] The 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. The memory is an example of a computer-readable medium.
[0047] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer program instructions, data structures, modules of programs 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, read-only compact disk (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0048] The present application provides a computing task scheduling method, 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 the 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, tablet computers, 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 sets, 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, where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.
[0054] Embodiment 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 at least includes the following processing steps:
[0056] Step S101: The scheduling service obtains video material and computing tasks in response to the computing task scheduling request;
[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] Among them, based on the execution order of the single-point tasks and task flows, a task topology sequence is generated, which 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, so as to achieve the technical purpose of improving the task execution effect.
[0061] Specifically, the topological sequence is a directed acyclic graph. The directed acyclic graph determines the order and parallel / serial relationship of single-point tasks and task flows. For example, before executing the key frame deduplication computing task, the video decoding frame extraction computing task must be successfully executed first; and the key frame deduplication computing task and the audio recognition computing task can be executed simultaneously on different computing nodes.
[0062] In one embodiment, the scheduling service responds to the computing task scheduling request, obtains the video material and the computing task, including: real-time monitoring of the message writing status of the preset message queue; if it is detected that there is a message written to the message queue, the video generation process is triggered by default to receive the computing task scheduling request. When the user uploads the 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 without dependencies and generating single-point tasks based on the computing tasks; obtaining computing tasks with 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 a sending failure 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 or the task flow is sent to the computing cluster in sequence according to the direction of the directed graph ring graph.
[0068] In one embodiment, 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 the computing tasks are 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 executed; wherein n is equal to the number of times the computing tasks are issued.
[0069] In one embodiment, based on the second orchestration rule, executing the task flow 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 blocking connection (channel) to the nth computing task and the n+1th computing task; when the nth computing task has completed physical computing and the n+1th computing task has completed logical computing, releasing the nth computing task, the n+1th computing task performs logical computing, and issuing the n+2th computing task to perform physical computing, until the computing tasks in the task flow are executed.
[0070] It should be understood that the n+2 in which the nth computing task is released, the n+1th computing task is executed to perform logical calculations, and the n+2th computing task is issued to perform physical calculations refers to issuing the n+2th computing task for the n+1th time, that is, the relationship between the number of issuances 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 tasks in the task flow are 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 execute physical computing, and when the second computing task is executed normally, logical computing resources are occupied to execute 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 has been completed, the first computing task is released, the second computing task is made to execute physical computing, and the third computing task is issued to execute logical computing at the same time; when the second computing task completes the physical computing, the third computing task executes the physical computing, and the fourth computing task is issued to execute 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: issuing all computing tasks in the task flow to the same 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, re-issuing the computing task to the computing cluster; if the issuance result is a failure due to insufficient resources, determining whether the computing task is the first computing task and determining the judgment result; based on the judgment result, issuing the computing task in the task flow.
[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 computing 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 of the specific application scenarios, assuming that the number of computing tasks in the task flow is 10, 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 a 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 executed in the task flow.
[0078] Embodiment 2
[0079] This embodiment provides a video generation method, which generates a video using the calculation arrangement method described in the first embodiment.
[0080] Embodiment 3
[0081] like Figure 2 As shown, this embodiment provides a computing task scheduling device, the device comprising:
[0082] A task acquisition unit, in response to a computing task scheduling request, acquires video material and computing tasks;
[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, for generating a task topology sequence based on the execution order of the single-point tasks and task flows;
[0085] A task execution unit is used to execute the single-point task and the task flow based on the task topology sequence and according to a preset orchestration rule.
[0086] Embodiment 4
[0087] Based on the same inventive concept, an electronic device is also provided in an embodiment of the present application, and the method corresponding to 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 that is 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 so that the at least one processor can 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 through a network, or may be an application running on the above device. The user device includes but is not limited to various terminal devices such as computers, mobile phones, tablet computers, 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 sets, 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, where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.
[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, and the device 300 includes a central processing unit (CPU, Central Processing Unit) 301, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM, Read Only Memory) 302 or the program loaded from the storage part 308 to the random access memory (RAM, Random Access Memory) 303. In RAM303, various programs and data required for system operation are also stored. CPU301, ROM302 and RAM303 are connected to each other through a bus 304. An input / output (I / O, Input / Output) 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 a cathode ray tube (CRT), a liquid crystal display (LCD), an LED display, an OLED display, etc., and a speaker, etc.; 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 may 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 functions defined in the method of the present application are executed.
[0092] Embodiment 5
[0093] Another embodiment of the present application further provides a computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions can be executed by a processor to implement the methods and / or technical solutions of any one or more embodiments of the present application described above.
[0094] Specifically, the present embodiment may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, 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 may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device, or device.
[0095] Computer readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than a computer readable storage medium, which may send, propagate, or transmit 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 may 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 may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may 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 may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0098] Embodiment 6
[0099] This embodiment also provides a computer program product, including a computer program, which implements the methods and / or technical solutions of any one or more embodiments of the present application when processed by an executor.
[0100] The flow chart or block diagram in the accompanying drawings shows the possible architecture, function and operation of the equipment, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square 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 square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated system for hardware that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0101] Those skilled in the art can 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 the present 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 separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0104] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit 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, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
[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 it. 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] In addition, 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 stated in a device claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate 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, the single-point task and the task flow are executed.
2. The computing task scheduling method according to claim 1, wherein: Based on the dependency relationship of the computing tasks, generating single-point tasks and task flows includes: Obtain computing tasks without dependencies, and generate single-point tasks based on the computing tasks; Obtain computing tasks with dependencies, and generate a task flow based on the execution order of the computing tasks; Among them, the computing task includes the computing task and the computing task.
3. The computing task scheduling method according to claim 2, wherein: Based on the task topology sequence and according to a preset arrangement rule, executing the single point task and the task flow includes: Based on the task topology sequence, sequentially execute the single-point task and the task flow; The sequential execution of the single-point task and the task flow includes: According to the first arrangement rule, executing the single-point task; The task flow is executed according to the second orchestration rule.
4. The computing task scheduling method according to claim 3, wherein: Based on the first arrangement rule, executing the single-point task 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 sending result is that the sending fails due to insufficient resources, the single point task is sent again 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, 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.
5. The computing task scheduling method according to claim 3 or 4, wherein: Based on the second orchestration rule, executing the task flow includes: Obtaining the number of times the computing task of the task flow is issued; If the number of times of sending is 0, the first computing task and the second computing task are sent to the computing cluster to execute the first computing task and the second computing task, and the number of times of sending is recorded plus 1; If the number of times of sending is not 0, and the execution status of the n-1th computing task and the nth computing task are both executed, then the n+1th computing task is sent 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 message is sent.
6. The computing task scheduling method according to claim 5, wherein: Based on the second orchestration rule, executing the task flow 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 computing and the n+1th computing task has completed logical computing, the nth computing task is released, the n+1th computing task performs logical computing, and the n+2th computing task is issued to perform physical computing until the computing tasks in the task flow are completed.
7. The computing task scheduling method according to claim 6, wherein: Based on the second orchestration task, executing the task flow 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 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 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 determination result, the computing tasks in the computing tasks in the task flow are issued.
8. The computing task scheduling method according to claim 7, 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, 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, the n+1th computing task is reissued when the resource requirement of the n+1th computing task is met.
9. The computing task scheduling method according to claim 8, wherein: 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: 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.
10. A video generation method, wherein: The method generates a video using the computational orchestration method as described in any one of claims 1 to 9.
11. A computing task scheduling device, wherein: The device comprises: A task acquisition unit, in response to a computing task scheduling request, acquires video material and computing tasks; 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, for generating a task topology sequence based on the execution order of the single-point tasks and task flows; A task execution unit is used to execute the single-point task and the task flow based on the task topology sequence and according to a preset orchestration rule.
12. 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 9.
13. 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 9.
14. 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 9 is implemented.
Citation Information
Patent Citations
Task execution method, device and equipment and storage medium
CN112579275A
Video processing task scheduling method, thread allocation information generation method and equipment
CN114253677A
Service orchestration method, service orchestration system, storage medium and electronic equipment
CN116938931A
Task Processing Method, Processing Apparatus, and Computer System
US20210064425A1
Automatically orchestrating a computerized workflow
US20230409386A1
