A task processing method, wherein the method comprises: generating, by a first processing apparatus, a plurality of tasks, and determining task description information of the plurality of tasks, wherein the task description information of the plurality of tasks is used to indicate a dependency relationship between the plurality of tasks, and in any two tasks that have a dependency relationship, processing of one task needs to wait for a processing result of the other task; and sending, by the first processing apparatus, an instruction to a second processing apparatus, wherein the instruction comprises the plurality of tasks and the task description information of the plurality of tasks, wherein the task description information comprises identifiers of task streams corresponding to the plurality of tasks, the task streams being on the second processing apparatus; and the first processing apparatus determines the task streams corresponding to the plurality of tasks in the following manner, based on a quantity of resources of idle task streams which is a quantity of identifiers of the idle task streams: if the first processing apparatus determines that the quantity of resources of idle task streams is greater than or equal to a first threshold, allocating corresponding task streams in the idle task streams to the plurality of tasks; if the first processing apparatus determines that the quantity of resources of idle task streams is less than or equal to a second threshold, allocating corresponding task streams in existing task streams to the plurality of tasks; if the first processing apparatus determines that the quantity of resources of idle task streams is greater than the second threshold and less than the first threshold, allocating corresponding task streams in the idle task streams to some of the plurality of tasks, and allocating corresponding task streams in existing task streams to the other tasks of the plurality of tasks, wherein the first threshold is a value greater than or equal to 2 and the second threshold is a value smaller than the first threshold. generating, by a first processing apparatus, a plurality of tasks, and determining task description information of the plurality of tasks, wherein the task description information of the plurality of tasks is used to indicate a dependency relationship between the plurality of tasks, and in any two tasks that have a dependency relationship, processing of one task needs to wait for a processing result of the other task; and sending, by the first processing apparatus, an instruction to a second processing apparatus, wherein the instruction comprises the plurality of tasks and the task description information of the plurality of tasks, wherein the task description information comprises identifiers of task streams corresponding to the plurality of tasks, the task streams being on the second processing apparatus; and the first processing apparatus determines the task streams corresponding to the plurality of tasks in the following manner, based on a quantity of resources of idle task streams which is a quantity of identifiers of the idle task streams: if the first processing apparatus determines that the quantity of resources of idle task streams is greater than or equal to a first threshold, allocating corresponding task streams in the idle task streams to the plurality of tasks; if the first processing apparatus determines that the quantity of resources of idle task streams is less than or equal to a second threshold, allocating corresponding task streams in existing task streams to the plurality of tasks; if the first processing apparatus determines that the quantity of resources of idle task streams is greater than the second threshold and less than the first threshold, allocating corresponding task streams in the idle task streams to some of the plurality of tasks, and allocating corresponding task streams in existing task streams to the other tasks of the plurality of tasks, wherein the first threshold is a value greater than or equal to 2 and the second threshold is a value smaller than the first threshold. if the first processing apparatus determines that the quantity of resources of idle task streams is greater than or equal to a first threshold, allocating corresponding task streams in the idle task streams to the plurality of tasks; if the first processing apparatus determines that the quantity of resources of idle task streams is less than or equal to a second threshold, allocating corresponding task streams in existing task streams to the plurality of tasks; if the first processing apparatus determines that the quantity of resources of idle task streams is greater than the second threshold and less than the first threshold, allocating corresponding task streams in the idle task streams to some of the plurality of tasks, and allocating corresponding task streams in existing task streams to the other tasks of the plurality of tasks, wherein the first threshold is a value greater than or equal to 2 and the second threshold is a value smaller than the first threshold.