# US 2022/0035745 A1 · Data processing method and chip, device, 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 2022/0035745 A1
- Document ID: US20220035745A1
- Status: Published application
- Kind: A1
- Application number: 17/502,218
- Filed: 2021-10-15
- Published: 2022-02-03
- Earliest claimed: 2019-12-05
- Assignees: Tencent Technology (Shenzhen) Company Limited
- Applicants: Tencent Technology (Shenzhen) Company Limited
- Inventors: Yu MENG
- Web page: https://patentgrep.com/patent/US20220035745A1

## CPC

- G06F 12/0875: with dedicated cache, e.g. instruction or stack
- G06N 3/063: using electronic means
- G06N 3/04: Architecture, e.g. interconnection topology
- G06N 3/045: Combinations of networks
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06F 2212/1016: Performance improvement
- G06F 2212/452: Instruction code
- G06F 2212/454: Vector or matrix data
- G06F 2212/608: Details relating to cache mapping
- Y02D 10/00: Energy efficient computing, e.g. low power processors, power management or thermal management
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- Y02D: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE

## Abstract

A data processing method, device, and storage medium that reads a parallel control code; reads, according to the parallel control code, first data that has been cached in a data cache space, processes the read first data, and outputs the processed first data to the data cache space; and simultaneously moves second data from a data storage space to the data cache space according to the parallel control code, the second data being the next data of the first data. Data processing and data moving are performed simultaneously according to the parallel control code, to reduce a duration of the data processing waiting for the data moving, thereby improving a processing speed and processing efficiency.

## Claims

### Claim 1

A data processing method, performed by a computer device, the method comprising:
reading parallel control code;
reading, as instructed by the parallel control code, first data that has been cached in a data cache space, processing the read first data, and outputting processed first data to the data cache space; and
simultaneously moving second data from a data storage space to the data cache space as instructed by the parallel control code, the second data being next data of the first data.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the reading parallel control code comprises:
reading parallel control code in an instruction storage space;
moving the read parallel control code to an instruction cache space according to a reading sequence for caching, to obtain an instruction cache queue; and
reading the parallel control code from the instruction cache queue according to an instruction cache sequence.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the parallel control code comprises data processing code and data moving code;
after the reading the parallel control code, the method further comprises:
extracting the data processing code and the data moving code in the parallel control code;
the reading, according to the parallel control code, first data that has been cached in a data cache space, processing the read first data, and outputting processed first data to the data cache space comprises:
reading, according to the data processing code, the first data that has been cached in the data cache space, processing the read first data, and outputting the processed first data to the data cache space; and
the moving second data from a data storage space to the data cache space according to the parallel control code comprises:
moving the second data from the data storage space to the data cache space according to the data moving code.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the extracting comprises:
extracting valid field indication information in the parallel control code;
determining a first valid field and a second valid field in the parallel control code according to the valid field indication information; and
reading the first valid field in the parallel control code, to obtain the data processing code, and reading the second valid field in the parallel control code, to obtain the data moving code.

### Claim 5 (depends on 1)

The method according to claim 1, further comprising:
obtaining to-be-processed data;
splitting the to-be-processed data according to a cache capacity of the data cache space, to obtain a plurality of pieces of split data; and
storing a data sequence formed by the plurality of pieces of data in the data storage space.

### Claim 6 (depends on 5)

The method according to claim 5, wherein the to-be-processed data is picture data; and the reading, according to the parallel control code, first data that has been cached in a data cache space, processing the read first data, and outputting processed first data to the data cache space comprises:
reading, according to the parallel control code based on a neural network model, the first data that has been cached in the data cache space, processing the read first data, and outputting the processed first data to the data cache space.

### Claim 7 (depends on 6)

The method according to claim 6, further comprising:
performing data processing in parallel according to a data processing code corresponding to each layer in the neural network model.

### Claim 8 (depends on 7)

The method according to claim 7, wherein the neural network model comprises a convolutional layer and a pooling layer; and the performing comprises:
receiving a data processing code corresponding to the convolutional layer and a data processing code corresponding to the pooling layer;
reading, according to the data processing code corresponding to the convolutional layer based on the convolutional layer, the first data that has been cached in the data cache space, performing convolution processing on the first data, and outputting the first data after the convolution processing to the data cache space; and
simultaneously reading, according to the data processing code corresponding to the pooling layer based on the pooling layer, third data after the convolution processing that has been cached in the data cache space, performing pooling processing on the third data after the convolution processing, and outputting the third data after the pooling processing to the data cache space, the third data being previous data of the first data in the plurality of pieces of data.

### Claim 9

A computer device, comprising:
at least one memory configured to store program code;
at least one data storage;
at least one data cache;
at least one processor configured to access the program code and operate as instructed by the program code, the program code including:
instruction processing code configured to cause the at least one processor to read a parallel control code;
data processing code configured to cause the at least one processor to read, according to the parallel control code, first data that has been cached in the data cache, process the read first data, and output processed first data to the data cache; and
data moving code configured to cause the at least one processor to simultaneously move second data from the data storage to the data cache according to the parallel control code, the second data being next data of the first data.

### Claim 10 (depends on 9)

The device according to claim 9, wherein the instruction processing code is configured to cause the at least one processor to:
read parallel control code in an instruction storage;
move the read parallel control code to an instruction cache according to a reading sequence for caching, to obtain an instruction cache queue; and
read the parallel control code from the instruction cache queue according to an instruction cache sequence.

### Claim 11 (depends on 9)

The device according to claim 9, wherein the program code is further configured to cause the at least one processor to:
extract the data processing code and the data moving code in the parallel control code;
the data processing code is further configured to cause the at least one processor to:
read, according to the data processing code, the first data that has been cached in the data cache, process the read first data, and output the processed first data to the data cache; and
the data moving code is further configured to cause the at least one processor to:
move the second data from the data storage to the data cache according to the data moving code.

### Claim 12 (depends on 11)

The device according to claim 11, wherein the extracting comprises:
extracting valid field indication information in the parallel control code;
determining a first valid field and a second valid field in the parallel control code according to the valid field indication information; and
reading the first valid field in the parallel control code, to obtain the data processing code, and reading the second valid field in the parallel control code, to obtain the data moving code.

### Claim 13 (depends on 9)

The device according to claim 9, wherein the program code is further configured to cause the at least one processor to:
obtain to-be-processed data;
split the to-be-processed data according to a cache capacity of the data cache, to obtain a plurality of pieces of split data; and
store a data sequence formed by the plurality of pieces of data in the data storage.

### Claim 14 (depends on 13)

The device according to claim 13, wherein the to-be-processed data is picture data; and the data processing code is further configured to cause the at least one processor to:
read, according to the parallel control code based on a neural network model, the first data that has been cached in the data cache, process the read first data, and output the processed first data to the data cache.

### Claim 15 (depends on 14)

The device according to claim 14, wherein the program code is further configured to cause the at least one processor to:
perform data processing in parallel according to a data processing code corresponding to each layer in the neural network model.

### Claim 16 (depends on 15)

The device according to claim 15, wherein the neural network model comprises a convolutional layer and a pooling layer, and the program code is further configured to cause the at least one processor to:
receive the data processing code corresponding to the convolutional layer and the data processing code corresponding to the pooling layer;
read, according to the data processing code corresponding to the convolutional layer based on the convolutional layer, the first data that has been cached in the data cache, perform convolution processing on the first data, and output the first data after the convolution processing to the data cache; and
simultaneously read, according to the data processing code corresponding to the pooling layer based on the pooling layer, third data after the convolution processing that has been cached in the data cache, perform pooling processing on the third data after the convolution processing, and output the third data after the pooling processing to the data cache, the third data being previous data of the first data in the plurality of pieces of data.

### Claim 17

A non-volatile computer-readable storage medium, storing computer code that when executed by at least one processor causes the at least one processor to:
read parallel control code;
read, according to the parallel control code, first data that has been cached in a data cache, process the read first data, and output processed first data to the data cache; and
simultaneously move second data from a data storage to the data cache according to the parallel control code, the second data being next data of the first data.

### Claim 18 (depends on 17)

The storage medium according to claim 17, wherein the reading parallel control code is further configured to cause the at least one processor to:
read parallel control code in an instruction storage;
move the read parallel control code to an instruction cache according to a reading sequence for caching, to obtain an instruction cache queue; and
read the parallel control code from the instruction cache queue according to an instruction cache sequence.

### Claim 19 (depends on 17)

The memory storage medium according to claim 17, wherein the parallel control code includes data processing code and data moving code; and
after reading the parallel control code, the computer code causes the at least one processor to:
extract the data processing code and the data moving code in the parallel control code;
wherein the read, according to the parallel control code, first data that has been cached in a data cache, process the read first data, and output processed first data to the data cache comprises:
reading, according to the data processing code, the first data that has been cached in the data cache, processing the read first data, and outputting the processed first data to the data cache; and
wherein the move second data from a data storage to the data cache according to the parallel control code comprises:
moving the second data from the data storage to the data cache according to the data moving code.

### Claim 20 (depends on 17)

The memory storage medium according to claim 17, wherein the computer code is further configured to cause the at least one processor to:
obtain to-be-processed data;
split the to-be-processed data according to a cache capacity of the data cache, to obtain a plurality of pieces of split data; and
store a data sequence formed by the plurality of pieces of data in the data storage.
