Data conversion and recovery method, device, system, electronic equipment and storage medium

By using invertible rational integer matrix for integer transformation and inverse transformation, the problem that traditional integer transformation cannot eliminate floating point error is solved, more efficient data compression is achieved, and compression ratio and efficiency are improved.

CN116366867BActive Publication Date: 2024-11-19CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111626735.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-28
Publication Date
2024-11-19
Estimated Expiration
2041-12-28

AI Technical Summary

Technical Problem

Traditional integer transformation schemes cannot completely eliminate floating point operation errors, resulting in performance losses in image or video data compression.

Method used

A pre-configured integer matrix with a rational number is adopted to perform integer transformation and inverse transformation on the transformed data to realize full integer operation, avoid floating point expression errors and quantization errors, and generate more 0 coefficients.

Benefits of technology

It improves the data compression ratio and data compression efficiency, completely eliminates errors, and does not rely on ZigZag scanning and encoding, and is suitable for a variety of scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116366867B_ABST
    Figure CN116366867B_ABST
Patent Text Reader

Abstract

The present disclosure provides a data transformation and recovery method, device, system, electronic device and storage medium, which relates to the field of data processing technology. The method comprises: obtaining a pre-configured integer matrix; performing integer transformation on the data to be compressed using the integer matrix; encoding the data to be compressed after the integer transformation to obtain compressed data. The present disclosure can implement a full integer transformation scheme, which not only has no floating point expression error and quantization error, but also can generate more zero coefficients than traditional integer transformation / DCT transformation, effectively improving the data compression ratio and data compression efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] In the digital multimedia era, a large amount of image or video data requires a lot of storage space. For the compression processing of image or video data, DCT (Discrete Cosine Transform) or integer transform is widely used in related technologies to achieve a higher compression ratio. For example, DCT transform is used in the JPEG (Joint Photographic Experts Group) standard; integer transform is used to compress residual signals in the H.264 standard (a new generation of digital video compression format after MPEG4 by the International Organization for Standardization and the International Telecommunication Union); and DCT transform is used in feature coding in the VCM (Video Coding For Machines) standard.

[0003] The traditional integer transform is derived from the DCT transform, and the equivalent matrix of the DCT transform is slightly modified to merge the floating-point operation error term into the quantization. Therefore, the performance loss of the integer transform scheme comes only from quantization; while the performance loss of the DCT transform scheme comes from the error term of the floating-point operation of quantization and the DCT transform itself. However, a careful analysis shows that the traditional integer transform scheme is not a full integer transform scheme, but only merges the floating-point error term into the quantization. Although it reduces the floating-point operation error to a certain extent, this error is unavoidable. Therefore, neither the DCT transform scheme nor the traditional integer transform scheme completely eliminates the floating-point operation error.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] The present disclosure provides a data transformation and recovery method, device, system, electronic device and storage medium, which at least to a certain extent overcome the technical problem in the related art that the compression scheme based on traditional integer transformation cannot completely eliminate floating-point operation errors.

[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0007] According to one aspect of the present disclosure, a data transformation method is provided, the method comprising: obtaining a pre-configured integer matrix, wherein the integer matrix is ​​reversible and the inverse matrix is ​​a rational number matrix; and performing integer transformation on data to be transformed using the integer matrix.

[0008] In some embodiments, the data to be transformed is integer transformed by the following formula:

[0009] Y=IXI T ;

[0010] Wherein, Y represents the data after integer transformation; X represents the data before integer transformation; I represents a pre-configured reversible integer matrix whose inverse matrix is ​​a rational number matrix; I T Represents the transposed matrix of I.

[0011] In some embodiments, the data after integer transformation is inversely transformed by the following formula to restore the data before integer transformation:

[0012] X=FYF T ;

[0013] Wherein, Y represents the data after integer transformation; X represents the restored data, that is, the data before integer transformation; F represents the inverse matrix of I, which is a rational number matrix; F T represents the transposed matrix of F.

[0014] In some embodiments, the data after integer transformation is inversely transformed by the following formula to restore the data before integer transformation:

[0015]

[0016] Where, F represents the inverse matrix of I, which is a rational number matrix; N represents an integer matrix with the same dimension as F, each element is n; n is a positive integer; represents the Kronecker product of F and N, which is an integer matrix; express The transposed matrix of .

[0017] In some embodiments, the data to be transformed is integer data, and both the forward transform and the inverse transform of the integer data are integer transforms of full integer operations. The method also includes: using an integer matrix to perform an integer transform of full integer operations on the integer data to be transformed; using an integer matrix obtained by shaping the inverse matrix of the integer matrix, performing an inverse transform of full integer operations on the data after the integer transform to restore the integer data.

[0018] In some embodiments, the data to be transformed is floating-point data, and the method further includes: quantizing the floating-point data to be transformed to obtain quantized integer data; performing integer transformation of the quantized integer data using an integer matrix with full integer operations; and performing inverse transformation on the integer transformed data using an integer matrix obtained by shaping the inverse matrix of the integer matrix to restore the data before the integer transformation.

[0019] In some embodiments, the data to be transformed is floating-point data, and the method further includes: transforming the floating-point data to be transformed using an integer matrix to obtain transformed floating-point data; and inversely transforming the transformed floating-point data using an integer matrix obtained by shaping the inverse matrix of the integer matrix to restore the floating-point data before the transformation.

[0020] In some embodiments, the data to be transformed is floating-point data, and the method further includes: transforming the floating-point data to be transformed using an integer matrix to obtain transformed floating-point data; quantizing the transformed floating-point data; dequantizing the quantized data; and inverse transforming the dequantized floating-point data using an inverse matrix of the integer matrix or an integer matrix obtained by shaping the inverse matrix to restore the floating-point data before the transformation.

[0021] In some embodiments, the data to be transformed includes at least any one of the following: image data, video data, residual data, and feature data.

[0022] According to another aspect of the present disclosure, a data recovery method is also provided, including: obtaining data to be recovered, wherein the data to be recovered is data after an integer transformation is performed on original data using an integer matrix, the integer matrix is ​​reversible and the inverse matrix is ​​a rational number matrix; using the inverse matrix of the integer matrix, inversely transforming the data to be recovered to recover the data before the integer transformation.

[0023] According to another aspect of the present disclosure, a data recovery method is also provided, including: obtaining data to be recovered, wherein the data to be recovered is data obtained by performing an integer transformation on original data using an integer matrix, the integer matrix is ​​reversible and the inverse matrix is ​​a rational number matrix; using an integer matrix obtained by shaping the inverse matrix, inversely transforming the data to be recovered to recover the data before the integer transformation.

[0024] According to another aspect of the present disclosure, a data transformation device is also provided, including: a configuration module, used to obtain a pre-configured integer matrix, wherein the integer matrix is ​​reversible and the inverse matrix is ​​a rational number matrix; a transformation module, used to use the integer matrix to perform integer transformation on data to be transformed.

[0025] According to another aspect of the present disclosure, a data recovery device is also provided, including: a data acquisition module, used to acquire data to be recovered, wherein the data to be recovered is data after an integer transformation is performed on original data using an integer matrix, the integer matrix is ​​reversible and the inverse matrix is ​​a rational number matrix; an inverse transformation module, used to perform an inverse transformation on the data to be recovered using the inverse matrix of the integer matrix to recover the data before the integer transformation.

[0026] According to another aspect of the present disclosure, a data recovery device is also provided, including: a data acquisition module, used to acquire data to be recovered, wherein the data to be recovered is data after an integer transformation is performed on original data using an integer matrix, the integer matrix is ​​reversible and the inverse matrix is ​​a rational number matrix; an inverse transformation module, used to perform an inverse transformation on the data to be recovered using an integer matrix obtained by shaping the inverse matrix, so as to recover the data before the integer transformation.

[0027] According to another aspect of the present disclosure, there is also provided an image compression system, comprising: a first encoding module and a first decoding module; wherein the first encoding module is used to obtain a pre-configured integer matrix, and use the integer matrix to perform an integer transformation on the image data, wherein the integer matrix is ​​reversible and the inverse matrix is ​​a rational number matrix; the first decoding module is used to use the inverse matrix of the integer matrix or the integer matrix after shaping the inverse matrix to perform an inverse transformation on the data after the integer transformation, so as to restore the image data before the integer transformation.

[0028] In some embodiments, the first encoding module is also used to: encode the data after integer transformation, and transmit the encoded data to the first decoding module; the first decoding module is also used to decode the data from the first encoding module, using the inverse matrix of the integer matrix or the integer matrix after shaping the inverse matrix, to inverse transform the decoded data to restore the data before the integer transformation.

[0029] In some embodiments, the first encoding module adopts an encoding method that performs ZigZag scanning or an encoding method that does not perform ZigZag scanning.

[0030] According to another aspect of the present disclosure, a feature compression system is also provided, including: a second encoding module and a second decoding module; wherein the second encoding module is used to obtain a pre-configured integer matrix, and use the integer matrix to perform integer transformation on feature data, wherein the integer matrix is ​​reversible and the inverse matrix is ​​a rational number matrix; the second decoding module is used to use the inverse matrix of the integer matrix or the integer matrix after the inverse matrix is ​​shaped, to perform inverse transformation on the data after the integer transformation, and restore the data before the integer transformation.

[0031] In some embodiments, the second encoding module is also used to: encode the data after integer transformation, and transmit the encoded data to the second decoding module; the second decoding module is also used to decode the data from the second encoding module, using the inverse matrix of the integer matrix or the integer matrix after shaping the inverse matrix, to inverse transform the decoded data to restore the data before the integer transformation.

[0032] In some embodiments, the second encoding module adopts an encoding method that performs ZigZag scanning or an encoding method that does not perform ZigZag scanning.

[0033] In some embodiments, the second encoding module is also used to quantize the feature data, and use the integer matrix to perform integer transformation of the quantized feature data with full integer operations; the second decoding module is also used to use the integer matrix obtained by shaping the inverse matrix to perform inverse transformation of the integer transformed data with full integer operations, and perform inverse quantization on the inverse transformed data to obtain the original feature data.

[0034] In some embodiments, the second encoding module is also used to perform integer transformation on the feature data and quantize the feature data after the integer transformation; the second decoding module is also used to perform inverse quantization on the quantized feature data, using the integer matrix obtained by shaping the inverse matrix to inverse transform the inverse quantized data to obtain the original feature data.

[0035] According to another aspect of the present disclosure, a residual compression system is also provided, including: a third encoding module and a third decoding module; wherein the third encoding module is used to obtain a pre-configured integer matrix, and use the integer matrix to perform integer transformation on the residual data, wherein the integer matrix is ​​reversible and the inverse matrix is ​​a rational number matrix; the third decoding module is used to use the inverse matrix of the integer matrix or the integer matrix after the inverse matrix is ​​shaped, to perform inverse transformation on the data after the integer transformation, and restore the data before the integer transformation.

[0036] In some embodiments, the third encoding module is also used to: encode the data after integer transformation, and transmit the encoded data to the third decoding module; the third decoding module is also used to decode the data from the third encoding module, using the inverse matrix of the integer matrix or the integer matrix after shaping the inverse matrix, to inverse transform the decoded data to restore the data before the integer transformation.

[0037] In some embodiments, the third encoding module adopts an encoding method that performs ZigZag scanning or an encoding method that does not perform ZigZag scanning.

[0038] According to another aspect of the present disclosure, an electronic device is also provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above-mentioned data transformation methods, or any one of the above-mentioned data recovery methods, by executing the executable instructions.

[0039] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it implements any one of the above-mentioned data transformation methods or any one of the above-mentioned data recovery methods.

[0040] The data transformation and recovery method, device, system, electronic device and storage medium provided by the embodiments of the present disclosure utilize a pre-configured reversible integer matrix whose inverse matrix is ​​a rational number matrix to perform integer transformation on the data to be transformed. When the data to be transformed is an integer matrix, integer transformation of full integer operations can be achieved. When the data to be transformed is floating-point data, the floating-point data is quantized, and integer transformation of full integer operations can be achieved on the quantized integer matrix. Not only is there no floating-point expression error and quantization error, but more zero coefficients can be generated than traditional integer transformation / DCT transformation, effectively improving the data compression ratio and data compression efficiency.

[0041] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0043] Figure 1 A flow chart showing data compression based on traditional integer transformation in the related art;

[0044] Figure 2 A schematic diagram showing a data transformation result using a traditional DCT / integer transform in the related art;

[0045] Figure 3 A flow chart showing data compression based on a new integer transform in an embodiment of the present disclosure is shown;

[0046] Figure 4 A schematic diagram showing the principle of combining a basic quantization step size and a step size multiplier to achieve quantization in an embodiment of the present disclosure;

[0047] Figure 5 A schematic diagram showing a data transformation result using a new integer transformation in an embodiment of the present disclosure is shown;

[0048] Figure 6 A flow chart of a data transformation method in an embodiment of the present disclosure is shown;

[0049] Figure 7A flow chart of a data recovery method in an embodiment of the present disclosure is shown;

[0050] Figure 8 A flow chart of another data recovery method in an embodiment of the present disclosure is shown;

[0051] Fig. 9 A schematic diagram of a data conversion device in an embodiment of the present disclosure is shown;

[0052] Fig.10 A schematic diagram of a data recovery device in an embodiment of the present disclosure is shown;

[0053] Fig.11 A schematic diagram of an image compression system in an embodiment of the present disclosure is shown;

[0054] Fig.12 A schematic diagram of a feature compression system in an embodiment of the present disclosure is shown;

[0055] Fig.13 A schematic diagram of a residual compression system in an embodiment of the present disclosure is shown;

[0056] Fig.14 A structural block diagram of an electronic device in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0057] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0058] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0059] For ease of understanding, before introducing the embodiments of the present disclosure, several terms involved in the embodiments of the present disclosure are first explained as follows:

[0060] Compression: Reducing the size of data using some technical means.

[0061] Decompression: restore the reduced data size to its original size through some technical means.

[0062] Coding: A specific technical means of compression.

[0063] Decoding: A specific means of decompression.

[0064] DCT: The full name of DCT is Discrete Cosine Transform, which is used for lossy data compression of images or videos.

[0065] ZigZag scanning: that is, zigzag scanning, scanning along a certain path (zigzag) to transform the quantized coefficients from two dimensions to one dimension. After DCT transformation and quantization processing, the lower right corner of the matrix has basically become zero value, and the non-zero values ​​are basically concentrated in the upper left corner of the matrix. After ZigZag scanning, the two-dimensional matrix can be transformed into a one-dimensional string, the front part of the string is mainly non-zero value, and the back part is mainly zero value.

[0066] The specific implementation methods of the present disclosure are described in detail below with reference to the accompanying drawings and examples.

[0067] First, the traditional DCT transform is analyzed: the two-dimensional DCT transform is equivalent to the first DCT transform and then the column DCT transform. The following matrix can be used to represent the DCT forward and inverse transform:

[0068] Y=AXA T (1)

[0069] X=BYB T (2)

[0070] Where B = A -1 , A is represented as follows:

[0071]

[0072] The traditional integer transform comes from DCT transform:

[0073] make

[0074] Then the DCT transform formula is:

[0075]

[0076] Take d = c / b (approximately equal to 0.414). In order to complete the integer transformation, d must be taken as 0.5, and the correction At this time, the integer transformation formula is obtained:

[0077]

[0078] At this time, the corrected integer transformation matrix is ​​obtained:

[0079]

[0080]

[0081] Figure 1 A flowchart of implementing data compression based on traditional integer transformation in the related art is shown as follows: Figure 1 As shown, if the traditional integer transform is used to compress the data, the transform coefficients need to be subjected to Hadamard transform / quantization and ZigZag scanning. Among them, ZigZag scanning is a necessary module of the system, and ZigZag scanning itself brings a lot of calculations.

[0082] Analysis shows that traditional DCT transform and integer transform have the following disadvantages:

[0083] 1) Traditional integer transform is derived from DCT transform, which is the result of slightly modifying the coefficients of DCT transform, resulting in the uniqueness of the integer transform scheme.

[0084] 2) Traditional DCT transform and integer transform do not achieve the optimal ratio of zero coefficients; Figure 2 The figure shows the result of transforming a 4×4 data block by traditional DCT transform and integer transform. It can be seen that although there are many non-zero coefficients in the results of traditional DCT transform and integer transform, it has not reached the optimal level. Compared with DCT transform, traditional integer transform does not increase the proportion of zero coefficients.

[0085] 3) Traditional DCT transform / integer transform are not complete integer transforms, and the error term E still contains irrational floating point numbers, but the error is appropriately reduced by combining it with quantization, but the error is still inevitable;

[0086] 4) The coefficient encoding / decoding of the traditional DCT transform / integer transform relies on ZigZag scanning (ie, zigzag scanning) to gather the zero coefficients together, and the computational complexity of ZigZag itself is not small.

[0087] In order to solve the technical problem that the compression scheme based on the traditional integer transformation in the related art cannot completely eliminate the floating-point operation error, the present disclosure provides a data transformation method and a data recovery method based on a new integer transformation. Before introducing the data transformation method and the data recovery method, the new integer transformation is first described:

[0088] The new integer transform provided in the embodiments of the present disclosure only constrains I to be an integer matrix, which is reversible and the inverse matrix is ​​a rational number matrix:

[0089] Y=IXIT (8)

[0090] X=FYF T (9)

[0091] Wherein, Y represents the data after integer transformation; X represents the data before integer transformation; I represents a pre-configured reversible integer matrix whose inverse matrix is ​​a rational number matrix; I T Represents the transposed matrix of I; F = I -1 , represents the inverse matrix of I, which is a rational number matrix; F T represents the transposed matrix of F. Furthermore, in order to realize the inverse transformation of all integers, the inverse matrix can be reshaped:

[0092]

[0093] Where N represents an integer matrix with the same dimension as F, each element is n; n is a positive integer; represents the Kronecker product of F and N, which is an integer matrix; express The transposed matrix of .

[0094] Since the new integer transform provided in the embodiments of the present disclosure utilizes an integer matrix independent of DCT, integer transform and inverse transform of full integer operations can be performed on integer data without any information loss; for floating-point data, the floating-point data can be quantized and then integer transform of full integer operations can be implemented on the quantized integer matrix, which not only has no floating-point expression error and quantization error, but also can generate more zero coefficients than traditional integer transform / DCT transform, effectively improving the data compression ratio and data compression efficiency.

[0095] Figure 3 A flowchart of implementing data compression based on a new integer transform in an embodiment of the present disclosure is shown. Figure 3 As shown, when the new integer transform provided in the embodiment of the present disclosure is used to implement data compression, the quantization module is an optional module. The embodiment of the present disclosure can implement the quantization of integer (floating point) data to integer data in the following two ways:

[0096] Method a: fixed quantization table;

[0097] Method b: quantization combining basic quantization step and step ratio. Figure 4 A schematic diagram showing the principle of combining the basic quantization step size and the step size ratio to achieve quantization in an embodiment of the present disclosure is shown.

[0098] 1) The integer transform coefficient obtains the maximum absolute value abs_max = max(abs(c))

[0099] 2) Basic quantization is divided into (2×INT_MAX+1) steps: the basic quantization step size is abs_max / INT_MAX;

[0100] 3) The corresponding step ratio table sets the step ratio q_table;

[0101] 4) The basic quantization step size is multiplied by the step size multiplier in the step size multiplier table to obtain the specific quantization step size s = q_table × abs_max / INT_MAX for each position;

[0102] 5) The coefficients are quantized accordingly: Y_quant=round(Y / s); the round function can return a value, which is the result of rounding to the specified number of decimal places.

[0103] 6) The dequantization operation is Y=Y_quant×s;

[0104] For example, a 4x4 fixed quantization table is shown in Table 1, and a 4x4 step size ratio table is shown in Table 2.

[0105] Table 1

[0106] 1 1 1 4 1 1 4 4 1 4 4 8 4 4 8 8

[0107] Table 2

[0108] 1 1 1 1 1 1 1 1 1 1 1 2 1 1 2 2

[0109] The following is a practical example to illustrate the advantages of the new integer transformation in the embodiment of the present disclosure:

[0110] Assume the following pre-configured integer matrix:

[0111]

[0112] Then we have:

[0113]

[0114] Then design:

[0115]

[0116]

[0117] Figure 5 FIG. 4 is a schematic diagram showing the data transformation result of the new integer transformation in the embodiment of the present disclosure. Figure 5 As shown, the new integer transformation provided in the embodiment of the present disclosure has the following advantages:

[0118] 1) The integer transform system with full integer operation can completely eliminate errors and improve the original performance indicators of the system;

[0119] 2) Produce more zero coefficients than traditional DCT / integer quantization, improving the compression ratio of the overall compression system;

[0120] 3) Configurable / non-unique integer quantization system, applied to multiple possible scenarios;

[0121] 4) More zero coefficients and configurable different coefficient distributions make ZigZag scanning encoding an option rather than a must. Two encoding methods are provided in the disclosed embodiment: ① encoding method without ZigZag scanning; ② encoding method with ZigZag scanning.

[0122] Based on the new integer transform provided in the embodiments of the present disclosure, a data transformation method and a data recovery method are disclosed in the embodiments of the present disclosure. A pre-configured integer matrix is ​​used to perform integer transform on the transformed data, and an inverse transform is performed on the integer transformed data, so that a full integer transform scheme can be implemented. Not only is there no floating-point expression error and quantization error, but more zero coefficients can be generated than traditional integer transform / DCT transform, effectively improving the data compression ratio and data compression efficiency.

[0123] The data conversion method and data recovery method provided in the embodiments of the present disclosure can be executed by any electronic device with computing and processing capabilities. In a data compression system, the data conversion method in the embodiments of the present disclosure can be executed by an encoding end device, and the data recovery method in the embodiments of the present disclosure can be executed by a decoding end device.

[0124] It should be noted that the electronic device that executes the data conversion method and the data recovery method in the embodiments of the present disclosure may be a terminal device or a server. The terminal device may include but is not limited to a smart phone, a tablet computer, a laptop computer, a desktop computer, a wearable device, an augmented reality device, a virtual reality device, etc.; the server may be a server that provides various services, such as a background management server that supports the device operated by the user using the terminal device. The background management server can analyze and process the received request and other data, and feed back the processing results to the terminal device.

[0125] Optionally, the client of the application installed in the terminal device is the same, or the client of the same type of application based on different operating systems. Based on the different terminal platforms, the specific form of the client of the application can also be different, for example, the application client can be a mobile client, a PC client, etc.

[0126] Optionally, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The terminal can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, which is not limited in this disclosure.

[0127] Figure 6 A flow chart of a data transformation method in an embodiment of the present disclosure is shown as follows: Figure 6 As shown, the data conversion method provided in the embodiment of the present disclosure includes the following steps:

[0128] S602, obtaining a pre-configured integer matrix, wherein the integer matrix is ​​reversible and the inverse matrix is ​​a rational number matrix.

[0129] It should be noted that the integer matrix configured in the above S602 is a reversible matrix whose elements are integers, and its inverse matrix is ​​a rational number matrix; the integer matrix can be used to perform integer transformation on the original data, and the inverse matrix of the integer matrix or the integer matrix after the inverse matrix is ​​shaped, and the data after the integer transformation is subjected to inverse integer transformation (inverse transformation), so that the original data can be completely restored. In principle, as long as the original data is integer data, the integer transformation performed on the original data is an integer transformation of full integer operation, and the inverse integer transformation performed on the data after the integer transformation is also an inverse integer transformation of full integer operation. In specific implementation, if the original data is integer data, the integer matrix is ​​directly used to perform integer transformation and inverse integer transformation on the original data; if the original data is floating-point data, the integer transformation of full integer operation is implemented on the quantized integer matrix.

[0130] S604, performing integer transformation on the data to be transformed using an integer matrix.

[0131] It should be noted that the above-mentioned data to be transformed may include but is not limited to any one of the following: image data, video data, residual data, feature data. In the disclosed embodiment, an integer matrix unrelated to DCT transformation is used to perform integer transformation on the data to be transformed, so that the form of integer transformation is not unique, and more integer transformation schemes can be provided.

[0132] Therefore, in some embodiments, when the data to be transformed is integer data, the forward transformation and inverse transformation of the integer data are both integer transformations of full integer operations. The data transformation method provided in the embodiments of the present disclosure also includes the following steps: using an integer matrix to perform an integer transformation of full integer operations on the integer data to be transformed; using an integer matrix obtained by shaping the inverse matrix of the integer matrix, performing an inverse transformation of the integer transformed data using full integer operations to restore the integer data.

[0133] In other embodiments, when the data to be transformed is floating-point data, the data transformation method provided in the embodiments of the present disclosure also includes the following steps: quantizing the floating-point data to be transformed to obtain quantized integer data; performing integer transformation of the quantized integer data using an integer matrix with full integer operations; and performing inverse transformation on the integer transformed data using an inverse matrix of the integer matrix or an integer matrix obtained by shaping the inverse matrix to restore the data before the integer transformation (i.e., the integer data obtained by quantizing the original floating-point data).

[0134] In some embodiments, when the data to be transformed is floating-point data, the data transformation method provided in the embodiments of the present disclosure further includes the following steps: using an integer matrix to transform the floating-point data to be transformed to obtain the transformed floating-point data; using an integer matrix obtained by shaping the inverse matrix of the integer matrix, inversely transforming the transformed floating-point data to restore the floating-point data before the transformation. In this embodiment, the floating-point data is directly integer transformed and inversely transformed, and the floating-point data before the integer transformation can be approximately restored.

[0135] In some embodiments, when the data to be transformed is floating-point data, the data transformation method provided in the embodiments of the present disclosure also includes the following steps: using an integer matrix to transform the floating-point data to be transformed to obtain the transformed floating-point data; quantizing the transformed floating-point data; dequantizing the quantized data; using the inverse matrix of the integer matrix or the integer matrix after the inverse matrix is ​​shaped, inverse transforming the dequantized floating-point data to restore the floating-point data before the transformation. In this embodiment, after the floating-point data is directly transformed into integers, the transformed data is quantized and dequantized, and after the inverse transformation, the floating-point data before the integer transformation can be approximately restored. It should be noted that the present disclosure does not limit the specific method of quantization and dequantization performed on the floating-point data after the integer transformation. Those skilled in the art can perform corresponding quantization and dequantization according to actual conditions to ensure that the data before the integer transformation can be restored.

[0136] In some embodiments, when the new integer transformation scheme provided in the embodiments of the present disclosure is applied to a data compression system, the data before encoding is integer transformed using the configured integer matrix at the encoding end; the data after integer transformation is compressed and encoded, so that the decoding end can completely restore the original data through inverse integer transformation after decoding the data, not only without any floating point expression error and quantization error, but also can generate more zero coefficients than the traditional integer transformation / DCT transformation, effectively improving the data compression ratio and data compression efficiency. In specific implementation, before compressing the data, the data to be compressed can be integer transformed by the above formula (8); after decoding the compressed data, the data after integer transformation can be restored by the above formula (9) or (10).

[0137] Since the data to be compressed may be integer data or floating-point data, when the data to be compressed is integer data, the new integer transformation provided in the embodiment of the present disclosure can realize full integer transformation (i.e., integer transformation of full integer operation); when the data to be compressed is floating-point data, the floating-point data can be quantized and then the new integer transformation can be performed on the quantized integer data. The specific quantization processing process has been introduced in the above content and will not be repeated here.

[0138] In some embodiments, the present disclosure can utilize Figure 7 The data recovery method shown in FIG. 1 can recover the data before the integer transformation; in other embodiments, the embodiments of the present disclosure can utilize Figure 8 The data recovery method shown recovers the data before integer transformation.

[0139] like Figure 7 As shown, the data recovery method provided in the embodiment of the present disclosure includes the following steps:

[0140] S702, obtaining data to be restored, wherein the data to be restored is data obtained by performing integer transformation on original data using an integer matrix, the integer matrix is ​​reversible and the inverse matrix is ​​a rational number matrix;

[0141] S704, using the inverse matrix of the integer matrix, inversely transform the data to be restored to restore the data before the integer transformation.

[0142] like Figure 8 As shown, the data recovery method provided in the embodiment of the present disclosure includes the following steps:

[0143] S802, obtaining data to be restored, wherein the data to be restored is data obtained by performing integer transformation on original data using an integer matrix, the integer matrix is ​​reversible and the inverse matrix is ​​a rational number matrix;

[0144] S804, using the integer matrix obtained by shaping the inverse matrix, inversely transform the data to be restored to restore the data before the integer transformation.

[0145] When the data recovery method provided by the embodiments of the present disclosure can be applied to the decoding end in the data compression system, after the decoding end receives the compressed data from the encoding end, the compressed data is decoded, and the integer matrix obtained by reshaping the inverse matrix of the integer matrix is ​​used to perform an inverse integer transform on the decoded data to completely restore the data before the integer transform. A full integer transform scheme can be implemented, which not only has no floating-point expression error and quantization error, but also can generate more zero coefficients than traditional integer transform / DCT transform, effectively improving the data compression ratio and data compression efficiency.

[0146] Based on the same inventive concept, the present disclosure also provides a data conversion device, such as the following embodiment. Since the principle of solving the problem in the device embodiment is similar to that in the above method embodiment, the implementation of the device embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.

[0147] Fig. 9 A schematic diagram of a data conversion device in an embodiment of the present disclosure is shown. Fig. 9 As shown, the device includes: a configuration module 91 and a transformation module 92.

[0148] The configuration module 91 is used to obtain a pre-configured integer matrix, wherein the integer matrix is ​​reversible and the inverse matrix is ​​a rational number matrix; the transformation module 92 is used to perform integer transformation on the data to be transformed using the integer matrix.

[0149] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above method embodiments. It should be noted that the above modules as part of the device can be executed in a computer system such as a set of computer executable instructions.

[0150] As can be seen from the above, the data transformation device provided in the embodiment of the present disclosure pre-configures a reversible integer matrix whose inverse matrix is ​​a rational number matrix through the configuration module 91; and uses the configured integer matrix to perform integer transformation on the data to be transformed through the transformation module 92. When the data to be transformed is integer data, a full integer transformation scheme can be implemented, which not only has no floating-point expression error and quantization error, but also can generate more zero coefficients than traditional integer transformation / DCT transformation, effectively improving the data compression ratio and data compression efficiency.

[0151] Based on the same inventive concept, the present disclosure also provides a data recovery device, such as the following embodiment. Since the principle of solving the problem in the device embodiment is similar to that in the above method embodiment, the implementation of the device embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.

[0152] Fig.10 A schematic diagram of a data recovery device in an embodiment of the present disclosure is shown. Fig.10 As shown, the device includes: a data acquisition module 101 and an inverse transformation module 102.

[0153] Among them, the data acquisition module 101 is used to acquire the data to be recovered, wherein the data to be recovered is the data after the original data is integer transformed using an integer matrix, the integer matrix is ​​reversible and the inverse matrix is ​​a rational number matrix; the inverse transformation module 102 is used to use the inverse matrix of the integer matrix to perform an inverse transformation on the data to be recovered to recover the data before the integer transformation.

[0154] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above method embodiments. It should be noted that the above modules as part of the device can be executed in a computer system such as a set of computer executable instructions.

[0155] In order to implement the inverse transformation of full integer operations, in some embodiments, the inverse transformation module 102 may also utilize the integer matrix obtained by shaping the inverse matrix to perform an inverse transformation on the data to be restored, so as to restore the data before the integer transformation.

[0156] As can be seen from the above, the data recovery device provided in the embodiment of the present disclosure obtains the data to be recovered through the data acquisition module 101, and uses the inverse matrix of the integer matrix or the integer matrix after the inverse matrix is ​​shaped through the inverse transformation module 102 to perform an inverse integer transformation on the data to be recovered, so as to completely restore the original data.

[0157] Based on the same inventive concept, the present disclosure also provides an image compression system, such as the following embodiment. Since the principle of solving the problem in the system embodiment is similar to that in the above method embodiment, the implementation of the system embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.

[0158] Fig.11 A schematic diagram of an image compression system in an embodiment of the present disclosure is shown. Fig.11 As shown, the image compression system 11 includes: a first encoding module 111 and a first decoding module 112 .

[0159] Among them, the first encoding module 111 is used to obtain a pre-configured integer matrix and use the integer matrix to perform integer transformation on the image data, wherein the integer matrix is ​​reversible and the inverse matrix is ​​a rational number matrix; the first decoding module 112 is used to use the inverse matrix of the integer matrix or the integer matrix after the inverse matrix is ​​shaped, to perform inverse transformation on the data after the integer transformation, and restore the image data before the integer transformation.

[0160] It should be noted that, depending on different specific application scenarios, the first encoding module 111 and the first decoding module 112 may be deployed on the same device or on different devices, and the present disclosure does not make any specific limitation on this.

[0161] In some embodiments, the first encoding module 111 is also used to: encode the data after integer transformation, and transmit the encoded data to the first decoding module 112; the first decoding module 112 is also used to decode the data from the first encoding module 111, using the inverse matrix of the integer matrix or the integer matrix after shaping the inverse matrix, to inverse transform the decoded data to restore the data before the integer transformation.

[0162] In some embodiments, the first encoding module 111 adopts an encoding method that performs ZigZag scanning or an encoding method that does not perform ZigZag scanning.

[0163] Based on the same inventive concept, the present disclosure also provides a feature compression system, such as the following embodiment. Since the principle of solving the problem in the system embodiment is similar to that in the above method embodiment, the implementation of the system embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.

[0164] Fig.12 A schematic diagram of a feature compression system in an embodiment of the present disclosure is shown. Fig.12 As shown, the image compression system 12 includes: a second encoding module 121 and a second decoding module 122 .

[0165] Among them, the second encoding module 121 is used to obtain a pre-configured integer matrix and use the integer matrix to perform integer transformation on the feature data, wherein the integer matrix is ​​reversible and the inverse matrix is ​​a rational number matrix; the second decoding module 122 is used to use the inverse matrix of the integer matrix or the integer matrix after the inverse matrix is ​​shaped, to perform inverse transformation on the data after the integer transformation, and restore the data before the integer transformation.

[0166] It should be noted that the above-mentioned feature data may be, but is not limited to, feature data obtained by extracting features from an image using a convolutional neural network (CNN) model. Depending on the specific application scenario, the above-mentioned second encoding module 121 and second decoding module 122 may be deployed on the same device or on different devices, and the present disclosure does not make specific limitations on this.

[0167] In some embodiments, the second encoding module 121 is also used to: encode the data after the integer transformation, and transmit the encoded data to the second decoding module 122; the second decoding module 122 is also used to decode the data from the second encoding module 121, using the inverse matrix of the integer matrix or the integer matrix after shaping the inverse matrix, to inverse transform the decoded data to restore the data before the integer transformation.

[0168] In some embodiments, the second encoding module 121 adopts an encoding method that performs ZigZag scanning or an encoding method that does not perform ZigZag scanning.

[0169] In some embodiments, the second encoding module 121 is also used to quantize the feature data, and use an integer matrix to perform an integer transformation of the quantized feature data using a full integer operation; the second decoding module 122 is also used to use the integer matrix after shaping the inverse matrix to perform an inverse transformation of the integer transformed data using a full integer operation, and perform inverse quantization on the inverse transformed data to obtain the original feature data.

[0170] In some embodiments, the second encoding module 121 is also used to perform integer transformation on the feature data and to quantize the feature data after the integer transformation; the second decoding module 122 is also used to perform inverse quantization on the quantized feature data, using the inverse matrix of the integer matrix or the integer matrix after the inverse matrix is ​​shaped, to perform inverse transformation on the inverse quantized data to obtain the original feature data.

[0171] Based on the same inventive concept, the present disclosure also provides a residual compression system, such as the following embodiment. Since the principle of solving the problem in the system embodiment is similar to that in the above method embodiment, the implementation of the system embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.

[0172] Fig.13 A schematic diagram of a residual compression system in an embodiment of the present disclosure is shown as follows: Fig.13 As shown, the residual compression system 13 includes: a third encoding module 131 and a third decoding module 132 .

[0173] Among them, the third encoding module 131 is used to obtain a pre-configured integer matrix and use the integer matrix to perform integer transformation on the residual data, wherein the integer matrix is ​​reversible and the inverse matrix is ​​a rational number matrix; the third decoding module 132 is used to use the inverse matrix of the integer matrix or the integer matrix after the inverse matrix is ​​shaped, to perform inverse transformation on the data after the integer transformation, and restore the data before the integer transformation.

[0174] It should be noted that, depending on the specific application scenario, the third encoding module 131 and the third decoding module 132 may be deployed on the same device or on different devices, and the present disclosure does not make any specific limitation on this.

[0175] In some embodiments, the third encoding module 131 is also used to: encode the data after integer transformation, and transmit the encoded data to the third decoding module 132; the third decoding module 132 is also used to decode the data from the third encoding module 131, using the inverse matrix of the integer matrix or the integer matrix after shaping the inverse matrix, to inverse transform the decoded data, and restore the data before the integer transformation.

[0176] In some embodiments, the third encoding module 131 adopts an encoding method that performs ZigZag scanning or an encoding method that does not perform ZigZag scanning.

[0177] The new integer transformation scheme provided in the embodiments of the present disclosure can be applied to many scenarios. Several specific examples are listed below:

[0178] Embodiment 1:

[0179] Encoding side:

[0180] Step 1: Divide the image into 4x4 blocks XF M_16

[0181] Step 2: Perform a 4x4 integer transform on each 16-block to obtain YF 32_1 =IXF M_16 I T ;

[0182] in,

[0183]

[0184] Step 3: The obtained coefficient YF 32_1 Direct entropy coding.

[0185] Decoding side:

[0186] Step 1: Entropy decode the data to get YF 32_2 ;

[0187] Step 2: Use the following formula to calculate YF 32_2 Perform inverse integer transform to get the original image 4x4 block XF M_16 ;

[0188]

[0189]

[0190]

[0191]

[0192] Among them, F represents the inverse matrix of I, which is a rational number matrix; N represents an integer matrix with the same dimension as F, each element is n; n is a positive integer.

[0193] Embodiment 2:

[0194] Encoding side:

[0195] Step 1: The image passes through the CNN feature extraction network to obtain the feature F 32_1

[0196] Step 2: Preliminary feature preprocessing, forcing the feature to be 0.0 as the midpoint, with positive and negative distribution on the left and right

[0197] Feature maximum value f_max=max(F 32_1 );

[0198] Feature maximum value f_min=min(F 32_1 );

[0199] Feature offset f_offset = (f_max + f_min) / 2;

[0200] F 32_1 =F 32_1 -f_offset;

[0201] Step 3: Find F 32_1 The maximum absolute value of abs_max = max(abs(f_max), abs(f_min))

[0202] Step 4: Set INT_MAX to 227, then the number of quantization steps is 2×227+1, and the quantization step size is b=abs_max / 227;

[0203] Step 5: Quantify the feature data I 32_1 =round(F 32_1 / b);

[0204] Step 6: Shape the features into (-1,16) dimensions to get XI M_16

[0205] Step 7: Perform a 4x4 integer transform on each 16-block to obtain YI 32_1 =IXI M_16 I T ;

[0206] Step 8: Seek YI 32_1The maximum absolute value of abs_max_2 = max(abs(YI 32_1 ));

[0207] Step 9: Set INT_MAX_2 to 4, then the quantization steps are 1+2×128, and the basic quantization step is b_2=abs_max_2 / 4;

[0208] Step 10: Set q_table as shown in Table 3;

[0209] Table 3

[0210] 1 1 1 1 1 1 1 2 1 1 2 2 1 2 2 2

[0211] Step 11: For each position coefficient of 4x4, the quantization step size is s_2 = q_table × b_2;

[0212] Step 12: Perform a second quantization of the feature data YI 32_1 =round(YI 32_1 / s_2), further narrowing the data range;

[0213] Decoding side:

[0214] Step 1: Dequantize the secondary quantized data 32_2 =YI 32_2 ×s_2;

[0215] Step 2: Perform an inverse integer transform on the data:

[0216]

[0217] Where F is the inverse matrix of I, which is a floating point rational number, n is a positive integer, and N is a matrix with the same dimension as F, each element of which is an integer n;

[0218] Step 3: Features XI M_16 Reshape back to original size to get I 32_2 ;

[0219] Step 4: Dequantization transformation: F 32_2 =I 32_2 ×b;

[0220] Step 5: F 32_2 =F 32_2 +f_offset.

[0221] Embodiment 3:

[0222] Encoding side:

[0223] Step 1: The image passes through the CNN feature extraction network to obtain the feature F 32_1 ;

[0224] Step 2: Find the maximum and minimum values ​​of the feature, where the maximum value f_max = max(F 32_1 ); minimum value f_min=min(F 32_1 );

[0225] Step 3: Set INT_MAX to 27, then the number of quantization steps is 27, and the quantization step size is b = (f_max-f_min) / 27;

[0226] Step 4: Quantify the feature data 32_1 =round((F 32_1 -f_min) / b);

[0227] Step 5: Shape the features into (-1,16) dimensions to get XI M_16 ;

[0228] Step 6: Perform a 4x4 integer transform on each 16-block to obtain YI 32_1 =IXI M_16 I T ;

[0229] Step 7: Directly entropy encode the coefficients.

[0230] Decoding side:

[0231] Step 1: YI the data 32_2 Perform an inverse integer transform:

[0232]

[0233] Where F is the inverse matrix of I, which is a floating point rational number, n is a positive integer, and N is a matrix with the same dimension as F, each element of which is an integer n;

[0234] Step 2: Features XI M_16 Reshape back to original size to get I 32_2 ;

[0235] Step 3: Dequantization transformation F 32_2 =fmin+I 32_2 ×b;

[0236] Embodiment 4:

[0237] Encoding side:

[0238] Step 1: The image passes through the CNN feature extraction network to obtain the feature F 32_1 ;

[0239] Step 2: Preliminary feature preprocessing, forcing the feature to start at 0.0 and only positively distribute f_min=min(F 32_1 );F 32_1 =F 32_1 -f_min;

[0240] Step 3: Find F 32_1 The maximum value of abs_max=max(F 32_1 );

[0241] Step 4: Set INT_MAX to 28, then the quantization steps are 28, and the quantization step size is b = abs_max / 28;

[0242] Step 5: Quantify the feature data I 32_1 =round(F 32_1 / b);

[0243] Step 6: Shape the features into (-1,64) dimensions to get XI M_64 ;

[0244] Step 7: Perform 8x8 integer transformation on each 64-bit block to obtain YI 32_1 =IXI M_64 I T ;

[0245] Step 8: Set the fixed quantization table q_table, as shown in Table 4;

[0246] Table 4

[0247] 7 7 10 19 40 40 40 40 7 8 10 26 40 40 40 40 10 10 22 40 40 40 40 40 19 26 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40

[0248] Step 9: Perform a second quantization of the feature data YI 32_1 =round(YI 321 / q_table) to further narrow the data range.

[0249] Decoding side:

[0250] Step 1: Dequantize the secondary quantized data 32_2 =YI 32_2 ×q_table;

[0251] Step 2: Perform an inverse integer transform on the data:

[0252]

[0253] Where F is the inverse matrix of I, which is a floating point rational number, n is a positive integer, and N is a matrix with the same dimension as F, each element of which is an integer n;

[0254] Step 3: Features XI M_64 Reshape back to original size to get I 32_2 ;

[0255] Step 4: Dequantization transformation F 32_2 =I 32_2 ×b;

[0256] Step 5: F 32_2 =F 32_2 +f_min.

[0257] Embodiment 5:

[0258] Encoding side:

[0259] Step 1: The image passes through the CNN feature extraction network to obtain the feature F 32_1 ;

[0260] Step 2: Shape the features into (-1,16) dimensions to get XI M_16 ;

[0261] Step 3: Perform a 4x4 integer transformation on each 16-block to obtain YI 32_1 =IXI M_16 I T , the coefficients obtained in this example are also floating point values;

[0262] Step 4: Set INT_MAX to 2 5 , then the quantization steps are 1+2×2 5 , the basic quantization step size is b = abs_max / 2 5 ; q_table is set as shown in Table 5, b2 = b × q_table;

[0263] Table 5

[0264] 1 1 1 1 1 1 1 2 1 1 2 2 1 2 2 2

[0265] Step 5: Quantify the feature data I 32_1 =round(YI 321 / b2);

[0266] Step 6: Quantize the feature data I 32_1 Entropy coding.

[0267] Decoding side:

[0268] Step 1: Data I 32_2 Dequantize to get integer transform coefficients, which are floating-point values:

[0269] YI 32_2 =I 32_1 ×b2;

[0270] XI M_16 =FYI 32_2 F T ;

[0271] Wherein, F is the inverse matrix of I, which is a floating point rational number;

[0272] Step 2: Features XI M_16 Reshape back to original size to get I 32_2 ;

[0273] Step 3: Dequantization transformation F 32_2 =fmin+I 32_2 ×b;

[0274] Embodiment 6:

[0275] Encoding side:

[0276] Step 1: Estimate the image and get the residual I 32_1 ;

[0277] Step 2: Quantize the residual and complete 8x8 blocks to get XI M_64 ;

[0278] Step 3: Perform an 8x8 integer transform on each 64-bit block to get:

[0279] YI 32_1 =IXI M_64 I T ;

[0280] Step 4: zigzag coding + other entropy coding;

[0281] Decoding side:

[0282] Step 1: Other entropy decoding + zigzag decoding of the encoded data;

[0283] Step 2: Perform inverse integer transformation:

[0284]

[0285] Where F is the inverse matrix of I, which is a floating point rational number, n is a positive integer, and N is a matrix with the same dimension as F, each element of which is an integer n;

[0286] Step 3: Dequantize the residual to get the residual I 32_2 .

[0287] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0288] Refer to the following Fig.14 1400 according to this embodiment of the present disclosure is described. Fig.14 The electronic device 1400 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0289] like Fig.14 As shown, the electronic device 1400 is in the form of a general computing device. The components of the electronic device 1400 may include but are not limited to: at least one processing unit 1410, at least one storage unit 1420, and a bus 1430 connecting different system components (including the storage unit 1420 and the processing unit 1410).

[0290] The storage unit stores program codes, which can be executed by the processing unit 1410, so that the processing unit 1410 executes the steps described in the above “exemplary method” section of this specification according to various exemplary embodiments of the present disclosure.

[0291] When the electronic device 1400 is an encoding end device, the processing unit 1410 can execute the following steps of the above method embodiment: obtain a pre-configured integer matrix; use the integer matrix to perform integer transformation on the data to be compressed; encode the data to be compressed after the integer transformation to obtain compressed data.

[0292] When the electronic device 1400 is a decoding end device, the processing unit 1410 can execute the following steps of the above method embodiment: obtaining compressed data, wherein the compressed data is data obtained by performing an integer transformation on the original data using a preconfigured integer matrix and encoding the data after the integer transformation; decoding the compressed data, performing an inverse integer transformation on the decoded data using an inverse matrix of the integer matrix, and restoring the original data.

[0293] The storage unit 1420 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 14201 and / or a cache storage unit 14202 , and may further include a read-only storage unit (ROM) 14203 .

[0294] The storage unit 1420 may also include a program / utility 14204 having a set (at least one) of program modules 14205, such program modules 14205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0295] Bus 1430 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0296] The electronic device 1400 may also communicate with one or more external devices 1440 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1400, and / or communicate with any device that enables the electronic device 1400 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1450. Furthermore, the electronic device 1400 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 1460. As shown, the network adapter 1460 communicates with other modules of the electronic device 1400 via a bus 1430. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0297] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0298] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, which may be a readable signal medium or a readable storage medium. A program product capable of implementing the above method of the present disclosure is stored thereon. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary implementations of the present disclosure described in the above “Exemplary Method” section of this specification.

[0299] More specific examples of computer-readable storage media in the present disclosure may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0300] In the present disclosure, a computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0301] Alternatively, the program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0302] In a specific implementation, the program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).

[0303] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0304] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0305] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0306] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.

Claims

1. A data transformation method, characterized in that: include: Obtain a preconfigured integer matrix, wherein the integer matrix is ​​reversible and the inverse matrix is ​​a rational number matrix; Performing integer transformation on the data to be transformed using the integer matrix; The data to be transformed includes at least one of the following: image data, video data, residual data in the image / video processing process, and feature data in the image / video processing process; Wherein, the method further comprises: Using the inverse matrix of the integer matrix or the integer matrix obtained by shaping the inverse matrix of the integer matrix, inversely transform the data after the integer transformation to restore the data before the integer transformation; The step of reshaping the inverse matrix of the integer matrix includes: calculating the Kronecker product of the inverse matrix and an integer matrix of the same dimension to obtain a reshaped inverse matrix.

2. The data conversion method according to claim 1, characterized in that: The data to be transformed is transformed into integers using the following formula: Y=IXI T ; Wherein, Y represents the data after the integer transformation; X represents the data before the integer transformation, that is, the data before the integer transformation; I represents a pre-configured reversible integer matrix whose inverse matrix is ​​a rational number matrix; I T Represents the transposed matrix of I.

3. The data conversion method according to claim 2, characterized in that: The data after integer transformation is inversely transformed by the following formula to restore the data before integer transformation: X=FYF T ; Among them, F represents the inverse matrix of I, which is a rational number matrix; F T represents the transposed matrix of F.

4. The data conversion method according to claim 2, characterized in that: The data after integer transformation is inversely transformed by the following formula to restore the data before integer transformation: Where, F represents the inverse matrix of I, which is a rational number matrix; N represents an integer matrix with the same dimension as F, each element is n; n is a positive integer; represents the Kronecker product of F and N, which is an integer matrix; express The transposed matrix of .

5. The data conversion method according to claim 1, characterized in that: The data to be transformed is an integer data, and both the forward transformation and the inverse transformation of the integer data are integer transformations of full integer operations. The method further includes: Integer transformation using integer matrices to perform full integer operations on the integer data to be transformed; The integer matrix obtained by shaping the inverse matrix of the integer matrix is ​​used to perform an inverse transformation of the full integer operation on the data after the integer transformation to restore the shaped data.

6. The data conversion method according to claim 1, characterized in that: The data to be transformed is floating point data, and the method further comprises: Quantize the floating-point data to be transformed to obtain quantized integer data; integer transformation using integer matrices to perform full integer operations on quantized integer data; The data after the integer transformation are inversely transformed by using the integer matrix obtained by shaping the inverse matrix of the integer matrix to restore the data before the integer transformation.

7. The data conversion method according to claim 1, characterized in that: The data to be transformed is floating point data, and the method further comprises: Transforming the floating-point data to be transformed by using an integer matrix to obtain transformed floating-point data; The transformed floating-point data are inversely transformed using the inverse matrix of the integer matrix or an integer matrix obtained by shaping the inverse matrix of the integer matrix to restore the floating-point data before the transformation.

8. The data conversion method according to claim 1, characterized in that: The data to be transformed is floating point data, and the method further comprises: Transforming the floating-point data to be transformed by using an integer matrix to obtain transformed floating-point data; Quantize the floating-point data after integer transformation; Dequantize the quantized data; The inverse matrix of the integer matrix or the integer matrix obtained by shaping the inverse matrix is ​​used to perform inverse transformation on the dequantized floating-point data to restore the floating-point data before the integer transformation.

9. A data recovery method, characterized in that: include: Acquire data to be restored, wherein the data to be restored is data obtained by performing integer transformation on original data using an integer matrix, the integer matrix is ​​reversible and the inverse matrix is ​​a rational number matrix; Using the inverse matrix of the integer matrix or the integer matrix obtained by shaping the inverse matrix of the integer matrix, inversely transform the data to be restored to restore the data before the integer transformation; The original data includes at least one of the following: image data, video data, residual data in the image / video processing process, and feature data in the image / video processing process; The step of reshaping the inverse matrix of the integer matrix includes: calculating the Kronecker product of the inverse matrix and an integer matrix of the same dimension to obtain a reshaped inverse matrix.

10. A data conversion device, characterized in that: include: A configuration module, used for obtaining a pre-configured integer matrix, wherein the integer matrix is ​​reversible and the inverse matrix is ​​a rational number matrix; A transformation module, used for performing integer transformation on the data to be transformed using the integer matrix; The data to be transformed includes at least one of the following: image data, video data, residual data in the image / video processing process, and feature data in the image / video processing process; Wherein, the data conversion device also includes: An inverse transformation module, used to perform an inverse transformation on the data after the integer transformation by using the inverse matrix of the integer matrix or the integer matrix obtained by shaping the inverse matrix of the integer matrix, so as to restore the data before the integer transformation; The inverse transformation module is further used to calculate the Kronecker product of the inverse matrix and an integer matrix of the same dimension to obtain a shaped inverse matrix.

11. A data recovery device, characterized in that: include: A data acquisition module, used for acquiring data to be restored, wherein the data to be restored is data obtained by performing integer transformation on original data using an integer matrix, the integer matrix is ​​reversible and the inverse matrix is ​​a rational number matrix; An inverse transformation module, used to perform an inverse transformation on the data to be restored by using an inverse matrix of the integer matrix or an integer matrix obtained by shaping the inverse matrix of the integer matrix, so as to restore the data before the integer transformation; The original data includes at least one of the following: image data, video data, residual data in the image / video processing process, and feature data in the image / video processing process; The inverse transformation module is further used to calculate the Kronecker product of the inverse matrix and an integer matrix of the same dimension to obtain a shaped inverse matrix.

12. An image compression system, characterized in that: include: A first encoding module and a first decoding module; The first encoding module is used to obtain a pre-configured integer matrix, and use the integer matrix to perform integer transformation on the image data, wherein the integer matrix is ​​reversible and the inverse matrix is ​​a rational number matrix; The first decoding module is used to perform an inverse transformation on the data after the integer transformation by using the inverse matrix of the integer matrix or the integer matrix obtained by shaping the inverse matrix, so as to restore the image data before the integer transformation; The first decoding module is further used to calculate the Kronecker product of the inverse matrix and an integer matrix of the same dimension to obtain a reshaped inverse matrix.

13. The image compression system according to claim 12, characterized in that: The first encoding module is also used to: encode the data after integer transformation and transmit the encoded data to the first decoding module; the first decoding module is also used to decode the data from the first encoding module, use the inverse matrix of the integer matrix or the integer matrix after shaping the inverse matrix, perform inverse transformation on the decoded data, and restore the data before the integer transformation.

14. The image compression system according to claim 13, characterized in that: The first encoding module adopts an encoding method that performs ZigZag scanning or an encoding method that does not perform ZigZag scanning.

15. A feature compression system, characterized in that: include: a second encoding module and a second decoding module; The second encoding module is used to obtain a pre-configured integer matrix, and use the integer matrix to perform integer transformation on the feature data in the image / video processing process, wherein the integer matrix is ​​reversible and the inverse matrix is ​​a rational number matrix; The second decoding module is used to perform an inverse transformation on the data after the integer transformation by using the inverse matrix of the integer matrix or the integer matrix obtained by shaping the inverse matrix, so as to restore the data before the integer transformation; The second decoding module is further used to calculate the Kronecker product of the inverse matrix and an integer matrix of the same dimension to obtain a reshaped inverse matrix.

16. The feature compression system according to claim 15, characterized in that: The second encoding module is also used to: encode the data after integer transformation and transmit the encoded data to the second decoding module; the second decoding module is also used to decode the data from the second encoding module, using the inverse matrix of the integer matrix or the integer matrix after shaping the inverse matrix, to inverse transform the decoded data to restore the data before the integer transformation.

17. The feature compression system according to claim 16, characterized in that: The second encoding module adopts an encoding method of performing ZigZag scanning or an encoding method of not performing ZigZag scanning.

18. The feature compression system according to claim 15, characterized in that: The second encoding module is also used to quantize the feature data, and use the integer matrix to perform integer transformation of full integer operations on the quantized feature data; the second decoding module is also used to use the integer matrix obtained by shaping the inverse matrix to perform inverse transformation of the integer transformed data with full integer operations, and perform inverse quantization on the inverse transformed data to obtain the original feature data.

19. The feature compression system according to claim 15, characterized in that: The second encoding module is also used to perform integer transformation on the feature data and quantize the feature data after the integer transformation; the second decoding module is also used to perform inverse quantization on the quantized feature data, using the inverse matrix of the integer matrix or the integer matrix after the inverse matrix is ​​shaped, to inverse transform the inverse quantized data to obtain the original feature data.

20. A residual compression system, characterized in that: include: A third encoding module and a third decoding module; The third encoding module is used to obtain a pre-configured integer matrix, and use the integer matrix to perform integer transformation on residual data in the image / video processing process, wherein the integer matrix is ​​reversible and the inverse matrix is ​​a rational number matrix; The third decoding module is used to perform an inverse transformation on the data after the integer transformation by using the inverse matrix of the integer matrix or the integer matrix obtained by shaping the inverse matrix, so as to restore the data before the integer transformation; The third decoding module is further used to calculate the Kronecker product of the inverse matrix and an integer matrix of the same dimension to obtain a reshaped inverse matrix.

21. The residual compression system according to claim 20, characterized in that: The third encoding module is also used to: encode the data after integer transformation and transmit the encoded data to the third decoding module; the third decoding module is also used to decode the data from the third encoding module, use the inverse matrix of the integer matrix or the integer matrix after shaping the inverse matrix, perform inverse transformation on the decoded data, and restore the data before the integer transformation.

22. The residual compression system according to claim 20, characterized in that: The third encoding module adopts an encoding method of performing ZigZag scanning or an encoding method of not performing ZigZag scanning.

23. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to execute the data transformation method according to any one of claims 1 to 8, or the data recovery method according to claim 9, by executing the executable instructions.

24. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the computer program implements the data conversion method described in any one of claims 1 to 8 or the data recovery method described in claim 9.