# US 2022/0283876 A1 · Dynamic resource allocation for efficient parallel processing of data stream slices

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

- Number: US 2022/0283876 A1
- Document ID: US20220283876A1
- Status: Published application
- Kind: A1
- Application number: 17/334,828
- Filed: 2021-05-31
- Published: 2022-09-08
- Earliest claimed: 2021-03-03
- Assignees: NEC Laboratories Europe GmbH
- Applicants: NEC Laboratories Europe GmbH
- Inventors: Felix Klaedtke
- Web page: https://patentgrep.com/patent/US20220283876A1

## CPC

- G06F 9/5088: {involving task migration}
- G06F 9/542: {Event management; Broadcasting; Multicasting; Notifications}
- G06F 9/4498: {Finite state machines}
- 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: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method for processing slices of a data stream in parallel by different workers includes receiving events of the data stream and forwarding the events to respective ones of the workers for updating respective states of the respective workers and for outputting results of data processing of the events. The states comprise hierarchically grouped state variables. At least one of the workers checks whether it is in a terminable state by checking that state variables that are owned by the worker in a current state of the worker have initial values.

## Claims

### Claim 1

A method for processing slices of a data stream in parallel by different workers, the method comprising:
receiving events of the data stream and forwarding the events to respective ones of the workers for updating respective states of the respective workers and for outputting results of data processing of the events, wherein the states comprise hierarchically grouped state variables,
wherein at least one of the workers checks whether it is in a terminable state by checking that state variables that are owned by the worker in a current state of the worker have initial values.

### Claim 2 (depends on 1)

The method according to claim 1, further comprising receiving a termination request from at least one of the workers that determines it is in the terminable state, and sending a termination acknowledgement for terminating the at least one worker that sent the termination request.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the termination request includes an event id, the method further comprising, prior to terminating the at least one worker, checking that the event id in the termination request matches an event id in a key-value store for a key corresponding to the at least one worker that sent the termination request, wherein the at least one worker terminates itself based on receiving the termination acknowledgement.

### Claim 4 (depends on 1)

The method according to claim 1, further comprising, for each of the received events, extracting data values and determining a key for the respective event based on the extracted data values using a key-value store having keys for each of the workers, wherein the events are forwarded to the respective workers based on the determined keys.

### Claim 5 (depends on 4)

The method according to claim 4, further comprising updating the key-value store for each of the received events, each of the keys in the key-value store including an identification of at least one of the workers and/or a worker channel, and an event id of a most recent event sent to the respective worker.

### Claim 6 (depends on 4)

The method according to claim 4, further comprising determining that, for one of the received events, the key does not have a corresponding worker, and generating a new worker.

### Claim 7 (depends on 6)

The method according to claim 6, wherein the new worker is generated by:
creating a new worker channel;
determining at least one parent worker using the key-value store; and
initializing the new worker using the state of the at least one parent worker and the new worker channel.

### Claim 8 (depends on 7)

The method according to claim 7, wherein the at least one parent worker includes a primary parent and secondary parents, wherein the new worker is initialized with the state of the primary parent, and wherein at least some of the state variables from the secondary parents are used to update the state of the new worker.

### Claim 9 (depends on 7)

The method according to claim 7, further comprising updating the key-value store to include the new worker and the new worker channel for the respective received event, and to remove the worker to be terminated and a corresponding worker channel.

### Claim 10 (depends on 1)

The method according to claim 1, further comprising:
receiving a termination request from at least one of the workers that determines it is in the terminable state;
checking whether the at least one worker has any upcoming events for processing and sending a termination acknowledgement to the at least one worker only in a case that it is determined that the worker does not have any upcoming events for processing; and
the at least one worker terminating itself upon receiving the termination acknowledgement.

### Claim 11 (depends on 1)

The method according to claim 1, further comprising receiving a termination request from at least one of the workers that determines it is in the terminable state, wherein the termination request includes the state variables that are initial and not owned by the at least one worker, the method further comprising sending a termination acknowledgment to the at least one worker and additional ones of the workers having smaller keys than the at least one worker and owning a subset of the state variables in the termination request.

### Claim 12

A data stream processor for processing slices of a data stream in parallel by different workers, the data stream processor comprising one or more processors and physical memory implementing a dispatcher and the different workers, the one or more processors being configured by instructions in the memory to facilitate the following steps:
receiving events of the data stream and forwarding the events to respective ones of the workers for updating respective states of the respective workers and for outputting results of data processing of the events, wherein the states comprise hierarchically grouped state variables,
wherein at least one of the workers checks whether it is in a terminable state by checking that state variables that are owned by the worker in a current state of the worker have initial values.

### Claim 13 (depends on 12)

The data stream processor according to claim 12, wherein the at least one worker is configured to send a termination request to the dispatcher upon determining that it is in the terminable state, wherein the dispatcher is configured to check whether the at least one worker has any upcoming events for processing upon receiving the termination request and to send a termination acknowledgement to the at least on worker in a case it is determined the at least one worker does not have upcoming events for processing, and wherein the at least one worker is configured to terminate itself upon receiving the termination acknowledgment.

### Claim 14 (depends on 13)

The data stream processor according to claim 13, wherein the at least one worker is configured to send a termination request to the dispatcher upon determining that it is in the terminable state, wherein the termination request includes the state variables that are initial and not owned by the at least one worker, and wherein the dispatcher is configured to send a termination acknowledgment to the at least one worker and additional ones of the workers having smaller keys than the at least one worker and owning a subset of the state variables in the termination request such that the at least one worker and the additional ones of the workers terminate.

### Claim 15

A tangible, non-transitory computer-readable medium having instructions thereon which, upon being executed by one or more processors, facilitate execution of the following steps:
receiving events of the data stream and forwarding the events to respective ones of the workers for updating respective states of the respective workers and for outputting results of data processing of the events, wherein the states comprise hierarchically grouped state variables,
wherein at least one of the workers checks whether it is in a terminable state by checking that state variables that are owned by the worker in a current state of the worker have initial values.
