# US 2026/0244504 A1 · Task processing method and apparatus

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2026/0244504 A1
- Document ID: US20260244504A1
- Status: Published application
- Kind: A1
- Application number: 19/640,650
- Filed: 2026-04-07
- Published: 2026-08-20
- Earliest claimed: 2023-10-09
- Assignees: Huawei Cloud Computing Technologies Co., Ltd.
- Applicants: Huawei Cloud Computing Technologies Co., Ltd.
- Inventors: Kunlei Zhao; Muming Yang; Aliaksandr Shyshou
- Web page: https://patentgrep.com/patent/US20260244504A1

## CPC

- G06F 9/50: Allocation of resources, e.g. of the central processing unit [CPU]
- G06F 9/5027: {the resource being a machine, e.g. CPUs, Servers, Terminals}
- G06F 9/48: Program initiating; Program switching, e.g. by interrupt
- G06F 9/4881: {Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues}
- G06F 9/5038: {considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration (scheduling strategies G06F9/4881 and subgroups)}
- G06F 9/505: {considering the load}
- G06F 9/5066: {Algorithms for mapping a plurality of inter-dependent sub-tasks onto a plurality of physical CPUs (mappping at compile time, see G06F8/451)}
- G06F 9/5083: {Techniques for rebalancing the load in a distributed system}
- G06F 17/10: Complex mathematical operations {(function generation by table look-up G06F1/03; evaluation of elementary functions by calculation G06F7/544)}
- G06F 17/11: for solving equations {, e.g. nonlinear equations, general mathematical optimization problems (optimization specially adapted for a specific administrative, business or logistic context G06Q10/04)}
- G06N 3/08: Learning methods
- G06N 5/01: Dynamic search techniques; Heuristics; Dynamic trees; Branch-and-bound
- G06N 20/00: Machine learning
- G06N 20/20: Ensemble learning
- G06F 2209/483: Multiproc
- G06F 2209/5011: Pool
- G06F 2209/5017: Task decomposition
- G06F 2209/5018: Thread allocation
- G06F 2209/5019: Workload prediction
- G06F 2209/506: Constraint
- G06F 2209/509: Offload
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Embodiments of this application disclose a task processing method and apparatus. The method in embodiments of this application includes: A compute device obtains a mathematical model expression and instance data of a to-be-solved problem, where the mathematical model expression includes an objective function or a constraint condition, and the instance data indicates a value of a coefficient of the mathematical model expression; decomposes the to-be-solved problem into N subproblems based on the mathematical model expression and the instance data of the to-be-solved problem; and allocates, based on a computation amount of each of the N subproblems, the N subproblems to M threads for parallel execution, where N is greater than M, each of the M threads processes one or more subproblems, and a difference between computation amounts required by the M threads for respectively processing the one or more subproblems is less than or equal to a preset threshold.

## Claims

### Claim 1

A task processing method, comprising:
obtaining a mathematical model expression and instance data of a to-be-solved problem, wherein the mathematical model expression comprises an objective function or a constraint condition, and the instance data indicates a value of a coefficient of the mathematical model expression;
decomposing the to-be-solved problem into N subproblems based on the mathematical model expression and the instance data of the to-be-solved problem; and
allocating, based on a computation amount of each of the N subproblems, the N subproblems to M threads for parallel execution, wherein N is greater than M, each of the M threads processes one or more subproblems, and a difference between computation amounts required by the M threads for respectively processing the one or more subproblems is less than or equal to a preset threshold.

### Claim 2 (depends on 1)

The method according to claim 1, further comprising:
calculating the computation amount of each of the N subproblems based on at least one piece of characteristic information and at least one weight of the N subproblems, wherein the at least one weight indicates a weight of the at least one piece of characteristic information for calculating the computation amount, and the at least one piece of characteristic information comprises at least one of a problem type or a depth of each of the N subproblems.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the computation amount is indicated based on a quantity of thread iterations or thread processing time.

### Claim 4 (depends on 2)

The method according to claim 2, wherein the at least one piece of characteristic information of the subproblems further comprises historical task idle information and a historical task balance degree, the historical task idle information comprises idle time after a thread executes a historical subproblem, the historical task balance degree comprises a difference between historical computation amounts for executing the historical subproblem by different threads, and the historical subproblem is a subproblem of a same problem type as the subproblem.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the M threads comprise a first thread and a second thread, the first thread and the second thread have a shared task pool, and subproblems in the shared task pool comprise a subproblem allocated to the first thread and a subproblem allocated to the second thread, and the method further comprises:
reallocating the subproblems in the shared task pool to the first thread or the second thread.

### Claim 6 (depends on 5)

The method according to claim 5, wherein the reallocating the subproblems in the shared task pool to the first thread or the second thread comprises:
when the first thread is idle, reallocating a subproblem in a task pool corresponding to the second thread to the first thread for processing; or
when the second thread is idle, reallocating a subproblem in a task pool corresponding to the first thread to the second thread for processing.

### Claim 7 (depends on 4)

The method according to claim 4, wherein before the calculating the computation amount of each of the N subproblems based on the at least one piece of characteristic information and the at least one weight of the N subproblems, the method further comprises:
generating the at least one weight based on a machine model, wherein the machine model is a machine model obtained through training based on training data, and the training data comprises characteristic information of the historical subproblem and a weight corresponding to the characteristic information.

### Claim 8 (depends on 1)

The method according to claim 1, further comprising:
when the M threads execute the N subproblems and generate a plurality of secondary subproblems, calculating computation amounts of the secondary subproblems based on weights of the secondary subproblems; and
allocating the plurality of secondary subproblems to different threads for execution based on the computation amounts of the secondary subproblems.

### Claim 9 (depends on 1)

The method according to claim 1, further comprising:
receiving a deterministic parameter configured by a user, wherein the deterministic parameter is used to control a quantity of iterations of at least one of the M threads.

### Claim 10

A task processing apparatus, comprising
a memory; and
a processor configured to execute instructions stored in the memory to:
obtain a mathematical model expression and instance data of a to-be-solved problem, wherein the mathematical model expression comprises an objective function or a constraint condition, and the instance data indicates a value of a coefficient of the mathematical model expression; and
decompose the to-be-solved problem into N subproblems based on the mathematical model expression and the instance data of the to-be-solved problem; and
allocate, based on a computation amount of each of the N subproblems, the N subproblems to M threads for parallel execution, wherein N is greater than M, each of the M threads processes one or more subproblems, and a difference between computation amounts required by the M threads for respectively processing the one or more subproblems is less than or equal to a preset threshold.

### Claim 11 (depends on 10)

The apparatus according to claim 10, wherein the processor is configured to execute further instructions stored in the memory to:
calculate the computation amount of each of the N subproblems based on at least one piece of characteristic information and at least one weight of the N subproblems, wherein the at least one weight indicates a weight of the at least one piece of characteristic information for calculating the computation amount, and the at least one piece of characteristic information comprises at least one of a problem type or a depth of each of the N subproblems.

### Claim 12 (depends on 10)

The apparatus according to claim 10, wherein the computation amount is indicated based on a quantity of thread iterations or thread processing time.

### Claim 13 (depends on 11)

The apparatus according to claim 11, wherein the at least one piece of characteristic information of the subproblems further comprises historical task idle information and a historical task balance degree, the historical task idle information comprises idle time after a thread executes a historical subproblem, the historical task balance degree comprises a difference between historical computation amounts for executing the historical subproblem by different threads, and the historical subproblem is a subproblem of a same problem type as the subproblem.

### Claim 14 (depends on 10)

The apparatus according to claim 10, wherein the M threads comprise a first thread and a second thread, the first thread and the second thread have a shared task pool, and subproblems in the shared task pool comprise a subproblem allocated to the first thread and a subproblem allocated to the second thread, and the processor is configured to execute further instructions stored in the memory to:
reallocate the subproblems in the shared task pool to the first thread or the second thread.

### Claim 15 (depends on 14)

The apparatus according to claim 14, wherein the processor is configured to execute further instructions stored in the memory to:
when the first thread is idle, reallocate a subproblem in a task pool corresponding to the second thread to the first thread for processing; or
when the second thread is idle, reallocate a subproblem in a task pool corresponding to the first thread to the second thread for processing.

### Claim 16 (depends on 13)

The apparatus according to claim 13, wherein the processor is configured to execute further instructions stored in the memory to:
generate the at least one weight based on a machine model, wherein the machine model is a machine model obtained through training based on training data, and the training data comprises characteristic information of the historical subproblem and a weight corresponding to the characteristic information.

### Claim 17 (depends on 16)

The apparatus according to claim 16, wherein the processor is configured to execute further instructions stored in the memory to:
when the M threads execute the N subproblems and generate a plurality of secondary subproblems, calculate computation amounts of the secondary subproblems based on weights of the secondary subproblems; and
allocate the plurality of secondary subproblems to different threads for execution based on the computation amounts of the secondary subproblems.

### Claim 18 (depends on 10)

The apparatus according to claim 10, wherein the processor is configured to execute further instructions stored in the memory to:
receive a deterministic parameter configured by a user, wherein the deterministic parameter is used to control a quantity of iterations of at least one of the M of threads.

### Claim 19 (depends on 17)

The apparatus according to claim 17, wherein the processor is configured to execute further instructions stored in the memory to:
collect characteristic information of a training problem and a weight corresponding to the characteristic information, to generate first training data, wherein the training problem comprises the subproblems and the secondary subproblems; and
train the machine model based on the first training data.

### Claim 20

A computer program product comprising instructions, wherein when the instructions are executed by a compute device cluster, the compute device cluster is caused to:
obtain a mathematical model expression and instance data of a to-be-solved problem, wherein the mathematical model expression comprises an objective function or a constraint condition, and the instance data indicates a value of a coefficient of the mathematical model expression;
decompose the to-be-solved problem into N subproblems based on the mathematical model expression and the instance data of the to-be-solved problem; and
allocate, based on a computation amount of each of the N subproblems, the N subproblems to M threads for parallel execution, wherein N is greater than M, each of the M threads processes one or more subproblems, and a difference between computation amounts required by the M threads for respectively processing the one or more subproblems is less than or equal to a preset threshold.
