EP-4034987-B1 - METHOD AND APPARATUS FOR A STEP-ENABLED WORKFLOW
Inventors
- SODAGAR, IRAJ
Dates
- Publication Date
- 20260506
- Application Date
- 20200925
Claims (8)
- A method for processing a workflow comprising: receiving, by processing circuitry, workflow information of the workflow (S710); generating, based on the workflow information, the workflow to process input data (S720), the workflow including a plurality of processing tasks and a first buffering task, the plurality of processing tasks including a first processing task and a second processing task, each of the plurality of processing tasks being associated with a respective task segment duration, TSD, and configured to process an amount of data having a size equal to the respective TSD independently from data outside the TSD; causing the first processing task to enter a running state in which a subset of the input data is processed by the first processing task and output to the first buffering task as first processed subset data (S730); causing the first processing task to transition from the running state to a non-running state based on an amount of the first processed subset data stored in the first buffering task being equal to a first threshold (S740), the first threshold being based on one of (i) TSDs associated with the plurality of processing tasks, (ii) a workflow segment duration, WSD, equal to a least common multiple of the TSDs, or (iii) the WSD and a parameter S that indicates a number of steps that the first processing task is configured to run consecutively, wherein the first buffering task is: an indexed first-in-first-out, iFIFO, task configured with an iFIFO buffer; and the iFIFO task is configured to: store buffer segments of the input data, each buffer segment being indexed with a starting time, a duration, and a length, an iFIFO buffer size being based on the length and a number of buffer segments in the iFIFO buffer; generate an event indicating that the amount of the first processed subset data stored in the iFIFO task is equal to the first threshold; and generate another event indicating that the amount of the first processed subset data stored in the iFIFO task is provided to the second processing task; or, a multi-index first-in-first-out, MiFIFO, task configured with a plurality of iFIFO buffers; and the MiFIFO task is configured to: provide one or more outputs for the first processing task, each of the plurality of iFIFO buffers being configured to store buffer segments of the input data from a respective one of the one or more outputs, each buffer segment being indexed with a starting time, a duration, and a length, a buffer size of each iFIFO buffer being based on the length and a number of buffer segments in the respective iFIFO buffer; generate an event indicating that the amount of the first processed subset data stored in the MiFIFO task is equal to the first threshold; and generate another event indicating that the amount of the first processed subset data stored in the MiFIFO task is provided to the second processing task; and after the first processing task is transitioned to the non-running state, causing the second processing task to enter a running state in which the first processed subset data stored in the first buffering task is processed by the second processing task (S750).
- The method of claim 1, wherein the second processing task is configured to output the processed first processed subset data as second processed subset data to a second buffering task in the running state; and the method further includes: causing the second processing task to transition from the running state to a non-running state based on one of: (i) an amount of the second processed subset data stored in the second buffering task being equal to a second threshold and (ii) the amount of the first processed subset data stored in the first buffering task being provided to the second processing task.
- The method of claim 1, wherein no state information of the first processing task is stored when the first processing task is in the non-running state, the non-running state including one of an idle state and a destroyed state.
- The method of claim 1, wherein the workflow includes a plurality of buffering tasks that includes the iFIFO task, each input of the plurality of processing tasks is from one of the input data and one or more of the plurality of buffering tasks, and only one of the plurality of the processing tasks is allowed to be in the running state at any point in time.
- The method of claim 1, wherein the input data includes the subset of the input data and another subset of the input data; the workflow includes a plurality of buffering tasks that includes the iFIFO task; each input of the plurality of processing tasks is from one of the input data and one or more of the plurality of buffering tasks; sequentially processing the subset of the input data by the plurality of processing tasks; after the subset of the input data is processed by the plurality of processing tasks, sequentially processing the other subset of the input data by the plurality of processing tasks, remaining processing tasks in the plurality of processing tasks being in non-running states; and only one of the plurality of the processing tasks is allowed to be in the running state at any point in time.
- The method of claim 1, wherein the workflow includes a plurality of buffering tasks that includes the MiFIFO task, each input of the plurality of processing tasks is from one of the input data and one or more of the plurality of buffering tasks, and only one of the plurality of the processing tasks is allowed to be in the running state at any point in time.
- The method of claim 1, wherein the input data includes the subset of the input data and another subset of the input data; the workflow includes a plurality of buffering tasks that includes the MiFIFO task; each input of the plurality of processing tasks is from one of the input data and one or more of the plurality of buffering tasks; sequentially processing the subset of the input data by the plurality of processing tasks; after the subset of the input data is processed by the plurality of processing tasks, sequentially processing the other subset of the input data by the plurality of processing tasks, remaining processing tasks in the plurality of processing tasks being in non-running states; and only one of the plurality of the processing tasks is allowed to be in the running state at any point in time.
- An apparatus for processing a workflow, the apparatus comprising processing circuitry configured to execute the method for processing a workflow according to any one of claims 1 to 7.
Description
TECHNICAL FIELD The present disclosure describes embodiments generally related to data processing including processing of one or more workflows. BACKGROUND The background description provided herein is for the purpose of generally presenting the context of the disclosure. Work of the presently named inventors, to the extent the work is described in this background section, as well as aspects of the description that may not otherwise qualify as prior art at the time of filing, are neither expressly nor impliedly admitted as prior art against the present disclosure. Workflows can be used in data processing to process data, such as media data, in a data processing system. In some examples, a workflow includes a large number of processing tasks. When the large number of tasks runs in parallel to process data, the data processing system needs to dedicate a large amount of resources. The document US 2008/022288 discloses signal processing by means of synchronous data flow graph in which all tasks consume and produce a constant amount of data. The document US 2017/060579 A1 is directed towards different processor architectures to evaluate and track dependencies required by instructions. Further, the document XIAOMING FAN: "REALIZATION OF MULTIPROCESSING ON A RISC-LIKE ARCHITECTURE", MICROPROCESSING AND MICROPROGRAMMING, ELSEVIER SCIENCE PUBLISHERS, BV" AMSTERDAM, NL, vol. 33, no. 4, 1 June 1992, is directed towards a processor architecture MTMA that combines the RISC- and multithreaded properties. SUMMARY The invention is defined by the appended claims. Aspects of the disclosure provide methods and an apparatus for processing one or more workflows. The apparatus includes processing circuitry configured to receive workflow information of a workflow. The processing circuitry generates, based on the workflow information, the workflow to process input data. The workflow includes a plurality of processing tasks and a first buffering task. The plurality of processing tasks includes a first processing task and a second processing task. The processing circuitry causes the first processing task to enter a running state in which a subset of the input data is processed by the first processing task and output to the first buffering task as first processed subset data. The processing circuitry causes the first processing task to transition from the running state to a non-running state based on an amount of the first processed subset data stored in the first buffering task being equal to a first threshold. After the first processing task is transitioned to the non-running state, the processing circuitry causes the second processing task to enter a running state in which the first processed subset data stored in the first buffering task is processed by the second processing task. In an embodiment, the second processing task is configured to output the processed first processed subset data as second processed subset data to a second buffering task in the running state. The processing circuitry causes the second processing task to transition from the running state to a non-running state based on one of: (i) an amount of the second processed subset data stored in the second buffering task being equal to a second threshold and (ii) the amount of the first processed subset data stored in the first buffering task being provided to the second processing task. In an embodiment, the plurality of processing tasks is configured with respective task segment duration (TSDs). Each of the plurality of processing tasks is configured to process an amount of data having a size equal to the respective TSD independently from data outside the TSD. The processing circuitry determines a workflow segment duration (WSD) to be a least common multiple of the TSDs. The first threshold can be based on one of (i) the TSDs, (ii) the WSD, and (iii) the WSD and a parameter S that indicates a number of steps that the first processing task is configured to run consecutively. In an embodiment, the first buffering task is an indexed first-in-first-out (iFIFO) task configured with an iFIFO buffer. The iFIFO task is configured to store buffer segments of the input data. Each buffer segment can be indexed with a starting time, a duration, and a length. An iFIFO buffer size can be based on the length and a number of buffer segments in the iFIFO buffer. The iFIFO task is configured to generate an event indicating that the amount of the first processed subset data stored in the iFIFO task is equal to the first threshold. The iFIFO task is configured to generate another event indicating that the amount of the first processed subset data stored in the iFIFO task is provided to the second processing task. In an embodiment, the first buffering task is a multi-index first-in-first-out (MiFIFO) task configured with a plurality of iFIFO buffers. The MiFIFO task is configured to provide one or more outputs for the first processing task. Each of the plurality of iFIFO buffers can