# US 2023/0267006 A1 · Method for optimizing resource allocation basedon prediction with reinforcement learning

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

- Number: US 2023/0267006 A1
- Document ID: US20230267006A1
- Status: Published application
- Kind: A1
- Application number: 17/678,103
- Filed: 2022-02-23
- Published: 2023-08-24
- Earliest claimed: 2022-02-23
- Assignees: ProphetStor Data Services, Inc.
- Applicants: ProphetStor Data Services, Inc.
- Inventors: Wen-Shyen Chen; Ming-Jye Sheu; Henry H. Tzeng
- Web page: https://patentgrep.com/patent/US20230267006A1

## CPC

- G06F 9/5027: {the resource being a machine, e.g. CPUs, Servers, Terminals}
- G06F 9/5061: {Partitioning or combining of resources}
- G06N 3/006: based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
- G06F 2209/5019: Workload prediction
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A method for optimizing resource allocation based on prediction with reinforcement learning includes the steps of: a) providing a prediction on the number of units of the resource for a workload in more than N timepoints after a 0-th timepoint to the processor; b) calculating at least one 0-th possible operation cost (POC) based on at least one possible provisioned number (PPN) at 1-th timepoint; c) repeating the following sub-steps for the i-th timepoint with i from 1 to N by the processor: c1) calculating at least one i-th possible operation cost (POCi); c2) finding out the smallest and the second smallest POCi; and c3) setting PPNi used to calculate the smallest POCi as an i-th assigned number; and d) provisioning 1 unit of the resource at the 0-th timepoint and i-th assigned number of units of the resource at the i-th timepoint for the workload by the processor.

## Claims

### Claim 1

A method for optimizing resource allocation based on prediction with reinforcement learning, implemented by a processor which determines the number of units of a resource in a computer cluster to be deployed, comprising the steps of:
a) providing a prediction on the number of units of the resource needed for a workload in more than N timepoints after a 0-th timepoint to the processor, wherein there are maximum M units of the source available for provisioning and Ui is the number of units needed at the i-th timepoint according to the prediction, and N, M and i are positive integer;
b) calculating at least one 0-th possible operation cost (POC0) based on at least one possible provisioned number (PPN) at 1-th timepoint (PPN1) ranging from U1 to M by the processor, wherein the POC0 is given by
POC
0
=
K
+
RF
×
PPN
1
−
K
+
PPN
1
,
where RF is a rebalance factor between 0 and 1, and K is a real number;
c) repeating the following sub-steps for the i-th timepoint with i from 1 to N in sequence by the processor:
c1) calculating at least one i-th possible operation cost (POCi), wherein the POCi is given by
POC
i
=
POC
i
−
1
+
RF
×
PPN
i
+
1
−
PPN
i
+
PPN
i
+
1
,
where POC(i-1) is the possible operation cost(s) calculated for the (i-1)-th timepoint, PPN(i+1) is the PPN at the (i+1)-th timepoint ranging from U(i+1) to M, PPNi is the PPN at the i-th timepoint ranging from Ui to M, and PPNis used for calculating POCi and POC(i-1) have the same value;
c2) finding out the smallest and the second smallest POCi; and
c3) if the smallest and the second smallest POCi are calculated from the same PPNi, then setting the PPNi used to calculate the smallest POCi as an i-th assigned number, and removing the POCi(s) not calculated from the i-th assigned number for the calculation of next timepoint; and
d) provisioning 1 unit of the resource at the 0-th timepoint and i-th assigned number of units of the resource at the i-th timepoint for the workload by the processor.

### Claim 2 (depends on 1)

The method according to claim 1, further comprising a sub-step: c4) if the smallest and the second smallest POCi are not calculated from the same PPNi, then individually using the PPNis to calculate POC(i+1), setting the PPNi used to calculate the smallest POC(i+1) as the i-th assigned number, and removing the POCi(s) not calculated from the i-th assigned number for the calculation of next timepoint, wherein POC(i+1) is the possible operation cost(s) calculated for the (i+1)-th timepoint.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the resource is memory module, CPU, I/O throughput, response time, request per second, or latency.

### Claim 4

A method for optimizing resource allocation based on prediction with reinforcement learning, implemented by a processor which determines the number of units of a resource in a computer cluster to be deployed, comprising the steps of:
a) providing a prediction on the number of units of the resource needed for a workload in more than N timepoints after a 0-th timepoint to the processor, wherein there are maximum M units of the source available for provisioning and Ui is the number of units needed at the i-th timepoint according to the prediction, and N, M and i are positive integer;
b) calculating at least one 0-th possible operation cost (POC0) based on at least one possible provisioned number (PPN) at 1-th timepoint (PPN1) ranging from U1 to the smallest of U1+A and M by the processor, wherein the POC0 is given by
POC
0
=
K
+
RF
×
PPN
1
- K
+
PPN
1
,
where RF is a rebalance factor between 0 and 1, A is an integer, and K is a real number;
c) repeating the following sub-steps for the i-th timepoint with i from 1 to N in sequence by the processor:
c1) calculating at least one i-th possible operation cost (POCi), wherein the POCi is given by
POC
i
=
POC
i
−
1
+
RF
×
PPN
i
+
1
- PPN
i
+
PPN
i
+
1
,
where POC(i-1) is the possible operation cost(s) calculated for the (i-1)-th timepoint, PPN(i+1) is the PPN at the (i+1)-th timepoint ranging from U(i+1) to the smallest of U(i+1)+A and M, PPNi is the PPN at the i-th timepoint ranging from Ui to the smallest of Ui+A and M, and PPNis used for calculating POCi and POC(i-1) have the same value;
c2) finding out the smallest and the second smallest POCi; and
c3) if the smallest and the second smallest POCi are calculated from the same PPNi, then setting the PPNi used to calculate the smallest POCi as an i-th assigned number, and removing the POCi(s) not calculated from the i-th assigned number for the calculation of next timepoint; and
d) provisioning 1 unit of the resource at the 0-th timepoint and i-th assigned number of units of the resource at the i-th timepoint for the workload by the processor.

### Claim 5 (depends on 4)

The method according to claim 4, further comprising a sub-step: c4) if the smallest and the second smallest POCi are not calculated from the same PPNi, then individually using the PPNis to calculate POC(i+1), setting the PPNi used to calculate the smallest POC(i+1) as the i-th assigned number, and removing the POCi(s) not calculated from the i-th assigned number for the calculation of next timepoint, wherein POC(i+1) is the possible operation cost(s) calculated for the (i+1)-th timepoint.

### Claim 6 (depends on 4)

The method according to claim 4, wherein the resource is memory module, CPU, I/O throughput, response time, request per second, or latency.

### Claim 7

A method for optimizing resource allocation based on prediction with reinforcement learning, implemented by a processor which determines the number of units of a resource in a computer cluster to be deployed, comprising the steps of:
a) providing a prediction on the number of units of the resource needed for a workload in more than N timepoints after a 0-th timepoint to the processor, wherein there are maximum M units of the source available for provisioning and Ui is the number of units needed at the i-th timepoint according to the prediction, and N, M and i are positive integer;
b) calculating at least one 1-th possible operation cost (POC1) based on at least one possible provisioned number (PPN) at 1-th timepoint (PPN1) ranging from U1 to M and at least one PPN at 2-th timepoint (PPN2) ranging from U2 to M by the processor, wherein the POC0 is given by
POC
1
=
K
+
RF
×
PPN
1
- K
+
PPN
1
+
RF
×
PPN
2
−
PPN
1
+
PPN
2
,
where RF is a rebalance factor between 0 and 1, and K is a real number;
c) setting the PPN1 used to calculate the smallest POC1 as a 1-th assigned number;
d) repeating the following sub-steps for timepoints with an even number i from 2 to 2 x [N/2] in sequence by the processor:
d1) calculating at least one (i+1)-th possible operation cost POC(i+1), wherein the POC(i+1) is given by
POC
i
+
1
=
POC
i
−
1
+
RF
×
PPN
i
+
1
- PPN
i
+
PPN
i
+
1
+
Wi,
where Wi is RF x | PPN(i+2) - PPN(i+1) | + PPN(i+2), POC(i-1) is the possible operation cost(s) calculated for the (i-1)-th timepoint, PPN(i+2) is the PPN at the (i+2)-th timepoint ranging from U(i+2) to M, PPN(i+1) is the PPN at the (i+1)-th timepoint ranging from U(i+1) to M, PPNi is the PPN at the i-th timepoint ranging from Ui to M, and PPNis used for calculating POC(i+1) and POC(i-1) have the same value; wherein if (i+2) is greater than N, Wi is omitted from calculation;
d2) finding out the smallest and the second smallest POCi; and
d3) if the smallest and the second smallest POCi are calculated from the same PPNi, then setting the PPNi used to calculate the smallest POC(i+1) as an i-th assigned number and the PPN(i+1) used to calculate the smallest POC(i+1) as an (i+1)-th assigned number, and removing the POC(i+1)(s) not calculated from the i-th assigned number for the calculation of next timepoint; and
e) provisioning 1 unit of the resource at the 0-th timepoint and j-th assigned number of units of the resource at the j-th timepoint for the workload by the processor where j ranges from 1 to N.

### Claim 8 (depends on 7)

The method according to claim 7, wherein the resource is memory module, CPU, I/O throughput, response time, request per second, or latency.
