Data processing method, apparatus, device, and medium
By determining the target shift number for data fixed-point conversion, the error problem of converting floating-point numbers to fixed-point numbers in the Mini LED direct-view display ghosting elimination algorithm of FPGA chip is solved, thus improving the ghosting elimination effect.
Patent Information
- Application Number
- CN202211215439.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-30
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2042-09-30
AI Technical Summary
The inability of FPGA chips to perform floating-point operations leads to errors when converting floating-point numbers to fixed-point numbers in the Mini LED direct-view display ghosting elimination algorithm, affecting the ghosting elimination effect.
By determining the residual data statistics of the image matrix under different alternative shift positions, a target shift position that meets the set conditions is selected for data localization to reduce errors.
It improves the effect of eliminating afterimages in Mini LED direct-view displays and reduces errors in the localization process.
Smart Images

Figure CN115526800B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and in particular, to a data processing method, device, equipment and medium. BACKGROUND
[0002] Mini Light Emitting Diode (Mini LED) direct display screens, as a new display technology that can effectively improve pixel density and display effect, have a growing demand in the market. However, the Mini LED direct display screen will appear a "ghosting" phenomenon when displaying the same pattern for a long time. In order to eliminate the "ghosting", a ghosting elimination algorithm needs to be customized in advance, so that the customized ghosting elimination algorithm can be executed by a Field-Programmable Gate Array (FPGA) chip to eliminate the ghosting displayed by the Mini LED direct display screen.
[0003] However, due to some technical limitations of the FPGA chip itself, the FPGA chip cannot perform floating-point operations, and the ghosting elimination algorithm generally involves floating-point operations. Therefore, when the FPGA chip executes the ghosting elimination algorithm, the floating-point numbers involved in the execution process of the algorithm need to be converted into fixed-point numbers, so that the execution of the ghosting elimination algorithm can be realized by the FPGA chip.
[0004] In related technologies, when converting floating-point numbers into fixed-point numbers, the mainstream method is to expand the floating-point numbers into larger floating-point numbers by using a shift method, and then round or truncate the expanded floating-point numbers to realize the conversion of floating-point numbers into fixed-point numbers.
[0005] In the above implementation process, since rounding or truncation is performed in the process of converting floating-point numbers into fixed-point numbers, an error will exist between the calculation result after fixed-point conversion and the floating-point algorithm calculation result, and the size of the error will ultimately affect the ghosting elimination effect. Therefore, there is an urgent need for a data processing method for determining the shift bit number used in the data fixed-point conversion process to reduce the error formed in the fixed-point conversion process and thus improve the ghosting elimination effect. SUMMARY
[0006] The present application provides a data processing method, device, equipment and medium to solve the problems in related technologies.
[0007] According to a first aspect of an embodiment of the present application, a data processing method is provided, which includes:
[0008] Determine statistical data of residual data corresponding to each image matrix in the image data set under different candidate shift bit numbers based on the image matrix corresponding to each image in the image data set, the shift bit number being a quantization bit number, the residual data being determined based on a first matrix obtained by performing shift processing on the image matrix and a second matrix obtained by performing truncation processing on the first matrix;
[0009] Determine the candidate shift bit number corresponding to the statistical data satisfying the set condition as the target shift bit number used when performing data fixed-pointing.
[0010] In some embodiments, determining statistical data of residual data corresponding to each image matrix in the image data set under different candidate shift bit numbers based on the image matrix corresponding to each image in the image data set comprises:
[0011] For any candidate shift bit number, substitute the image matrix corresponding to each image in the image data set into the first relationship data respectively to obtain residual data corresponding to each image matrix, the first relationship data being used to indicate a difference between a first matrix obtained by performing shift processing on the image matrix and a second matrix obtained by performing truncation processing on the first matrix;
[0012] Determine the average and variance of the plurality of residual data based on the plurality of residual data corresponding to the plurality of image matrices respectively;
[0013] Determine the sum of the average and variance of the plurality of residual data as the statistical data of the residual data corresponding to the plurality of image matrices.
[0014] In some embodiments, the method further comprises:
[0015] For any image, expand each element in the image matrix corresponding to the image by a target multiple to implement shift processing on the image matrix to obtain a first matrix corresponding to the image matrix, the target multiple being an exponential power of 2, the power being the candidate shift bit number;
[0016] Discard the decimal part of each element in the first matrix obtained by the shift processing to implement truncation processing on the first matrix to obtain a second matrix corresponding to the image matrix.
[0017] In some embodiments, the set condition is that the target shift bit number corresponds to the minimum value of the statistical data when the number of image matrices satisfying the conditions that the first truncation data is equal to the second truncation data and both the first truncation data and the second truncation data are greater than the candidate shift bit number is greater than a set number threshold;
[0018] The first truncated data is obtained by truncating a product of the image matrix and the preset maximum allowed shift bit number, and the second truncated data is obtained by truncating a product of the image matrix obtained after the shift processing and the preset maximum allowed shift bit number.
[0019] In some embodiments, the alternative shift bit numbers are between the preset minimum allowed shift bit number and the maximum allowed shift bit number.
[0020] The method comprises:
[0021] The traversal starts from the minimum allowed shift bit number, and when the current alternative shift bit number meets the condition that the first truncated data is equal to the second truncated data and the number of image matrices whose first truncated data and second truncated data are greater than the alternative shift bit number is greater than the set number threshold, the value of the statistical data at the current alternative shift bit number is recorded.
[0022] In the case where the maximum allowed shift bit number is traversed, the alternative shift bit number corresponding to the statistical data with the minimum value in the recorded statistical data is determined as the target shift bit number.
[0023] In some embodiments, for any image in the image data set, the image matrix corresponding to the image comprises a first image matrix for representing the image and / or a second image matrix obtained by processing the first image matrix.
[0024] In some embodiments, the method further comprises:
[0025] For the scalar data involved in the image processing process of the image in the image data set, based on the data bit number of the scalar data and the preset fixed-point bit number, the maximum allowed shift bit number is determined, wherein the shift bit number value not exceeding the maximum allowed shift bit number is taken as an alternative shift bit number.
[0026] The fixed-point values obtained by performing fixed-point processing on the scalar data based on each alternative shift bit number are determined, to obtain a plurality of fixed-point values.
[0027] The alternative shift bit number corresponding to the fixed-point value with the minimum decimal part value in the plurality of fixed-point values is determined as the target shift bit number.
[0028] According to a second aspect of the embodiments of the present application, a data processing device is provided, which comprises:
[0029] The first determining module is configured to determine statistical data of residual data corresponding to each image matrix in different candidate shift bit numbers based on the image matrix corresponding to each image in the image data set, wherein the shift bit number is a quantization bit number, and the residual data is determined based on a first matrix obtained by performing shift processing on the image matrix and a second matrix obtained by performing truncation processing on the first matrix.
[0030] The second determining module is configured to determine the candidate shift bit number corresponding to the statistical data satisfying the set condition as a target shift bit number used when performing data fixed-pointing.
[0031] In some embodiments, when the first determining module is used to determine statistical data of residual data corresponding to each image matrix in different candidate shift bit numbers based on the image matrix corresponding to each image in the image data set, the first determining module is configured to:
[0032] For any candidate shift bit number, the image matrix corresponding to each image in the image data set is substituted into the first relationship data respectively to obtain residual data corresponding to each image matrix, and the first relationship data is used to indicate a difference between a first matrix obtained by performing shift processing on the image matrix and a second matrix obtained by performing truncation processing on the first matrix.
[0033] Based on the residual data corresponding to the plurality of image matrices respectively, an average value and a variance of the plurality of residual data are determined.
[0034] A sum of the average value and the variance of the plurality of residual data is determined as the statistical data of the residual data corresponding to the plurality of image matrices.
[0035] In some embodiments, the apparatus further comprises:
[0036] The shift processing module is configured to, for any image, expand each element in the image matrix corresponding to the image by a target multiple to achieve shift processing on the image matrix, to obtain a first matrix corresponding to the image matrix, wherein the target multiple is an exponential power of 2, and the power is the candidate shift bit number.
[0037] The truncation processing module is configured to discard a decimal part of each element in the first matrix obtained by the shift processing to achieve truncation processing on the first matrix, to obtain a second matrix corresponding to the image matrix.
[0038] In some embodiments, the set condition is that the target shift bit number corresponds to the minimum value of the statistical data when the number of image matrices satisfying that the first truncation data is equal to the second truncation data and both the first truncation data and the second truncation data are greater than the candidate shift bit number is greater than a set number threshold.
[0039] The first truncated data is obtained by truncating a product of the image matrix and a preset maximum allowed shift bit number, and the second truncated data is obtained by truncating a product of the image matrix after the shift processing and the preset maximum allowed shift bit number.
[0040] In some embodiments, the alternative shift bit numbers are between the preset minimum allowed shift bit number and the maximum allowed shift bit number.
[0041] The apparatus further includes:
[0042] The recording module is configured to record a value of the statistical data at the current alternative shift bit number when the current alternative shift bit number meets the condition that the first truncated data is equal to the second truncated data and the number of image matrices whose first truncated data and second truncated data are greater than the alternative shift bit number is greater than the preset number threshold, starting from the minimum allowed shift bit number.
[0043] The second determining module is further configured to determine the alternative shift bit number corresponding to the statistical data with the minimum value in the recorded statistical data as the target shift bit number when the maximum allowed shift bit number is traversed.
[0044] In some embodiments, for any image in the image data set, the image matrix corresponding to the image includes a first image matrix used to represent the image and / or a second image matrix obtained by processing the first image matrix.
[0045] In some embodiments, the second determining module is further configured to determine the maximum allowed shift bit number based on the data bit number of the scalar data and the preset fixed-point bit number, for the scalar data involved in the image processing process of the image in the image data set, and the shift bit number not exceeding the maximum allowed shift bit number is taken as the alternative shift bit number.
[0046] The second determining module is further configured to determine fixed-point values obtained by performing fixed-point processing on the scalar data based on each alternative shift bit number, to obtain a plurality of fixed-point values.
[0047] The second determining module is further configured to determine the alternative shift bit number corresponding to the fixed-point value with the minimum decimal part value in the plurality of fixed-point values as the target shift bit number.
[0048] According to a third aspect of an embodiment of the present application, a computing device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements operations performed by the data processing method provided by the first aspect and any one of the embodiments of the first aspect when executing the computer program.
[0049] According to a fourth aspect of the embodiments of the present application, a computer readable storage medium is provided, and the computer readable storage medium stores a program. The program is executed by a processor to perform operations of the data processing method provided by the first aspect and any one of the embodiments of the first aspect.
[0050] According to a fifth aspect of the embodiments of the present application, a computer program product is provided, and the computer program product comprises a computer program. The computer program is executed by a processor to perform operations of the data processing method provided by the first aspect and any one of the embodiments of the first aspect.
[0051] According to the above embodiments, the statistical data of the residual data corresponding to each image matrix under different candidate shift bit numbers is determined based on the image matrix corresponding to each image in the image data set, and the candidate shift bit number corresponding to the statistical data satisfying the set condition is determined as the target shift bit number used when performing data quantization. Through the above process, the target shift bit number can be determined based on the statistical data of the residual data corresponding to multiple image matrices under different candidate shift bit numbers, so that the residual data corresponding to multiple image matrices under the target shift bit number satisfies the set condition, thereby reducing the error when performing data quantization based on the target shift bit number, and the effect of residual image elimination can be improved.
[0052] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS
[0053] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the application.
[0054] Figure 1 is a flowchart of a data processing method according to an exemplary embodiment of the present application;
[0055] Figure 2 is a flowchart of a target shift bit number determination process according to an exemplary embodiment of the present application;
[0056] Figure 3 is a block diagram of a data processing device according to an exemplary embodiment of the present application;
[0057] Figure 4 is a structural schematic diagram of a computing device according to an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0058] The exemplary embodiments will be described in detail herein with reference to the attached drawings. In the following description, like reference numerals refer to like elements unless indicated otherwise. The following exemplary embodiments described herein represent the best known ways of practicing the application. However, the application can be practiced in many ways and is not limited to the embodiments described herein.
[0059] In the related art, the FPGA chip is a general integrated circuit chip that can realize the function of any circuit through field programming, without setting a specific function for the FPGA chip at the time of factory shipment. Instead, the FPGA chip is programmed on site through FPGA-specific electronic design automation (EDA) software to realize the specific function required by the user. Moreover, the FPGA chip can perform real-time pipeline operation to enable the data processing process to achieve high real-time performance.
[0060] Based on the above characteristics of the FPGA chip, in combination with the fact that the residual image elimination algorithm belongs to a highly customized algorithm and the Mini LED direct display screen has a huge amount of display data and requires extremely fast processing speed, it is more appropriate to use the FPGA chip to customize the residual image elimination algorithm.
[0061] However, due to some settings of the FPGA chip in terms of hardware itself and operation mode, the registers of the FPGA chip can only represent unsigned integers, and cannot represent decimals. Therefore, when the calculation result requires high accuracy, some fixed-point processing needs to be performed to convert the floating-point number into a fixed-point number before calculation.
[0062] When the FPGA chip is used to eliminate the residual image displayed on the Mini LED direct display screen, an algorithm personnel needs to write a floating-point number algorithm for residual image elimination, and then convert the floating-point number algorithm into a fixed-point number algorithm, so as to transplant the fixed-point number algorithm into the FPGA chip to realize customization of the residual image elimination algorithm through the FPGA chip. When converting the floating-point number algorithm into the fixed-point number algorithm, the shift bit number used for data fixed-point processing needs to be determined, so as to realize fixed-point processing of the floating-point number data based on the shift bit number.
[0063] For ease of understanding, some knowledge about conversion of floating-point numbers into fixed-point numbers will be introduced first.
[0064] The fixed-point number is a data with a fixed decimal point position, and the floating-point number is a data with an uncertain decimal point position. For example, for the two multiplication operations of 1.35*2.7=3.645 and 1.35*20=27, the decimal point position is uncertain after calculation, and therefore the two multiplication operations belong to floating-point number operations.
[0065] In the related art, when converting floating-point number operation to fixed-point number operation, it is often necessary to pass through the two processes of fixed-point conversion and fixed-point number calculation. Taking the floating-point number operation of 2.918*3.1415926=9.1671672068 as an example, the conversion of the floating-point number operation to the fixed-point number operation can be realized through the following processes:
[0066] (1) Fixed-point conversion
[0067] 2.918*2 12 =11952.168=11952;
[0068] 3.1415926*2 12 =12867.8632896=12868;
[0069] wherein 12 is the shift bit number.
[0070] (2) Fixed-point number calculation (fixed-point number multiplication in this example)
[0071] 11952*12868=153798336.
[0072] Through the above processes, the floating-point number operation is converted to the fixed-point number operation. In addition, the result of the fixed-point number operation can also be restored to the floating-point number based on the shift bit number. Taking the floating-point number operation of 2.918*3.1415926=9.1671672068 as an example, the result obtained by converting to fixed-point number calculation is 153798336, and the result can be converted back to the floating-point number by 153798336 / 2 24 =9.167095184326171875, and the difference between the converted floating-point number and the calculation result obtained by directly performing floating-point number operation (i.e. quantization error) is very small.
[0073] However, the quantization error caused by the different positions of the decimal point is different. The more the decimal places, the smaller the quantization error, and correspondingly, the higher the quantization accuracy.
[0074] The present application provides a data processing method for providing a data fixed-pointing scheme with constraints to determine the target shift bit number based on the images in the image data set and the pre-written residual image elimination algorithm, so that the subsequent process of executing the residual image elimination algorithm through the FPGA chip can all use the target shift bit number to realize the conversion between the floating-point number and the fixed-point number.
[0075] The above is merely an illustrative description of the application scenario of the present invention and does not constitute a limitation on the application scenario of the present invention. In more possible implementations, the data processing method provided by the present invention can also be applied to other processes involving the conversion between floating-point numbers and fixed-point numbers. The present invention does not limit the specific application scenario of the data processing method.
[0076] The above data processing method can be executed by a computing device, which can be a terminal device, such as a desktop computer, portable computer, laptop computer, smartphone, tablet computer, smartwatch, etc. Alternatively, the computing device can be a server, such as a single server, multiple servers, server cluster, cloud computing platform, etc. The present invention does not limit the type of computing device.
[0077] After introducing the application scenarios and implementation environment of the present invention, the data processing method provided by the present invention will be described in detail below.
[0078] See Figure 1 , Figure 1 This is a flowchart illustrating a data processing method according to an exemplary embodiment of the present invention, such as... Figure 1 As shown, the method includes:
[0079] Step 101: Based on the image matrix corresponding to each image in the image dataset, determine the statistical data of the residual data corresponding to each image matrix under different alternative shift bits. The shift bit is the number of quantization bits. The residual data is determined based on the first matrix obtained by shifting the image matrix and the second matrix obtained by truncating the first matrix.
[0080] It should be noted that the image dataset can be the CIFAR-10 dataset, MNIST dataset, Imagenet dataset, NLPR-LSCGB dataset, etc., or the image dataset can be a dataset constructed based on images collected by relevant technical personnel. This invention does not limit the specific type of image dataset or the number of images included in the image dataset.
[0081] The shift bits can be the number of quantization bits used when converting data to fixed-point, or, in other words, the shift bits can be a power of 2 used for fixed-point conversion. For example, to convert the floating-point number 2.918 to fixed-point, 2.918 * 2... 12 =11952.168=11952, where 12 is the number of shifts.
[0082] The alternative shift bit number can be set by a person skilled in the art according to actual technical requirements. For example, a person skilled in the art can set a minimum allowable shift bit number and a maximum allowable shift bit number, and then the positive integer greater than or equal to the minimum allowable shift bit number and less than or equal to the maximum allowable shift bit number is the alternative shift bit number.
[0083] It should be noted that when determining the maximum allowable shift bit number, some general strategies can be used for implementation. For example, the maximum allowable shift bit number can be determined by the following strategy for determining the fixed-point maximum bit number:
[0084] For the fixed-point processing of the image matrix, the element value (pixel value of the pixel point) in the image matrix is at most 255, and the maximum integer bit occupied by the element value is 8 bits. However, in the image processing process, after various multiplication and addition operations, the floating-point number representation bit number can be 32 bits, 64 bits or even higher. Therefore, when performing the fixed-point operation on the image data in the processing process, the bit number of the fixed-point number can theoretically be infinite.
[0085] For the image matrix to be quantized, the more the bit number of left shift during the fixed-point operation, the larger the value after the fixed-point operation, and the more accurate the final calculation result. However, the fixed-point operation cannot increase the bit number of the data unlimitedly. On the one hand, the more the bit number of the data, the more resources required for storage and calculation, and the slower the hardware processing speed. On the other hand, it is unnecessary to have a too large fixed-point number. Because in the image processing process, the maximum range of the image gray value for calculation is 0-255, and even if the result of the calculation on the image is accurate to many decimal places, it will be discarded in the end, so it is unnecessary to have a too large fixed-point number.
[0086] In actual application, the FPGA determines a maximum data bit number according to different actual projects. During data storage and processing, the data cannot exceed the maximum bit number, otherwise overflow will occur.
[0087] In the case where a plurality of alternative shift bit numbers are set, the statistical data of the residual data corresponding to a plurality of image matrices under each alternative shift bit number can be determined, so that based on the determined statistical data, the alternative shift bit number corresponding to the statistical data satisfying the set condition can be determined, so that when the data is fixed-point processed by using the alternative shift bit number corresponding to the statistical data satisfying the set condition, the fixed-point error can be reduced.
[0088] Step 102: determining the alternative shift bit number corresponding to the statistical data satisfying the set condition as the target shift bit number used when performing data fixed-point operation.
[0089] By the scheme provided in the application, the determination of the target shift bit number can be realized based on the statistical data of the residual error data corresponding to the plurality of image matrices under different alternative shift bit numbers, so that the residual error data corresponding to the plurality of image matrices under the target shift bit number satisfies the set condition, thereby reducing the error when the data is fixed-point processed based on the target shift bit number, and the residual image elimination effect close to the floating-point number algorithm can be realized.
[0090] After introducing the basic implementation process of the data processing method of the application, the various optional embodiments of the application will be introduced.
[0091] In some embodiments, for step 101, when determining the statistical data of the residual error data corresponding to the plurality of image matrices under different alternative shift bit numbers based on the image matrices corresponding to the plurality of images in the image data set, the following steps can be implemented:
[0092] Step 1011, for any alternative shift bit number, the image matrices corresponding to the plurality of images in the image data set are respectively substituted into the first relationship data to obtain the residual error data corresponding to each image matrix, and the first relationship data is used to indicate the difference between the first matrix obtained by performing shift processing on the image matrix and the second matrix obtained by performing truncation processing on the first matrix.
[0093] It should be noted that for any image in the image data set, the image matrix corresponding to the image can include a first image matrix for representing the image and / or a second image matrix obtained by processing the first image matrix.
[0094] Taking the residual image elimination process as an example, for any image in the image data set, the image can be represented in the form of a matrix (denoted as a first image matrix) to convert the image into a data form that can be recognized by a computing device, and the computing device can process the image by executing a residual image elimination algorithm to eliminate the residual image of the Mini LED direct display screen. During the processing of the image, convolution processing, arithmetic processing and other calculation processes of the first image matrix can be involved, and at least one second image matrix different from the first image matrix can be obtained through these processes, and these second image matrices can also be used as the image matrix corresponding to the image in the image data set.
[0095] It should be noted that the first relationship data can be represented by the following formula (1):
[0096] sub(X)=X*2 N -trunc(X*2 N ) (1)
[0097] wherein, sub(X) represents the residual data, X represents the image matrix, N represents the candidate shift bit number, and trunc represents the decimal value discard (i.e. the truncation processing) of the data.
[0098] It should be noted that the image matrix X can be any high-dimensional vector, matrix data, and for an image, the dimension of the corresponding image matrix is generally HxWxC, wherein H represents the image height, W represents the image width, and C represents the image channel number (generally 3).
[0099] wherein, X*2 N represents the shift processing of the image matrix, i.e. for any image, each element in the image matrix corresponding to the image is expanded by a target multiple to achieve the shift processing of the image matrix, to obtain a first matrix corresponding to the image matrix. trunc(X*2 N ) represents the truncation processing of the first matrix, i.e. for any image, the decimal part of each element in the first matrix obtained by the shift processing is discarded to achieve the truncation processing of the first matrix, to obtain a second matrix corresponding to the image matrix. Optionally, the target multiple can be an exponential power of 2, and the power can be the candidate shift bit number.
[0100] Optionally, after determining the plurality of candidate shift bit numbers, each candidate shift bit number can be substituted into the above formula (1) to obtain the first relationship data for determining the residual data under different candidate shift bit numbers, so that the determination of the residual data can be realized through the first relationship data.
[0101] For the first relationship data for determining the residual data under any candidate shift bit number, when the residual data is determined through the first relationship data, at least one image matrix corresponding to each image in the image data set can be substituted into the first relationship data respectively to obtain the residual data corresponding to each image matrix.
[0102] Step 1012, determining the mean and variance of the plurality of residual data based on the residual data corresponding to the plurality of image matrices respectively.
[0103] In one possible implementation, the average operation can be performed on the residual data corresponding to the plurality of image matrices respectively to obtain the mean of the plurality of residual data, so as to determine the variance of the plurality of residual data based on the residual data corresponding to each image matrix and the determined mean.
[0104] Step 1013, determining the sum of the mean and variance of the plurality of residual data as the statistical data of the residual data corresponding to the plurality of image matrices.
[0105] In one possible implementation, the statistical data of the residual data corresponding to the plurality of image matrices can be determined through the following formula (2):
[0106] f(x) = mean(sub(X)) + std(sub(X)) (2)
[0107] wherein f(x) represents the statistical data, sub(X) represents the residual data, mean represents the mean operation, and std represents the variance operation.
[0108] Through the above process, the statistical data corresponding to the plurality of residual data under different candidate shift bit numbers can be determined, so that the determination of the target shift bit number can be realized based on the statistical data corresponding to each candidate shift bit number through step 102.
[0109] It should be noted that in the process of optimization solving, certain constraint conditions are often required to be set for the parameters to be solved, so as to limit the value of the parameters to be solved through the set constraint conditions, so as to find the optimal solution in the value meeting the constraint conditions.
[0110] It has been mentioned above that the candidate shift bit number can be determined by setting the minimum allowed shift bit number and the maximum allowed shift bit number, which actually forms a constraint condition for solving the target shift bit number, that is, minNum < N < maxNum, wherein N represents the target shift bit number to be solved, minNum represents the minimum allowed shift bit number, and maxNum represents the maximum allowed shift bit number.
[0111] In addition, more constraint conditions can be set for the optimization solving process of the target shift bit number, for example, the number of image matrices meeting the conditions that the first truncated data is equal to the second truncated data and both the first truncated data and the second truncated data are greater than the candidate shift bit number is greater than the set number threshold can be set as a constraint condition. Wherein the first truncated data is obtained by truncating the product of the image matrix and the pre-set maximum allowed shift bit number, and the second truncated data is obtained by truncating the product of the matrix obtained by shifting the image matrix and the pre-set maximum allowed shift bit number.
[0112] Wherein the set number threshold can be determined based on the total number of image matrices and the set proportion. Alternatively, the product of the total number of image matrices and the set proportion can be used as the set number threshold, and the set proportion can be any value, for example, the set proportion can be 90%, and accordingly, the set number threshold is 90% of the total number of image matrices. Taking the total number of image matrices as 10000 as an example, the set number threshold is 9000.
[0113] Optionally, the above constraint condition that the first truncated data is equal to the second truncated data and both the first truncated data and the second truncated data are greater than the candidate shift bit number can be represented by the following formula (3):
[0114] trunc (X*maxNum) = trunc (X*2 N *maxNum) >> N (3)
[0115] Wherein, trunc represents decimal value discard (i.e. truncation) of data, X represents an image matrix, N represents a candidate shift bit number, and maxNum represents a maximum allowable shift bit number.
[0116] By setting the above constraint condition, it can be ensured that the value obtained by multiplying the fixed point number obtained by performing data fixed point processing on the floating point number by the maximum number and then shifting back is the same as the result of truncation without fixed point processing, so as to reduce the error in the data fixed point processing process, thereby improving the accuracy of the data processing process.
[0117] By setting the constraint condition, the determination of the target shift bit number can be performed among the candidate shift bit numbers that meet the above constraint condition, so as to determine the candidate shift bit number corresponding to the minimum statistical data among the candidate shift bit numbers that meet the above constraint condition as the target shift bit number.
[0118] That is, for step 102, when the candidate shift bit number corresponding to the statistical data meeting the set condition is determined as the target shift bit number used when performing data fixed point processing, the set condition can be that the value of the target shift bit number corresponding to the statistical data is minimum in the case that the number of image matrices meeting the condition that the first truncated data is equal to the second truncated data and both the first truncated data and the second truncated data are greater than the candidate shift bit number is greater than a set number threshold.
[0119] Optionally, when the determination of the target shift bit number is realized by the above steps 101 to 102, the statistical data corresponding to each candidate shift bit number can be determined first, and then the candidate shift bit numbers meeting the constraint condition are screened according to the set constraint condition, so that the target shift bit number is determined from the candidate shift bit numbers meeting the constraint condition.
[0120] Optionally, the candidate shift bit numbers can also be traversed in descending order to directly obtain the statistical data corresponding to the candidate shift bit numbers meeting the constraint condition, so that the target shift bit number is determined based on the statistical data corresponding to the candidate shift bit numbers meeting the constraint condition. That is, in one possible implementation, the determination of the target shift bit number can be realized by the following process:
[0121] Step one, starting from the minimum allowed shift bit number, when the current traversed candidate shift bit number meets the condition that the first truncated data and the second truncated data are equal and the number of image matrices whose first truncated data and second truncated data are greater than the candidate shift bit number is greater than the set number threshold, the value of the statistical data under the current traversed candidate shift bit number is recorded.
[0122] Step two, in the case of completing the traversal of the maximum allowed shift bit number, the candidate shift bit number corresponding to the statistical data with the minimum value in the recorded statistical data is determined as the target shift bit number.
[0123] Referring to Figure 2 , Figure 2 is a flowchart of a target shift bit number determination process according to an exemplary embodiment of the present application, as Figure 2 shown, the minimum allowed shift bit number (that is, minNum) and the maximum allowed shift bit number (that is, maxNum) can be set by the relevant technical personnel according to the actual technical requirements, so that the traversal can be started from N = minNum upwards, for each N value, the values of a and b are calculated according to the formulas a = trunc(x*maxNum) and b = trunc(x*2 N *maxNum), if a = b and 90% of the data satisfy a = b >> N, then the statistical data (that is, f(x)) corresponding to the N value is calculated according to the formula f(x) = mean(sub(x)) + std(sub(x)), and the calculated statistical data and the corresponding N value are recorded, then N value is added by 1, the statistical data corresponding to the next N value is continued to be calculated, and so on, until maxNum is traversed, that is, a plurality of statistical data corresponding to the candidate shift bit numbers satisfying the constraint condition can be obtained, so that the N value with the minimum statistical data can be taken as the target shift bit number.
[0124] The above process mainly introduces the process of determining the target shift bit number used in the vector data quantization, and the present application also provides a way for determining the target shift bit number used in the quantization of scalar data, it should be noted that for the quantization of scalar data, only the shift bit number with the minimum decimal part value needs to be selected as the target shift bit number, and the final quantization error can be minimized.
[0125] In a possible implementation, for the scalar data involved in the image processing process corresponding to the images in the image data set, the determination of the target shift bit number can be achieved by the following steps:
[0126] Step one, based on the data bit number of the scalar data and the pre-set quantization bit number, the maximum allowed shift bit number is determined, wherein the shift bit number value not exceeding the maximum allowed shift bit number is taken as the candidate shift bit number.
[0127] In a possible implementation, the difference between the fixed-point number and the data number is determined as the maximum allowed shift number, i.e., the maximum allowed shift number = fixed-point number - data number.
[0128] For example, for the fixed-point process of the scalar data 3.09, if the fixed-point process is performed within 13 bits, the preset fixed-point number is 13, the data number is 3 (3.09 can be represented by 3-bit data), and the maximum allowed shift number is 10.
[0129] Step 2: Determine the fixed-point values obtained by performing the fixed-point process on the scalar data based on each alternative shift number, to obtain a plurality of fixed-point values.
[0130] In a possible implementation, the alternative shift numbers are traversed from 0 upwards until the maximum allowed shift number is reached, to obtain the fixed-point values corresponding to each alternative shift number.
[0131] Still taking the fixed-point process of the scalar data 3.09 as an example, the results obtained by traversing the alternative shift numbers can be seen from Table 1 below:
[0132] Table 1
[0133] Shifted bit number Data value 0 3.09 1 6.18 2 12.36 3 24.72 4 49.44 5 98.88 6 197.76 7 395.52 8 791.04 9 1582.08 10 3164.16
[0134] The fixed-point values corresponding to each alternative shift number from 0 to 10 (i.e., the maximum allowed shift number) are shown in Table 1 above.
[0135] Step 3: Determine the alternative shift number corresponding to the fixed-point value with the smallest decimal part in the plurality of fixed-point values as the target shift number.
[0136] Still taking the fixed-point process of the scalar data 3.09 as an example, as shown in Table 1 above, it is found that the decimal part 0.04 of the number 791.04 formed by the alternative shift number 8 (i.e., after shifting 8 bits) is the smallest among the decimal parts of the plurality of fixed-point values, and therefore the alternative shift number 8 can be determined as the target shift number.
[0137] By using the fixed-point scheme provided in the present application, the target shift number with the smallest fixed-point error can be solved, and the high-dimensional fixed-point value with the smallest fixed-point error can be obtained by performing the fixed-point process on the data using the target shift number, and the minimization of error within the fixed-point number can be ensured after performing the operation on the high-dimensional fixed-point data.
[0138] Additionally, it should be noted that when using this target number of shifts to perform fixed-point transformation of the data, in order to minimize calculation errors, the following issues need to be considered during the fixed-point transformation calculation:
[0139] 1. Determine the largest number to be multiplied.
[0140] Fixed-point converted numbers often require multiplication or addition operations, and the magnitude of the numbers used in these operations will introduce different errors. Therefore, to ensure that the errors in operations between fixed-point converted values and other values do not affect the final algorithm result, the maximum value of the values being operated on must be considered when selecting the number of bits for the fixed-point conversion. If the error between the result obtained after the maximum value is calculated and shifted back to a floating-point number and the result obtained by directly performing operations based on floating-point numbers is within an acceptable range, then the number of bits for the fixed-point conversion is acceptable.
[0141] 2. Fixed-point boundary value mapping
[0142] A common problem encountered during fixed-point conversion in software simulation is that while a certain value is represented using N bits, the actual value may not reach the maximum value that N bits can represent. In floating-point arithmetic, to find the complement of a number with respect to 1, we subtract the number from 1. However, in fixed-point arithmetic, when subtracting the fixed-point value of the number after converting 1 to fixed-point, the complement is too large because the maximum value of the fixed-point value cannot reach the maximum value that N bits can represent.
[0143] Therefore, when setting a value to be represented by N bits, it is necessary to map the maximum value of this number to the maximum value that N bits can represent.
[0144] The optimized fixed-point method used in this invention can be applied to the fixed-point process of any high-dimensional data, reducing the error caused by fixed-pointing and effectively improving resource utilization. It also improves resource utilization in the process of implementing the image retention correction algorithm on FPGA, thereby reducing the cost of the overall solution for image retention correction of Mini LED direct-view screens.
[0145] Corresponding to the embodiments of the aforementioned methods, the present invention also provides embodiments of corresponding data processing apparatus and computing devices on which they are applied.
[0146] like Figure 3 As shown, Figure 3 This is a block diagram illustrating a data processing apparatus according to an exemplary embodiment of the present invention, the apparatus comprising:
[0147] The first determining module 301 is configured to determine statistical data of residual data corresponding to each image matrix in different candidate shift bit numbers based on the image matrix corresponding to each image in the image data set, the shift bit number being a quantization bit number, the residual data being determined based on a first matrix obtained by performing shift processing on the image matrix and a second matrix obtained by performing truncation processing on the first matrix.
[0148] The second determining module 302 is configured to determine the candidate shift bit number corresponding to the statistical data satisfying the set condition as a target shift bit number used when performing data fixed-pointing.
[0149] In some embodiments, the first determining module 301, when determining the statistical data of the residual data corresponding to each image matrix in different candidate shift bit numbers based on the image matrix corresponding to each image in the image data set, is configured to:
[0150] For any candidate shift bit number, the image matrix corresponding to each image in the image data set is substituted into the first relationship data respectively to obtain the residual data corresponding to each image matrix, the first relationship data being used to indicate a difference between the first matrix obtained by performing shift processing on the image matrix and the second matrix obtained by performing truncation processing on the first matrix.
[0151] The average value and the variance of the plurality of residual data are determined based on the residual data corresponding to the plurality of image matrices respectively.
[0152] The sum of the average value and the variance of the plurality of residual data is determined as the statistical data of the residual data corresponding to the plurality of image matrices.
[0153] In some embodiments, the apparatus further comprises:
[0154] The shift processing module is configured to, for any image, expand each element in the image matrix corresponding to the image by a target multiple to achieve shift processing on the image matrix, to obtain the first matrix corresponding to the image matrix, the target multiple being an exponential power of 2, the power being the candidate shift bit number.
[0155] The truncation processing module is configured to discard the decimal part of each element in the first matrix obtained by the shift processing to achieve truncation processing on the first matrix, to obtain the second matrix corresponding to the image matrix.
[0156] In some embodiments, the set condition is that the target shift bit number corresponds to the minimum value of the statistical data when the number of image matrices satisfying the conditions that the first truncation data is equal to the second truncation data and both the first truncation data and the second truncation data are greater than the candidate shift bit number is greater than a set number threshold.
[0157] The first truncated data is obtained by truncating a product of the image matrix and the preset maximum allowed shift bit number, and the second truncated data is obtained by truncating a product of the image matrix obtained after the shift processing and the preset maximum allowed shift bit number.
[0158] In some embodiments, the alternative shift bit numbers are located between the preset minimum allowed shift bit number and the maximum allowed shift bit number.
[0159] The apparatus further includes:
[0160] The recording module is configured to record a value of the statistical data at the current alternative shift bit number when the current alternative shift bit number meets the condition that the first truncated data is equal to the second truncated data and the number of image matrices whose first truncated data and second truncated data are greater than the alternative shift bit number is greater than the set number threshold, starting from the minimum allowed shift bit number.
[0161] The second determination module 302 is further configured to determine, when the maximum allowed shift bit number is traversed, the alternative shift bit number corresponding to the statistical data with the minimum value in the recorded statistical data as the target shift bit number.
[0162] In some embodiments, for any image in the image data set, the image matrix corresponding to the image includes a first image matrix used to represent the image and / or a second image matrix obtained by processing the first image matrix.
[0163] In some embodiments, the second determination module 302 is further configured to determine, for the scalar data involved in the image processing process corresponding to the image in the image data set, the maximum allowed shift bit number based on the data bit number of the scalar data and the preset fixed-point bit number, wherein the shift bit number not exceeding the maximum allowed shift bit number is taken as the alternative shift bit number.
[0164] The second determination module 302 is further configured to determine fixed-point values obtained by performing fixed-point processing on the scalar data based on each alternative shift bit number, to obtain a plurality of fixed-point values.
[0165] The second determination module 302 is further configured to determine, as the target shift bit number, the alternative shift bit number corresponding to the fixed-point value with the minimum decimal part value in the plurality of fixed-point values.
[0166] The functions and roles of the modules in the above apparatus are implemented in the implementation process of the corresponding steps in the above method, which will not be described here.
[0167] For the apparatus embodiment, since it basically corresponds to the method embodiment, the relevant part is described in the part of the method embodiment. The apparatus embodiment described above is only illustrative, wherein the modules described as separate components can or can not be physically separated, and the components displayed as modules can or can not be physical modules, i.e., can be located in one place or distributed on multiple network modules. Part or all of the modules can be selected to achieve the purpose of the scheme of the present specification according to actual needs. Those skilled in the art can understand and implement it without creative labor.
[0168] The present application also provides a computing device, referring to Figure 4 , Figure 4 is a structural schematic diagram of a computing device according to an exemplary embodiment of the present application. As shown in Figure 4 , the computing device includes a processor 410, a memory 420 and a network interface 430, the memory 420 is used to store computer instructions executable on the processor 410, the processor 410 is used to implement the data processing method provided by any embodiment of the present application when executing the computer instructions, and the network interface 430 is used to implement the input and output functions. In more possible implementation manners, the computing device can also include other hardware, which is not limited by the present application.
[0169] The present application also provides a computer readable storage medium, which can be in various forms, such as, in different examples, the computer readable storage medium can be: RAM (Random Access Memory, Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state disk, any type of storage disk (such as optical disk, DVD, etc.), or similar storage medium, or a combination thereof. In particular, the computer readable medium can also be paper or other suitable medium capable of printing programs. The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the data processing method provided by any embodiment of the present application.
[0170] The present application also provides a computer program product, including a computer program, which is executed by the processor to implement the data processing method provided by any embodiment of the present application.
[0171] As will be appreciated by one skilled in the art, aspects of the present disclosure can be embodied as a method, device, computer readable storage medium, or computer program product. Accordingly, aspects of the present disclosure can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, aspects of the present disclosure can take the form of a computer program product on one or more computer readable storage media (including, but not limited to, disk memory, CD-ROMs, optical storage devices, etc.) embodying computer readable program code embodied thereon.
[0172] Embodiments of the present disclosure are described herein with reference to flowchart illustrations and / or block diagrams of apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. Such computer program instructions can be provided to a processor of a computer (or other
[0173] The above description of specific embodiments of the present disclosure has been presented for the purpose of illustration. Other embodiments are within the scope of the disclosure. In some instances, actions or steps described in the disclosure can be performed in an order different from that described and still achieve desirable results. Additionally, the processes depicted in the figures do not necessarily require the particular order shown, or sequential order, to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous.
[0174] Embodiments of the subject matter and the functional operations described in this specification can be implemented in digital electronic circuitry, in tangibly-embodied computer software or firmware, in computer hardware, including the structures disclosed in this specification and their structural equivalents, or in combinations of one or more of them. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible non-transitory program carrier for execution by, or to control the operation of, data processing apparatus. Alternatively or additionally, the program instructions can be encoded on an artificially generated propagated signal, e.g., a machine-generated electrical, optical, or electromagnetic signal that is generated to encode information for transmission to suitable receiver apparatus for execution by a data processing apparatus. The computer storage medium can be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of them.
[0175] The processes and logic flows described in this specification can be performed by one or more programmable computers executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows can also be performed by special purpose logic circuitry, e.g., an FPGA or an ASIC, and / or by a combination of computer and special purpose logic circuitry. Devices can alternatively comprise, in whole or in part, circuitry composed of modules arranged to perform the aforementioned functions. The modules can be individual hardware components or can be combined with other components into a single hardware component.
[0176] Suitable computers for the execution of a computer program include, by way of example, general and / or special purpose microprocessors, or any other kind of central processing unit. Generally, a central processing unit will receive instructions and data from a read-only memory and / or a random access memory. The essential elements of a computer are a central processing unit for performing instructions and one or more memory devices for storing instructions and data. Generally, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto-optical disks, or optical disks. However, a computer need not have such devices. Moreover, a computer can be embedded in another device, e.g., a mobile telephone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a Global Positioning System (GPS) receiver, or a portable storage device (e.g., a universal serial bus (USB) flash drive), to name just a few.
[0177] Computer readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including by way of example semiconductor memory devices, e.g., EPROM, EEPROM, and flash memory devices; magnetic disks, e.g., internal hard disks or removable disks; magneto-optical disks; and CD-ROM and DVD-ROM disks. The processor and the memory can be supplemented by, or incorporated in, special purpose logic circuitry.
[0178] While this specification contains many specifics, these should not be construed as limitations on the scope of any invention, but rather as descriptions of particular implementations of particular embodiments of the inventions. Certain features that are, for clarity, described above in the context of separate embodiments, can also be provided in combination in a single embodiment. Conversely, various features that are, for brevity, described above in the context of a single embodiment, can also be provided separately or in any suitable subcombination. In addition, while features can be described above as being implemented in digital electronic circuitry, one skilled in the art will recognize that the embodiments can be implemented in either digital or analog circuitry.
[0179] Similarly, while operations are depicted in the drawings in a particular order, this should not be understood as requiring such order, nor that all illustrated operations be performed, to implement the desired result. In certain circumstances, multitasking and parallel processing can be advantageous. Moreover, the separation of various system modules and components in the embodiments described above should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated in a single software product or packaged into multiple software products.
[0180] Accordingly, particular embodiments of the subject matter have been described. Other embodiments within the scope of the present invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. In some instances, variations and / or modifications can be made to the processes described and illustrated herein, and in some instances alternative processes can be implemented that processing the present description. It is intended, therefore, to be covered by the following claims, not to be limited to the processes specifically described and / or illustrated herein.
[0181] Other embodiments of the present specification will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the specification and examples be considered as exemplary only, with the true scope of the specification being indicated by the following claims. Various modifications and changes can be made thereto by those skilled in the art which fall within the scope of the application as known from the before mentioned description and drawings.
[0182] The above description is intended to be illustrative and not restrictive. Many other embodiments will be apparent to those of skill in the art upon reading and understanding the above description. The scope of the application should, therefore, be determined not with reference to the above description, but should instead be determined with reference to the appended claims, along with their full scope of equivalents.
Claims
1. A data processing method, characterized by, The method comprises: determining statistical data of residual data corresponding to each image matrix of each image in the image data set under different candidate shift bit numbers, the shift bit number being a quantization bit number, the residual data being determined based on a first matrix obtained by performing shift processing on the image matrix and a second matrix obtained by performing truncation processing on the first matrix; when the statistical data corresponding to the candidate shift bit number meets a set condition, determining the candidate shift bit number as a target shift bit number used when performing data fixed-pointing, the set condition being that the target shift bit number corresponds to the minimum value of the statistical data in the case that the number of image matrices meeting the condition that the first truncated data is equal to the second truncated data and both the first truncated data and the second truncated data are greater than the candidate shift bit number is greater than a set number threshold; wherein the first truncated data is a result obtained by performing truncation processing on the product of the image matrix and a pre-set maximum allowed shift bit number, and the second truncated data is a result obtained by performing truncation processing on the product of the matrix obtained by performing shift processing on the image matrix and the pre-set maximum allowed shift bit number.
2. The method of claim 1, wherein, The method comprises: for any candidate shift bit number, substituting each image matrix corresponding to each image in the image data set into first relationship data to obtain residual data corresponding to each image matrix, the first relationship data being used to indicate the difference between a first matrix obtained by performing shift processing on the image matrix and a second matrix obtained by performing truncation processing on the first matrix; determining the average and variance of the plurality of residual data based on the plurality of residual data corresponding to the plurality of image matrices respectively; determining the sum of the average and variance of the plurality of residual data as the statistical data of the residual data corresponding to the plurality of image matrices.
3. The method of claim 2, wherein, The method further comprises: for any image, expanding each element in the image matrix corresponding to the image by a target multiple to perform shift processing on the image matrix, to obtain a first matrix corresponding to the image matrix, the target multiple being an exponential power of 2, the power being the candidate shift bit number; discarding the decimal part of each element in the first matrix obtained by performing shift processing to perform truncation processing on the first matrix, to obtain a second matrix corresponding to the image matrix.
4. The method of claim 1, wherein, The candidate shift bit number is between a pre-set minimum allowed shift bit number and a maximum allowed shift bit number. The method comprises: starting from the minimum allowed shift bit number, performing traversal, and recording the value of the statistical data under the currently traversed candidate shift bit number when the currently traversed candidate shift bit number meets the condition that the first truncated data is equal to the second truncated data and the number of image matrices meeting the condition that both the first truncated data and the second truncated data are greater than the candidate shift bit number is greater than a set number threshold; in the case that the maximum allowed shift bit number traversal is completed, determining the candidate shift bit number corresponding to the statistical data with the minimum value in the recorded statistical data as the target shift bit number.
5. The method of claim 1, wherein, For any image in the image dataset, the image corresponding image matrix includes a first image matrix for representing the image and / or a second image matrix processed based on the first image matrix.
6. The method of claim 1, wherein, The method further includes: For scalar data involved in the image processing process corresponding to the image in the image dataset, based on the data bit number of the scalar data and the pre-set fixed-point bit number, a maximum allowed shift bit number is determined, wherein a shift bit number not exceeding the maximum allowed shift bit number is taken as an alternative shift bit number; A fixed-point number value obtained by performing fixed-point processing on the scalar data based on each alternative shift bit number is determined, to obtain a plurality of fixed-point number values; The alternative shift bit number corresponding to the fixed-point number value with the smallest decimal part value in the plurality of fixed-point number values is determined as a target shift bit number.
7. A data processing apparatus, characterized by The apparatus includes: A first determining module configured to determine statistical data of residual data corresponding to each image matrix under different alternative shift bit numbers based on the image matrix corresponding to each image in the image dataset, the shift bit number being a quantization bit number, and the residual data being determined based on a first matrix obtained by performing shift processing on the image matrix and a second matrix obtained by performing truncation processing on the first matrix; A second determining module configured to determine, as a target shift bit number used when performing data fixed-point processing, an alternative shift bit number corresponding to the statistical data satisfying a set condition; the set condition being that the target shift bit number corresponds to the smallest statistical data value in the case that the number of image matrices satisfying the conditions that the first truncated data is equal to the second truncated data and both the first truncated data and the second truncated data are greater than the alternative shift bit number is greater than a set number threshold; wherein the first truncated data is a result obtained by performing truncation processing on the product of the image matrix and a pre-set maximum allowed shift bit number, and the second truncated data is a result obtained by performing truncation processing on the product of the matrix obtained by performing shift processing on the image matrix and the pre-set maximum allowed shift bit number.
8. A computing device, comprising: The computing device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the operations performed by the data processing method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a program, and the program is executed by the processor to implement the operations performed by the data processing method according to any one of claims 1 to 6.