IP Library › Granted Patent US 12,488,220
Granted Patent B2
US 12,488,220 · App. 17/286,545 · Granted Dec 2, 2025

Data processing method and device, and computer-readable storage medium

Inventors: Jinqing Yu (Shenzhen, CN); Minchao Liang (Shenzhen, CN); Shengnan Yan (Shenzhen, CN); Jie Liu (Shenzhen, CN)
Assignee: ZTE CORPORATION
G06N3/045G06F18/2137G06F18/217G06F18/24765G06N3/04G06N3/063G06N3/08
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 12,488,220
App. No.
17/286,545
Granted
Dec 2, 2025
Kind
B2
Abstract

Provided are a data processing method and device, and a computer-readable storage medium. The data processing method includes: acquiring at least one type of weights and feature data corresponding to each type of the weights; acquiring, according to the at least one type of weights, a classification feature corresponding to each type of the weights; performing calculation according to the at least one type of weights and the feature data corresponding to each type of the weights to obtain a first processing result corresponding to each type of the weights; and performing calculation according to the classification feature and the first processing result corresponding to each type of the weights corresponding to each type of the weights to obtain a second processing result.

Claims (89)

1 . A data processing method applied in a convolutional neural network, comprising performing convolution calculation on feature data and weights corresponding to respective feature data by the following operations performed by a data processing device comprising a calculation unit that comprises a plurality of classification processor (CP) calculation units and a multiply-add unit (MAU):

classifying, by the plurality of CP calculation units, the weights into at least one type of weights and acquiring, by the plurality of CP calculation units, the feature data corresponding to each type of the weights, wherein the weights are classified according to a set classification rule comprising one of:

weights, of which values are positive numbers and negative numbers having a same absolute value, are classified into one type, and then the weights of various types are further classified by converting the weights in a manner of multiplying a common factor by a power of 2 and classifying weights having the same common factor into one type;

weights of which values are positive numbers are classified into one type and weights of which values are negative numbers are classified into another type, and then the weights of various types are further classified by converting the weights in a manner of multiplying a common factor by a power of 2 and classifying weights having the same common factor into one type; or,

the weights are directly classified by converting the weights in a manner of multiplying a common factor by a power of 2 and classifying weights having the same common factor into one type;

acquiring, by the plurality of CP calculation units, the common factor corresponding to each type of the weights;

acquiring, by the plurality of CP calculation units according to the at least one type of weights and the common factor corresponding to each type of the weights, classification data corresponding to the feature data; and performing, by the plurality of CP calculation units, a left shift calculation on the respective feature data corresponding to each type of the weights according to the classification data corresponding to the respective feature data, and summing, by the plurality of CP calculation units, results of the left shift calculation to obtain a first processing result corresponding to each type of the weights, wherein the classification data is exponent in the power of 2; and performing, by the MAU comprising one multiplier and an accumulator,

multiply-add calculation according to the common factor and the first processing result corresponding to each type of the weights to obtain a second processing result,

wherein before performing, by the MAU comprising one multiplier and the accumulator, the multiply-add calculation according to the common factor and the first processing result corresponding to each type of the weights to obtain the second processing result, the method further comprises:

implementing a routing function from the plurality of CP calculation units to the multiplier through a multiplier queue.

2 . The data processing method according to claim 1 , wherein before classifying, by the plurality of CP calculation units, the weights into the at least one type of weights, the data processing method further comprises the following operations performed by the data processing device:

acquiring historical weights;

screening the historical weights according to a set screening condition to obtain screened weights; and

classifying the screened weights according to a set classification rule to obtain the at least one type of weights.

3 . The data processing method according to claim 2 , wherein performing, by the MAU comprising one multiplier and the accumulator, the multiply-add calculation according to the common factor and the first processing result corresponding to each type of the weights to obtain the second processing result comprises the following operations performed by the MAU:

sorting first processing results corresponding to respective types of weights according to a set sorting rule to obtain sorted first processing results;

according to a sorting order, sequentially selecting from the sorted first processing results a first processing result to be processed;

performing calculation according to the common factor and the first processing result to be processed to obtain a first calculation result;

performing calculation on the currently obtained first calculation result and a previously obtained first calculation result to obtain a second calculation result; and

determining, in a case where it is determined that the second calculation result is a negative number, the second calculation result as the second processing result.

4 . The data processing method according to claim 1 , wherein after performing, by the MAU comprising one multiplier and the accumulator, the multiply-add calculation according to the common factor and the first processing result corresponding to each type of the weights to obtain the second processing result, the data processing method further comprises the following operations performed by the calculation unit:

acquiring a first dimension of the feature data and a corresponding network dimension;

acquiring a second dimension of the second processing result;

adjusting, in a case where it is determined that the second dimension is lower than the first dimension, a current network dimension corresponding to the second processing result according to the acquired network dimension and a predetermined threshold range;

acquiring a weight corresponding to the second processing result; and

performing calculation on the second processing result based on the current network dimension and the weight corresponding to the second processing result to obtain a third processing result.

5 . The data processing method according to claim 4 , wherein adjusting, in a case where it is determined that the second dimension is lower than the first dimension, the current network dimension corresponding to the second processing result according to the acquired network dimension and the predetermined threshold range comprises the following operations:

performing, in a case where it is determined that the second dimension is lower than the first dimension, a modulus operation on the network dimension and a target network dimension for adjustment to obtain a modulus result;

calculating a ratio according to the modulus result and the target network dimension for adjustment; and

determining, in a case where the ratio is within a predetermined threshold range, the target network dimension for adjustment as the current network dimension corresponding to the second processing result.

6 . A data processing device applied in a convolutional neural network, comprising a calculation unit that comprises a plurality of classification processor (CP) calculation units and a multiply-add unit (MAU) and is configured to perform convolution calculation on feature data and weights corresponding to respective feature data, wherein:

the plurality of CP calculation units are configured to classify the weights into at least one type of weights and acquire the feature data corresponding to each type of the weights, wherein the weights are classified according to a set classification rule comprising one of:

weights, of which values are positive numbers and negative numbers having a same absolute value, are classified into one type, and then the weights of various types are further classified by converting the weights in a manner of multiplying a common factor by a power of 2 and classifying weights having the same common factor into one type;

weights of which values are positive numbers are classified into one type and weights of which values are negative numbers are classified into another type, and then the weights of various types are further classified by converting the weights in a manner of multiplying a common factor by a power of 2 and classifying weights having the same common factor into one type; or,

the weights are directly classified by converting the weights in a manner of multiplying a common factor by a power of 2 and classifying weights having the same common factor into one type;

the plurality of CP calculation units are configured to acquire the common factor corresponding to each type of the weights;

the plurality of CP calculation units are configured to acquire, according to the at least one type of weights and the common factor corresponding to each type of the weights, classification data corresponding to the feature data; and perform a left shift calculation on the respective feature data corresponding to each type of the weights according to the classification data corresponding to the respective feature data, and sum results of the left shift calculation to obtain a first processing result corresponding to each type of the weights, wherein the classification data is exponent in the power of 2;

a multiplier queue is provided to implement a routing function from the plurality of CP calculation units to the multiplier; and

the MAU comprising one multiplier and an accumulator is configured to perform multiply-add calculation according to the common factor and the first processing result corresponding to each type of the weights to obtain a second processing result.

7 . A non-transitory computer-readable storage medium applied in a convolutional neural network, on which a computer program is stored, wherein the computer program, when being executed by a data processing device comprising a calculation unit that comprises a plurality of classification processor (CP) calculation units and a multiply-add unit (MAU), causes the calculation unit to perform convolution calculation on feature data and weights corresponding to respective feature data by the following operations:

classifying, by the plurality of CP calculation units, the weights into at least one type of weights and acquiring, by the plurality of CP calculation units, the feature data corresponding to each type of the weights, wherein the weights are classified according to a set classification rule comprising one of:

weights, of which values are positive numbers and negative numbers having a same absolute value, are classified into one type, and then the weights of various types are further classified by converting the weights in a manner of multiplying a common factor by a power of 2 and classifying weights having the same common factor into one type;

weights of which values are positive numbers are classified into one type and weights of which values are negative numbers are classified into another type, and then the weights of various types are further classified by converting the weights in a manner of multiplying a common factor by a power of 2 and classifying weights having the same common factor into one type; or,

the weights are directly classified by converting the weights in a manner of multiplying a common factor by a power of 2 and classifying weights having the same common factor into one type;

acquiring, by the plurality of CP calculation units, the common factor corresponding to each type of the weights;

acquiring, by the plurality of CP calculation units according to the at least one type of weights and the common factor corresponding to each type of the weights, classification data corresponding to the feature data; and performing, by the plurality of CP calculation units, a left shift calculation on the respective feature data corresponding to each type of the weights according to the classification data corresponding to the respective feature data, and summing, by the plurality of CP calculation units, results of the left shift calculation to obtain a first processing result corresponding to each type of the weights, wherein the classification data is exponent in the power of 2; and

performing, by the MAU comprising one multiplier and an accumulator, multiply-add calculation according to the common factor and the first processing result corresponding to each type of the weights to obtain a second processing result,

wherein before performing, by the MAU comprising one multiplier and the accumulator, the multiply-add calculation according to the common factor and the first processing result corresponding to each type of the weights to obtain the second processing result, the data processing device is further caused to perform the following operations:

implementing a routing function from the plurality of CP calculation units to the multiplier through a multiplier queue.

8 . The data processing device according to claim 6 , wherein the data processing device is further configured to perform the following operations before classifying, by the plurality of CP calculation units, the weights into the at least one type of weights:

acquiring historical weights;

screening the historical weights according to a set screening condition to obtain screened weights; and

classifying the screened weights according to a set classification rule to obtain the at least one type of weights.

9 . The data processing device according to claim 8 , wherein the MAU, when performing the multiply-add calculation according to the common factor and the first processing result corresponding to each type of the weights to obtain the second processing result, is configured to perform the following operations:

sorting first processing results corresponding to respective types of weights according to a set sorting rule to obtain sorted first processing results;

according to a sorting order, sequentially selecting from the sorted first processing results a first processing result to be processed;

performing calculation according to the common factor and the first processing result to be processed to obtain a first calculation result;

performing calculation on the currently obtained first calculation result and a previously obtained first calculation result to obtain a second calculation result; and

determining, in a case where it is determined that the second calculation result is a negative number, the second calculation result as the second processing result.

10 . The data processing device according to claim 6 , wherein the calculation unit is further configured to, after performing, by the MAU comprising one multiplier and the accumulator, the multiply-add calculation according to the common factor and the first processing result corresponding to each type of the weights to obtain the second processing result, execute the following operations:

acquiring a first dimension of the feature data and a corresponding network dimension;

acquiring a second dimension of the second processing result;

adjusting, in a case where it is determined that the second dimension is lower than the first dimension, a current network dimension corresponding to the second processing result according to the acquired network dimension and a predetermined threshold range;

acquiring a weight corresponding to the second processing result; and

performing calculation on the second processing result based on the current network dimension and the weight corresponding to the second processing result to obtain a third processing result.

11 . The data processing device according to claim 10 , wherein adjusting, in a case where it is determined that the second dimension is lower than the first dimension, the current network dimension corresponding to the second processing result according to the acquired network dimension and the predetermined threshold range comprises the following operations:

performing, in a case where it is determined that the second dimension is lower than the first dimension, a modulus operation on the network dimension and a target network dimension for adjustment to obtain a modulus result;

calculating a ratio according to the modulus result and the target network dimension for adjustment; and

determining, in a case where the ratio is within a predetermined threshold range, the target network dimension for adjustment as the current network dimension corresponding to the second processing result.

12 . The non-transitory computer-readable storage medium according to claim 7 , wherein the computer program, when being executed by the data processing device, further causes the data processing device to:

acquire historical weights;

screen the historical weights according to a set screening condition to obtain screened weights; and

classify the screened weights according to a set classification rule to obtain the at least one type of weights.

13 . The non-transitory computer-readable storage medium according to claim 12 , wherein the computer program, when being executed by the MAU, causes the MAU to:

sort first processing results corresponding to respective types of weights according to a set sorting rule to obtain sorted first processing results;

according to a sorting order, sequentially select from the sorted first processing results a first processing result to be processed;

perform calculation according to the common factor and the first processing result to be processed to obtain a first calculation result;

perform calculation on the currently obtained first calculation result and a previously obtained first calculation result to obtain a second calculation result; and

determine, in a case where it is determined that the second calculation result is a negative number, the second calculation result as the second processing result.

14 . The non-transitory computer-readable storage medium according to claim 7 , wherein the computer program, when being executed by the calculation unit, further causes the calculation unit to:

acquire a first dimension of the feature data and a corresponding network dimension;

acquire a second dimension of the second processing result;

adjust, in a case where it is determined that the second dimension is lower than the first dimension, a current network dimension corresponding to the second processing result according to the acquired network dimension and a predetermined threshold range;

acquire a weight corresponding to the second processing result; and

perform calculation on the second processing result based on the current network dimension and the weight corresponding to the second processing result to obtain a third processing result.

15 . The non-transitory computer-readable storage medium according to claim 14 , wherein the computer program, when being executed by the calculation unit, causes the calculation unit to:

perform, in a case where it is determined that the second dimension is lower than the first dimension, a modulus operation on the network dimension and a target network dimension for adjustment to obtain a modulus result;

calculate a ratio according to the modulus result and the target network dimension for adjustment; and

determine, in a case where the ratio is within a predetermined threshold range, the target network dimension for adjustment as the current network dimension corresponding to the second processing result.

Assignments (2)
CORRECTIVE ASSIGNMENT TO CORRECT THE CONVEYING PARTY DATA TO CORRECT FOURTH INVENTORS FIRST NAME FROM JINGING YU TO JINQING YU. PREVIOUSLY RECORDED ON REEL 55956 FRAME 354. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT.. Recorded Aug 13, 2025
From: YAN, SHENGNAN; LIU, JIE; LIANG, MINCHAO; YU, JINQING
To: ZTE CORPORATION
Reel/Frame 072415/0282 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 19, 2021
From: YAN, SHENGNAN; LIU, JIE; LIANG, MINCHAO; YU, JINGING
To: ZTE CORPORATION
Reel/Frame 055956/0354 →
Priority Claims (1)
CN 201811223953.9 · Oct 19, 2018 · national
Continuity (1)
Related Publication 20210390398A1 · Dec 16, 2021
References Cited (21)
US 10678894B2 · Yin · 2020 [cited by examiner]
US 20090177450A1 · Gray · 2009 [cited by examiner]
US 20170039470A1 · Hirayama · 2017 [cited by applicant]
CN 106214123A · 2016 [cited by applicant]
CN 106529670A · 2017 [cited by applicant]
CN 106651001A · 2017 [cited by applicant]
CN 107563279A · 2018 [cited by applicant]
CN 107633295A · 2018 [cited by applicant]
CN 107895190A · 2018 [cited by applicant]
CN 108288093A · 2018 [cited by applicant]
CN 108304928A · 2018 [cited by applicant]
JP H0451386A · 1992 [cited by applicant]
JP 2001175636A · 2001 [cited by applicant]
JP 2015501039A · 2015 [cited by applicant]
Amiri, et al., “Multi-Precision Convolution Neural Networks on Heterogeneous Hardware”, 2018 Date, 2018 (Year: 2018). [cited by examiner]
International Search Report for corresponding application PCT/CN2019/108580 filed Sep. 27, 2019; Mail date Dec. 27, 2019. [cited by applicant]
Takahiro Utsunomiya, “CNN implementation of FPGA with Power of 2 Approximation of Weight”, The institute of Electronics, 2017. [cited by applicant]
Wang Hui, et al. “Selection of Multi-Indicator Comprehensive Evaluation Method and Weight Coefficients”, Journal of Guangdong College of Pharmacy, vol. 23 No. 5, Oct. 2007. [cited by applicant]
Cheung C., “Magnified Gradient Function with Determistic Weight Modification in Adaptive Learning”, IEE Transactions on Networks, IEE Service Center, Piscataway NJ, vol. 15, No. 6, Nov. 1, 2004, pp. 1411-1423, XP0111215… [cited by applicant]
European Search Report for corresponding EP19873082; Mail date May 13, 2022. [cited by applicant]
Naotake Kamiura, “An Improvement in Weight-Fault Tolerence of Feedforward Neural Networks”, Aisian Test Symposium, Proccedings 10th Kyoto, Japan 19-21m Nov. 19, 2001, XP0110583639. [cited by applicant]