IP Library Granted Patent US 12675680
Granted Patent B2
US 12675680 · App. 18/087,956 · Granted Jul 7, 2026

Data processing method and device, and neural network processing device

Inventor: Fuhai Sun (Beijing, CN)
Assignee: BEIJING ESWIN COMPUTING TECHNOLOGY CO., LTD.
G06N3/063
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12675680
App. No.
18/087,956
Granted
Jul 7, 2026
Kind
B2
Abstract

A data processing method and device for a neural network, a neural network processing device, and a storage medium. The neural network includes a plurality of network layers, the plurality of network layers include a first network layer, and the method includes: receiving at least two output feature data subsets, obtained by a processing circuit array for at least two different portions of the first network layer, from the processing circuit array; splicing and combining the at least two output feature data subsets according to positions of the at least two different portions in the first network layer to obtain a reorganized data subset; and writing the reorganized data subset into a destination storage device. The data processing method for neural network processing may be capable of improving system efficiency and improving bus bandwidth utilization.

Claims (67)

1 . A data processing method for a neural network, the neural network comprising a plurality of network layers, the plurality of network layers comprising a first network layer, and the method comprising:

receiving at least two output feature data subsets, obtained by a processing circuit array for at least two different portions of the first network layer, from the processing circuit array;

splicing and combining the at least two output feature data subsets according to positions of the at least two different portions in the first network layer to obtain a reorganized data subset; and

writing the reorganized data subset into a destination storage device,

wherein the plurality of network layers further comprises a second network layer, and an output feature map of the first network layer is served as an input feature map of the second network layer; and

the splicing and combining the at least two output feature data subsets according to the positions of the at least two different portions in the first network layer to obtain the reorganized data subset comprises:

determining second positions of the at least two output feature data subsets in the output feature map of the first network layer according to first positions of the at least two

different portions in the first network layer, and splicing and combining the at least two output feature data subsets according to the second positions to obtain the reorganized data subset.

2 . The data processing method according to claim 1 , wherein the splicing and combining the at least two output feature data subsets according to the second positions to obtain the reorganized data subset comprises:

consecutively arranging the at least two output feature data subsets to obtain the reorganized data subset in response to the at least two output feature data subsets being correspondingly consecutively arranged in the input feature map of the second network layer.

3 . The data processing method according to claim 1 , wherein the splicing and combining the at least two output feature data subsets according to the second positions to obtain the reorganized data subset comprises:

splicing and combining the at least two output feature data subsets according to a mode in which the input feature map of the second network layer is input to the processing circuit array and according to the second positions to obtain the reorganized data subset.

4 . The data processing method according to claim 3 , wherein the splicing and combining the at least two output feature data subsets according to the mode in which the input feature map of the second network layer is input to the processing circuit array and according to the second positions to obtain the reorganized data subset comprises:

consecutively arranging the at least two output feature data subsets to obtain the reorganized data subset, in response to the at least two output feature data subsets being consecutively input into the processing circuit array correspondingly according to the mode and the second positions.

5 . The data processing method according to claim 2 , wherein the writing the reorganized data subset into the destination storage device comprises:

writing the reorganized data subset obtained by consecutively arranging the at least two output feature data subsets into the destination storage device by performing a single storage operation through a data bus.

6 . The data processing method according to claim 5 , wherein the writing the reorganized data subset into the destination storage device further comprises:

acquiring a storage address and a valid data length of the reorganized data subset,

wherein the writing the reorganized data subset into the destination storage device by performing the single storage operation through the data bus comprises:

performing the single storage operation to write into the destination storage device using the storage address and the valid data length.

7 . The data processing method according to claim 1 , wherein the receiving at least two output feature data subsets, obtained by the processing circuit array for at least two different portions of the first network layer, from the processing circuit array comprises:

obtaining the at least two output feature data subsets from different processing circuits of the processing circuit array in a same operating cycle or in different operating cycles, or obtaining the at least two output feature data subsets from a same processing circuit in different operating cycles; and

performing address mapping, according to the different processing circuits or the same processing circuit of the processing circuit array and a mapping mode in which an input feature map of the first network layer are input to the processing circuit array, and obtaining positions of the at least two different portions in the first network layer.

8 . The data processing method according to claim 7 , wherein the receiving at least two output feature data subsets, obtained by the processing circuit array for at least two different portions of the first network layer, from the processing circuit array further comprises:

caching the at least two output feature data subsets for the splicing and combining, in response to obtaining the at least two output feature data subsets in the different operating cycles.

9 . The data processing method according to claim 7 , wherein the splicing and combining the at least two output feature data subsets according to positions of the at least two different portions in the first network layer to obtain the reorganized data subset comprises:

performing coordinate scanning according to the positions of the at least two different portions in the first network layer to obtain coordinates of the at least two output feature data subsets in the output feature map of the first network layer; and

splicing and combining the at least two output feature data subsets according to a result of the coordinate scanning to obtain the reorganized data subset.

10 . The data processing method according to claim 4 , wherein the writing the reorganized data subset into the destination storage device comprises:

writing the reorganized data subset obtained by consecutively arranging the at least two output feature data subsets into the destination storage device by performing a single storage operation through a data bus.

11 . The data processing method according to claim 10 , wherein the writing the reorganized data subset into the destination storage device further comprises:

acquiring a storage address and a valid data length of the reorganized data subset,

wherein the writing the reorganized data subset into the destination storage device by performing the single storage operation through the data bus comprises:

performing the single storage operation to write into the destination storage device using the storage address and the valid data length.

12 . A data processing device for a neural network, the neural network comprising a plurality of network layers, the plurality of network layers comprising a first network layer, and the device comprising:

a receiving circuit, configured to receive at least two output feature data subsets, obtained by a processing circuit array for at least two different portions of the first network layer, from the processing circuit array;

a reorganization circuit, configured to splice and combine the at least two output feature data subsets according to positions of the at least two different portions in the first network layer to obtain a reorganized data subset; and

a writing circuit, configured to write the reorganized data subset into a destination storage device,

wherein the plurality of network layers further comprises a second network layer, and an output feature map of the first network layer is served as an input feature map of the second network layer; and

wherein the reorganization circuit comprises:

a coordinate scanning subcircuit, configured to perform coordinate scanning according to the positions of the at least two different portions in the first network layer to obtain coordinates of the at least two output feature data subsets in an output feature map of the first network layer; and

a coordinate combining subcircuit, configured to splice and combine the at least two output feature data subsets according to a result of the coordinate scanning to obtain the reorganized data subset.

13 . The data processing device according to claim 12 , wherein the receiving circuit is further configured to:

obtain the at least two output feature data subsets from different processing circuits of the processing circuit array in a same operating cycle or different operating cycles, or obtain the at least two output feature data subsets from a same processing circuit in different operating cycles; and

perform address mapping according to the different processing circuits or a same processing circuit of the processing circuit array and a mapping mode in which an input feature map of the first network layer are input to the processing circuit array, and obtain positions of the at least two different portions in the first network layer.

14 . The data processing device according to claim 12 , further comprising:

a cache circuit, configured to cache the at least two output feature data subsets for the splicing and combining.

15 . The data processing device according to claim 14 , wherein the cache circuit comprises a plurality of sub-cache circuits,

the reorganization circuit is further configured to perform the splicing and combining by taking a bit width of each of the plurality of sub-cache circuits as a unit to obtain the reorganized data subset, and

a bus width written by the writing circuit into the destination storage device is a multiple of the bit width of each of the plurality of sub-cache circuits.

16 . A data processing device for a neural network, comprising:

a processing circuit, and

a memory on which one or more computer program modules are stored,

wherein the one or more computer program modules are configured to, when executed by the processing circuit, perform a data processing method for a neural network, the neural network comprising a plurality of network layers, the plurality of network layers comprising a first network layer, and the method comprising:

receiving at least two output feature data subsets, obtained by a processing circuit array for at least two different portions of the first network layer, from the processing circuit array;

splicing and combining the at least two output feature data subsets according to positions of the at least two different portions in the first network layer to obtain a reorganized data subset; and

writing the reorganized data subset into a destination storage device,

wherein the plurality of network layers further comprises a second network layer, and an output feature map of the first network layer is served as an input feature map of the second network layer; and

the splicing and combining the at least two output feature data subsets according to the positions of the at least two different portions in the first network layer to obtain the reorganized data subset comprises:

determining second positions of the at least two output feature data subsets in the output feature map of the first network layer according to first positions of the at least two different portions in the first network layer, and

splicing and combining the at least two output feature data subsets according to the second positions to obtain the reorganized data subset.

17 . A non-transitory readable storage medium, wherein computer instructions are stored on the non-transitory readable storage medium, and the computer instructions, when executed by a processor, perform the data processing method according to claim 1 .

18 . A neural network processing device, comprising:

the data processing device according to claim 12 ,

the processing circuit array, and

the destination storage device,

wherein the data processing device is coupled to the processing circuit array and the destination storage device.