# US 12,222,804 B2 · Encoding and decoding method, apparatus and device based on erasure pool, and storage medium

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

- Number: US 12,222,804 B2
- Document ID: US12222804B2
- Status: Granted
- Kind: B2
- Application number: 18/271,437
- Filed: 2022-02-28
- Published: 2024-02-22
- Granted: 2025-02-11
- Earliest claimed: 2021-03-26
- Assignees: Shandong Yingxin Computer Technologies Co., Ltd.
- Applicants: Shandong Yingxin Computer Technologies Co., Ltd.
- Inventors: Xinliang Zhang
- Web page: https://patentgrep.com/patent/US12222804B2

## CPC

- G06F 11/1044: {with specific ECC/EDC distribution}
- G06F 11/327: {Alarm or error message display}
- G06F 11/328: {Computer systems status display (G06F11/327 takes precedence)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The present disclosure discloses an encoding and decoding method, apparatus and device based on an erasure pool, and a computer readable storage medium. The method includes: storing, upon receiving original data that needs to be subjected to data encoding and decoding, the original data into a shared memory; sending an encoding and decoding signal to an encoding and decoding process, so that the encoding and decoding process obtains the original data from the shared memory after receiving the encoding and decoding signal, and calls a hard codec plug-in to perform a hard encoding and decoding operation; controlling, if the hard encoding and decoding operation fails, the encoding and decoding process to call a soft codec plug-in to perform a soft encoding and decoding operation; and obtaining, after the encoding and decoding process completes the encoding and decoding operation, an encoding and decoding result from the shared memory.

## Claims

### Claim 1

An encoding and decoding method based on an erasure pool, comprising:
storing by a processing process which is run in the erasure pool, upon receiving original data that needs to be subjected to data encoding and decoding by the processing process, the original data into a shared memory;
sending an encoding and decoding signal to an encoding and decoding process by the processing process, so that the encoding and decoding process obtains the original data from the shared memory after receiving the encoding and decoding signal, and calls a hard codec plug-in to perform a hard encoding and decoding operation;
controlling by the processing process, in a case that a failure or hot plugging occurs to the accelerator chip, which will lead to a failure of the encoding and decoding operation, the encoding and decoding process to call a soft codec plug-in to perform a soft encoding and decoding operation; and
obtaining by the processing process, after the encoding and decoding process completes the encoding and decoding operation, an encoding and decoding result from the shared memory,
wherein the encoding and decoding process obtaining the original data from the shared memory after receiving the encoding and decoding signal, and calling the hard codec plug-in to perform the hard encoding and decoding operation specifically comprises:
obtaining, by the encoding and decoding process, the original data from the shared memory after receiving the encoding and decoding signal; and
calling, by the encoding and decoding process, a driver API of an accelerator chip by calling a hard codec plug-in interface, and calling a corresponding encoding and decoding function to perform the hard encoding and decoding operation by utilizing the accelerator chip.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the controlling, in a case that the hard encoding and decoding operation fails, the encoding and decoding process to call the soft codec plug-in to perform the soft encoding and decoding operation specifically comprises:
controlling, if the hard encoding and decoding operation fails, the encoding and decoding process to call the corresponding encoding and decoding function to perform the soft encoding and decoding operation by calling a CPU command.

### Claim 3 (depends on 1)

The method according to claim 1, further comprising:
receiving a health status of the encoding and decoding process during the encoding and decoding operation.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the health status comprises a memory footprint of encoding and decoding, an encoding and decoding speed, an encoding and decoding success rate and time consumed by encoding and decoding.

### Claim 5 (depends on 3)

The method according to claim 3, further comprising:
giving, when an abnormality of the health status occurs, an alarm prompt for the abnormality.

### Claim 6 (depends on 5)

The method according to claim 5, wherein giving, when the abnormality of the health status occurs, the alarm prompt for the abnormality comprises:
performing analysis on the basis of the health status reported by the encoding and decoding process;
when the abnormality of the health status is determined, triggering a preset prompting device to send out a corresponding alarm message to give the alarm prompt.

### Claim 7 (depends on 6)

The method according to claim 6, wherein performing analysis on the basis of the health status reported by the encoding and decoding process comprises:
analysing the health status based on a parameter of the encoding and decoding process, wherein the parameter comprises at least one of the following: a memory footprint of encoding and decoding, a encoding and decoding speed, a encoding and decoding success rate, and time consumed by encoding and decoding.

### Claim 8 (depends on 6)

The method according to claim 6, wherein the prompting device comprises at least one of the following: a buzzer, an indicator light, and a display.

### Claim 9 (depends on 3)

The method according to claim 3, wherein receiving the health status of the encoding and decoding process during the encoding and decoding operation comprises:
obtaining the health status, by the encoding and decoding process, during the encoding and decoding operation;
sending the health status to the erasure pool, by the encoding and decoding process, based on a pre-established signaling channel.

### Claim 10 (depends on 1)

The method according to claim 1, wherein obtaining, after the encoding and decoding process completes the encoding and decoding operation, the encoding and decoding result from the shared memory specifically comprises:
obtaining, after the encoding and decoding process completes the encoding and decoding operation and receives a prompt message sent by the encoding and decoding process, the encoding and decoding result from the shared memory.

### Claim 11 (depends on 10)

The method according to claim 10, wherein obtaining, after the encoding and decoding process completes the encoding and decoding operation and receives the prompt message sent by the encoding and decoding process, the encoding and decoding result from the shared memory comprises:
after the encoding and decoding process completes the encoding and decoding operation and obtains the encoding and decoding result, storing the encoding and decoding result into the shared memory, and sending the prompt message to the erasure pool;
after receiving the prompt message, obtaining the encoding and decoding result corresponding to the original data, by the erasure pool, from the shared memory.

### Claim 12 (depends on 1)

The method according to claim 1, the method further comprising:
running a processing process in the erasure pool of a distributed system, wherein the processing process is used for maintaining and managing the encoding and decoding process;
after the encoding and decoding process is started, establishing a signaling channel with the erasure pool to transmit the encoding and decoding signal.

### Claim 13 (depends on 12)

The method according to claim 12, wherein storing, upon receiving the original data that needs to be subjected to data encoding and decoding, the original data into the shared memory comprises:
after the distributed system is started, starting the processing process by the erasure pool;
when the encoding and decoding operation is needed, receiving the original data that needs to be subjected to data encoding and decoding by the processing process, and storing the original data into the shared memory.

### Claim 14 (depends on 12)

The method according to claim 12, wherein obtaining, after the encoding and decoding process completes the encoding and decoding operation, the encoding and decoding result from the shared memory comprises:
after the encoding and decoding process calls the hard codec plug-in/soft codec plug-in to complete the encoding and decoding operation, obtaining the encoding and decoding result;
storing the encoding and decoding result into the shared memory;
obtaining the encoding and decoding result corresponding to the original data, by the processing process of the erasure pool, from the shared memory.

### Claim 15 (depends on 1)

The method according to claim 1, wherein the hard encoding and decoding operation refers to an encoding and decoding operation realized by hardware devices which comprise an accelerator chip.

### Claim 16 (depends on 12)

The method according to claim 12, wherein controlling, in a case that the hard encoding and decoding operation fails, the encoding and decoding process to call the soft codec plug-in to perform the soft encoding and decoding operation comprises:
in a case that a failure or hot plugging may occur to the accelerator chip, which lead to a failure of the encoding and decoding operation, controlling the encoding and decoding process, by the processing process of the erasure pool, to call the soft codec plug-in to perform the soft encoding and decoding operation on the original data.

### Claim 17 (depends on 1)

The method according to claim 1, wherein the soft encoding and decoding operation refers to an encoding and decoding operation performed by calling a CPU command.

### Claim 18

An encoding and decoding device based on an erasure pool, comprising:
a memory, configured to store a computer program; and
one or more processors,
herein, when the computer program is executed by the one or more processors, the one or more processors are enabled to:
store, upon receiving original data that needs to be subjected to data encoding and decoding, the original data into a shared memory;
send an encoding and decoding signal to an encoding and decoding process, so that the encoding and decoding process obtains the original data from the shared memory after receiving the encoding and decoding signal, and calls a hard codec plug-in to perform a hard encoding and decoding operation;
control, in a case that a failure or hot plugging occurs to the accelerator chip, which will lead to a failure of the encoding and decoding operation, the encoding and decoding process to call a soft codec plug-in to perform a soft encoding and decoding operation; and
obtain, after the encoding and decoding process completes the encoding and decoding operation, an encoding and decoding result from the shared memory,
wherein the encoding and decoding process obtains the original data from the shared memory after receiving the encoding and decoding signal, and calls the hard codec plug-in to perform the hard encoding and decoding operation specifically comprises:
the encoding and decoding process obtains the original data from the shared memory after receiving the encoding and decoding signal; and
the encoding and decoding process calls a driver API of an accelerator chip by calling a hard codec plug-in interface, and calls a corresponding encoding and decoding function to perform the hard encoding and decoding operation by utilizing the accelerator chip.

### Claim 19

A computer readable storage medium, wherein the computer readable storage medium stores a computer program therein, when the computer program is executed by one or more processors, the one or more processors are enabled to:
store, upon receiving original data that needs to be subjected to data encoding and decoding, the original data into a shared memory;
send an encoding and decoding signal to an encoding and decoding process, so that the encoding and decoding process obtains the original data from the shared memory after receiving the encoding and decoding signal, and calls a hard codec plug-in to perform a hard encoding and decoding operation;
control, in a case that a failure or hot plugging occurs to the accelerator chip, which will lead to a failure of the encoding and decoding operation, the encoding and decoding process to call a soft codec plug-in to perform a soft encoding and decoding operation; and
obtain, after the encoding and decoding process completes the encoding and decoding operation, an encoding and decoding result from the shared memory,
wherein the encoding and decoding process obtains the original data from the shared memory after receiving the encoding and decoding signal, and calls the hard codec plug-in to perform the hard encoding and decoding operation specifically comprises:
the encoding and decoding process obtains the original data from the shared memory after receiving the encoding and decoding signal; and
the encoding and decoding process calls a driver API of an accelerator chip by calling a hard codec plug-in interface, and calls a corresponding encoding and decoding function to perform the hard encoding and decoding operation by utilizing the accelerator chip.
