A data processing method, device, equipment and medium

By determining the feature map in the image processing model, calculating the residual data and processing the symbol value of the feature map, generating and saving the coded data, the problem of excessive storage requirements for deep network feature maps is solved, and efficient feature map preservation is achieved.

CN114697657BActive Publication Date: 2025-03-25GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011560226.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-25
Publication Date
2025-03-25
Estimated Expiration
2040-12-25

AI Technical Summary

Technical Problem

In the image processing model, as the network level increases, the number of feature maps and storage requirements also increase significantly, resulting in excessive storage space and low storage efficiency.

Method used

By obtaining the pixel points in the feature map to be compressed, the target feature value interval, residual data and symbol values ​​are determined based on their feature values ​​and saved feature value intervals, and then encoded data is generated and saved.

Benefits of technology

It effectively reduces the storage space requirements of feature maps, improves the storage efficiency, and realizes lossless compression and storage of feature maps.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114697657B_ABST
    Figure CN114697657B_ABST
Patent Text Reader

Abstract

The present invention discloses a data processing method, device, equipment and medium. When a feature map to be compressed is saved, a target feature value interval where the feature value is located is determined according to the feature value of the pixel point contained in the feature map to be compressed and the saved feature value interval, residual data corresponding to the pixel point is determined according to the feature value of the pixel point and the identification value corresponding to the target feature value interval, a target symbol value is determined according to the positive or negative of the feature value, and the corresponding encoding data of the pixel point is determined and saved according to the target symbol value, the identification value and the residual data, thereby realizing the saving of the feature map to be compressed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a data processing method, device, equipment and medium. Background Art

[0002] With the development of computer technology, image processing models have been widely used, for example, target detection and target recognition through image processing models. In order to improve the recognition accuracy of image processing models, the model structure of image processing models is generally developed to a deeper network level. Although this method can improve the recognition accuracy of image processing models, for some technologies that use image processing models for image processing, the method of increasing the network level also brings many disadvantages.

[0003] When performing image processing through an image processing model, multiple feature maps may be generated in each network layer of the image processing model. Feature maps are the data with the largest number of accesses by the image processing model during the image processing process. The image processing model needs to set up a special storage space to facilitate the storage of each feature value in each feature map. Summary of the invention

[0004] The embodiments of the present invention provide a data processing method, apparatus, device and medium, which are used to provide a method for storing a feature map.

[0005] An embodiment of the present invention provides a data processing method, the method comprising:

[0006] Obtaining pixel points contained in the feature map to be compressed; wherein the feature map to be compressed is output by the target network layer in the image processing model;

[0007] Determine, according to the characteristic value of the pixel point and the saved characteristic value interval, a target characteristic value interval in which the characteristic value is located;

[0008] Determining residual data corresponding to the pixel point according to the characteristic value of the pixel point and the identification value corresponding to the target characteristic value interval;

[0009] Determine the target symbol value corresponding to the positive and negative of the eigenvalue;

[0010] According to the target symbol value, the identification value and the residual data, the encoding data corresponding to the pixel point is determined and saved.

[0011] An embodiment of the present invention provides a data processing device, the device comprising:

[0012] An acquisition unit, used to acquire pixel points contained in a feature map to be compressed; wherein the feature map to be compressed is output by a target network layer in an image processing model;

[0013] A processing unit is used to determine the target eigenvalue interval where the eigenvalue is located based on the eigenvalue of the pixel point and the saved eigenvalue interval; determine the residual data corresponding to the pixel point based on the eigenvalue of the pixel point and the identification value corresponding to the target eigenvalue interval; determine the target symbol value corresponding to the positive and negative of the eigenvalue; determine and save the coded data corresponding to the pixel point based on the target symbol value, the identification value and the residual data.

[0014] An embodiment of the present invention provides an electronic device, which includes at least a processor and a memory, and the processor is used to implement the steps of the data processing method described above when executing a computer program stored in the memory.

[0015] An embodiment of the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program implements the steps of the data processing method described above when executed by a processor.

[0016] When saving the feature map to be compressed, determine the target feature value interval where the feature value is located according to the feature value of the pixel points contained in the feature map to be compressed and the saved feature value interval, determine the residual data corresponding to the pixel point according to the feature value of the pixel point and the identification value corresponding to the target feature value interval, determine the target symbol value according to the positive or negative of the eigenvalue, and determine and save the corresponding encoding data of the pixel point according to the target symbol value, identification value and residual data, thereby realizing the saving of the feature map to be compressed. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0018] Figure 1 A schematic diagram of a data processing process provided by an embodiment of the present invention;

[0019] Figure 2 A schematic diagram of the distribution of characteristic values ​​of a pixel point provided by an embodiment of the present invention;

[0020] Figure 3 A schematic diagram of a specific data processing flow provided by an embodiment of the present invention;

[0021] Figure 4 A schematic diagram of a specific Huffman symbol sequence for determining pixel points provided by an embodiment of the present invention;

[0022] Figure 5 A schematic diagram of the structure of a data processing device provided by an embodiment of the present invention;

[0023] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0025] In order to save the feature map to be compressed output by the target network layer in the image processing model, the embodiments of the present invention provide a data processing method, device, equipment and medium.

[0026] Embodiment 1:

[0027] Figure 1 A schematic diagram of a data processing process provided by an embodiment of the present invention, the process includes:

[0028] S101: Obtain pixel points contained in a feature map to be compressed; wherein the feature map to be compressed is output by a target network layer in an image processing model.

[0029] The data processing method provided by the embodiment of the present invention is applied to an electronic device, which may be a smart device or a server.

[0030] In the actual application process, in order to improve the accuracy of the obtained image processing results as much as possible, the recognition accuracy of the image processing model is generally improved by continuously increasing the network layers in the image processing model. However, this method will increase the number of feature maps generated by each network layer in the image processing model, and the feature map is the most accessed data in the image processing model during the image processing process. It is necessary to save the feature maps generated by each network layer. How to save each feature map is a technical problem that needs to be solved urgently.

[0031] In the embodiment of the present invention, after any image to be processed is input into the image processing model, the features in the image to be processed can be extracted to different degrees through the target network layer in the image processing model, thereby outputting at least one feature map. Each feature map is determined as a feature map to be compressed, and corresponding processing is performed based on the pixels contained in any feature map to be compressed to achieve the preservation of the feature map to be compressed.

[0032] Among them, the network layers in the image processing model that can output feature maps can be determined as target network layers.

[0033] S102: Determine a target eigenvalue interval in which the eigenvalue is located according to the eigenvalue of the pixel point and the saved eigenvalue interval.

[0034] S103: Determine residual data corresponding to the pixel point according to the characteristic value of the pixel point and the identification value corresponding to the target characteristic value interval.

[0035] In actual application scenarios, in order to ensure that the characteristic value of each pixel point contained in the feature map can record more features, a larger number of data bits are generally used to represent the characteristic value of each pixel point contained in the feature map, such as 8bit, 16bit. If the characteristic value of each pixel point is directly saved to save the feature map, a large amount of storage space is required to save the characteristic value of each pixel point. Therefore, in order to save the space occupied by storing the feature map, in an embodiment of the present invention, a characteristic value interval is saved. When any pixel point contained in the feature map to be compressed is obtained, the target characteristic value interval where the characteristic value is located can be determined based on the characteristic value of the pixel point and the saved characteristic value interval, so that the absolute value of the characteristic value of the pixel point can be roughly represented by the identification value corresponding to the target characteristic value interval.

[0036] The upper threshold value X of the target feature value interval and the lower threshold value Y of the target feature value interval should meet the following conditions with the feature value of the pixel:

[0037] Y≤w abs <X;

[0038] Among them, w abs Indicates the absolute value of the feature value of the pixel.

[0039] Then, according to the characteristic value of the pixel point and the identification value corresponding to the saved target characteristic value interval, corresponding processing is performed to determine the residual data corresponding to the pixel point, that is, the difference between the identification value and the absolute value of the characteristic value of the pixel point, so that the absolute value of the characteristic value of the pixel point can be determined subsequently according to the identification value of the target characteristic value interval and the residual data.

[0040] Among them, when setting each eigenvalue interval, the following conditions should be met:

[0041] 1. The value ranges of each eigenvalue interval do not intersect with each other, that is, any eigenvalue interval does not contain the values ​​contained in other eigenvalue intervals.

[0042] For example, each eigenvalue interval is [4, 8), [8, 16), [16, 32).

[0043] Second, the value intervals of two eigenvalue intervals with adjacent identification values ​​are continuous, that is, in two eigenvalue intervals with adjacent identification values, the maximum value in the eigenvalue interval with the smaller identification value is the minimum value in the eigenvalue interval with the larger identification value. For example, the eigenvalue interval of the identification value of 3 is [4, 8), and the eigenvalue interval of the identification value of 4 is [8, 16).

[0044] 3. The difference between the maximum value and the minimum value in each eigenvalue interval can be the same or different.

[0045] For example, the difference between the maximum value 8 and the minimum value 4 in the eigenvalue interval [4, 8) is 4, the difference between the maximum value 16 and the minimum value 8 in the eigenvalue interval [8, 16) is 8, and the difference between the maximum value 32 and the minimum value 16 in the eigenvalue interval [16, 32) is 16.

[0046] 4. In order to ensure that the target eigenvalue interval of any eigenvalue can be determined, the total value range determined by the value range corresponding to each eigenvalue interval is larger than the value range determined by the minimum and maximum possible absolute values ​​of the eigenvalues.

[0047] For example, the eigenvalue is preset to 8-bit data, that is, the value range of the eigenvalue is [-128, 127], then the value range of the absolute value of the eigenvalue is [0, 128], and the total value range corresponding to each pre-configured eigenvalue interval should be greater than the value range [0, 128].

[0048] S104: Determine the target symbol value corresponding to the positive or negative of the eigenvalue.

[0049] In actual application scenarios, eigenvalues ​​are positive or negative, and the sign value of the target eigenvalue interval based on the above embodiment and the residual data can only represent the numerical value in the eigenvalue, that is, the absolute value of the eigenvalue. Therefore, in order to achieve lossless preservation of the feature map, in an embodiment of the present invention, the correspondence between positive and negative and the sign value is pre-configured. For example, the sign value corresponding to the positive value is 0, and the sign value corresponding to the negative value is 1. After obtaining the eigenvalues ​​of the pixels contained in the feature map to be compressed, the target symbol value corresponding to the positive and negative of the eigenvalue can be determined according to the pre-configured correspondence between the positive and negative and the sign value.

[0050] In the embodiment of the present invention, the execution order of S104 and the above S102-S103 is not limited to S104 being executed after S102-S103, S104 can also be executed before S102-S103, S104 can even be executed between S102-S103, that is, after S102 is executed, S104 is executed, and finally S103 is executed. The specific implementation process can be flexibly set according to actual needs, and is not specifically limited here.

[0051] S105: Determine and save the coded data corresponding to the pixel point according to the target symbol value, the identification value and the residual data.

[0052] After obtaining the identification value, target symbol value and residual data corresponding to a certain pixel point contained in the feature map to be compressed based on the above embodiment, the size of the feature value of the pixel point can be represented according to the identification value, target symbol value and residual data. Based on the identification value, target symbol value and residual data, corresponding processing is performed to determine and save the encoding data corresponding to the pixel point. When it is determined that the encoding data of each pixel point contained in the feature map to be compressed is saved, it can be determined that the feature map to be compressed is compressed and saved.

[0053] It should be noted that the steps in S101 to S105 are steps that need to be executed for any pixel point included in the feature map to be compressed.

[0054] In a possible implementation, the above steps S102 to S105 may be performed for each pixel included in the feature map to be compressed, thereby stream encoding and saving the feature value of each pixel included in the feature map to be compressed.

[0055] In another possible implementation, a non-streaming method may be used to determine the encoding data corresponding to each pixel point included in the feature map to be compressed. For example, after the target feature value intervals corresponding to each pixel point included in the feature map to be compressed are determined respectively through steps S101 to S102, the subsequent steps S103 to S105 are executed for each pixel point included in the feature map to be compressed; or, after the residual data corresponding to each pixel point included in the feature map to be compressed are determined respectively through steps S101 to S103, the subsequent steps S103 to S105 are executed for each pixel point included in the feature map to be compressed. Continue with the steps in S104 to S105; or, after respectively determining the target symbol value corresponding to each pixel point included in the feature map to be compressed through the steps of S101 and S104, for each pixel point included in the feature map to be compressed, then perform the subsequent steps of S102 to S103 and S105, or, after respectively determining the target feature value interval and target symbol value corresponding to each pixel point included in the feature map to be compressed through the steps of S101 to S102 and S104, for each pixel point included in the feature map to be compressed, perform the subsequent steps of S102 and S105. In the specific implementation process, it can be flexibly set according to the needs, and is not specifically limited here.

[0056] When saving the feature map to be compressed, determine the target feature value interval where the feature value is located according to the feature value of the pixel points contained in the feature map to be compressed and the saved feature value interval, determine the residual data corresponding to the pixel point according to the feature value of the pixel point and the identification value corresponding to the target feature value interval, determine the target symbol value according to the positive or negative of the eigenvalue, and determine and save the corresponding encoding data of the pixel point according to the target symbol value, identification value and residual data, thereby realizing the saving of the feature map to be compressed.

[0057] Embodiment 2:

[0058] In order to save resources consumed in determining the coded data corresponding to the pixel point, based on the above embodiment, in an embodiment of the present invention, before determining the target feature value interval in which the feature value is located according to the feature value of the pixel point and the saved feature value interval, the method further includes:

[0059] If it is determined that the characteristic value of the pixel point is not 0, the step of determining the target characteristic value interval where the characteristic value is located according to the characteristic value of the pixel point and the saved characteristic value interval is performed.

[0060] In actual application, the characteristic values ​​of the pixels contained in the feature map to be compressed may or may not be 0. As for the pixels whose characteristic value is 0, no characteristic information is recorded. Therefore, there is no need to waste resources. The encoding data corresponding to the pixels whose characteristic value is 0 is determined through the steps in S102 to S105 above.

[0061] Figure 2 A schematic diagram of the distribution of characteristic values ​​of a pixel point provided by an embodiment of the present invention. Figure 2 As shown in the figure, by statistically analyzing the distribution of the characteristic values ​​of the pixels contained in the characteristic graphs output by multiple image processing models, it is found that the characteristic values ​​output by the model Figure 1 Generally, it is satisfying Figure 1 The convolution distribution law shown in the figure, that is, the characteristic values ​​of the pixels contained in the statistical feature map are distributed in a wide range, for example, in the value range of [-128, 127] (8 bits), or in the value range of [-16536, 16533] (16 bits), but it has the following characteristics:

[0062] The eigenvalues ​​of most pixels are 0 or concentrated near 0, and the absolute values ​​of the eigenvalues ​​of these pixels are relatively small;

[0063] Few pixels have negative eigenvalues, and the distribution of the absolute values ​​of the eigenvalues ​​of these pixels with negative eigenvalues ​​(according to statistical distribution) is closer to 0 than the eigenvalues ​​of the pixels with positive eigenvalues.

[0064] In the specific implementation process, after the pixel points included in the feature map to be compressed are obtained, the feature value of the pixel points is obtained to determine whether the feature value of the pixel points is 0, so as to determine whether it is necessary to determine the encoding data corresponding to the pixel points through the steps in S102 to S105 above.

[0065] In one possible implementation, if it is determined that the characteristic value of the pixel is 0, indicating that no characteristic information is recorded in the characteristic value of the pixel, the step of determining the target characteristic value interval in which the characteristic value is located based on the characteristic value of the pixel and the saved characteristic value interval is not performed, and a preset invalid identification value is directly used to represent the encoded data corresponding to the pixel, such as "0", so that subsequently, based on the preset invalid identification value, it can be determined that the characteristic value of the pixel is represented by a preset number of bits of 0.

[0066] In another possible implementation, if it is determined that the characteristic value of the pixel point is not 0, it means that characteristic information is recorded in the characteristic value of the pixel point, and then a step of determining the target characteristic value interval in which the characteristic value is located is executed based on the characteristic value of the pixel point and the saved characteristic value interval.

[0067] Embodiment 3:

[0068] In order to further ensure lossless preservation of the feature map, on the basis of the above embodiments, in an embodiment of the present invention, the step of determining the coded data corresponding to the pixel point according to the target symbol value, the identification value and the residual data includes:

[0069] Determine the number of prefixes corresponding to the eigenvalue according to each bit of the eigenvalue of the pixel point and the data on each bit; wherein the number of prefixes is the number of bits before the highest bit where the non-zero data is located in each bit of the eigenvalue;

[0070] Determine a Huffman symbol sequence including the identification value and the number of prefixes;

[0071] Determine the target code stream data corresponding to the value on each data bit included in the Huffman symbol sequence according to the correspondence between the pre-configured value and the code stream data;

[0072] The coded data corresponding to the pixel point is determined according to the target symbol value, each target code stream data and the residual data.

[0073] In order to further ensure the lossless preservation of the feature map and facilitate the subsequent lossless decompression of the characteristic value of each pixel, in an embodiment of the present invention, the number of bits before the highest bit where non-zero data is located in each bit of the characteristic value can be determined based on each bit of the characteristic value of the pixel and the data on each bit, that is, the number of prefixes corresponding to the characteristic value can be determined.

[0074] In one possible implementation, the data on each bit of the characteristic value can be detected in sequence from high to low bits. When it is determined that the data on the currently detected bit is 0, the next bit is detected and the number of detected bits currently cached is updated until the last bit is detected. When it is determined that the data on the currently detected bit is non-zero data, the currently detected bit is determined to be the highest bit where the non-zero data is located, and further detection is stopped, and the number of detected bits currently cached is obtained, and the number is determined as the number of prefixes corresponding to the characteristic value.

[0075] After the number of prefixes corresponding to the characteristic value is determined based on the above embodiment, a Huffman symbol sequence including the identification value of the target characteristic interval and the number of prefixes is determined.

[0076] In a possible implementation, the identification value and the number of prefixes of the target feature interval can be directly spliced, and the spliced ​​sequence can be determined as the Huffman symbol sequence. Among them, the prefix number can be spliced ​​after the identification value of the target feature interval, or the identification value of the target feature interval can be spliced ​​after the prefix number. In the specific implementation process, the splicing order of the identification value and the prefix number of the target feature interval can be flexibly set according to actual needs, and is not specifically limited here.

[0077] For example, according to the number of prefixes zero_run and the identification value w_level of the target feature interval, the determined Huffman symbol sequence may be {zero_run, w_level} or {w_level, zero_run}.

[0078] Furthermore, in order to accurately determine the coded data corresponding to the pixel point, in the embodiment of the present invention, a correspondence between a numerical value and code stream data is pre-configured. After the Huffman symbol sequence is obtained based on the above embodiment, for each data bit contained in the Huffman symbol sequence, the target code stream data corresponding to the numerical value on the data bit in the Huffman symbol sequence is determined according to the correspondence between the pre-configured numerical value and code stream data. Subsequently, the coded data corresponding to the pixel point is determined according to the obtained target symbol value, each target code stream data, and the residual data.

[0079] In a possible implementation, the target symbol value, each target code stream data, and the residual data may be directly sorted and spliced ​​according to a pre-configured storage requirement, and the sequence obtained after splicing may be determined as the coded data corresponding to the pixel. Specifically, the storage requirement for sorting and splicing the target symbol value, each target code stream data, and the residual data may be flexibly set according to actual needs and is not specifically limited here.

[0080] For example, the storage requirement may be to perform splicing in the order of the target symbol value, each target code stream data, and the residual data, and determine the sequence {target symbol value, each target code stream data, residual data} obtained after splicing as the coded data corresponding to the pixel point, or the storage requirement may be to perform splicing in the order of the target symbol value, the residual data, and each target code stream data, and determine the sequence {target symbol value, residual data, each target code stream data} obtained after splicing as the coded data corresponding to the pixel point, etc.

[0081] In order to facilitate the subsequent accurate determination of each encoded data corresponding to any feature map to be compressed, in an embodiment of the present invention, an end identification value is pre-set. The end identification value can be represented in the form of a number or a string, such as data such as {0,0}, or can be represented in other forms. As long as the pixel point can be uniquely identified as the last pixel point in the feature map to be compressed, it can be applied to the embodiment of the present invention. Specifically, the determination of the Huffman symbol sequence including the target symbol value and the number of prefixes includes:

[0082] If it is determined that the pixel point is the last pixel point included in the feature map to be compressed, a Huffman symbol sequence including the identification value, a preset end identification value and the number of prefixes is determined.

[0083] During the specific implementation process, if it is determined that the pixel point currently being processed is the last pixel point contained in the feature map to be compressed, it means that the feature values ​​of other pixels except this pixel point in the feature map to be compressed have been processed, and then a Huffman symbol sequence including an identification value, a preset end identification value, and a prefix number is determined.

[0084] Specifically, the process of determining a Huffman symbol sequence including an identification value, a preset end identification value, and a prefix number is similar to the process of determining a Huffman symbol sequence including an identification value of a target feature value interval and a prefix number in the above embodiment, and the repeated parts are not repeated here.

[0085] Embodiment 4:

[0086] In order to improve the efficiency of saving the feature map, on the basis of the above embodiments, in an embodiment of the present invention, obtaining the feature map to be compressed includes:

[0087] According to each feature map output by the target network layer in the image processing model and a preset first value, determining a target group corresponding to the target network layer and a feature map of the first value corresponding to each of the target groups;

[0088] Each feature map in each target group is determined as a feature map to be compressed.

[0089] In actual application scenarios, the target network layer in the image processing model may output multiple feature maps. If each feature map is stored serially according to the data processing process in the above embodiment, a lot of time may be consumed to wait for the storage of the previous feature map output by the target network layer. Therefore, in order to improve the efficiency of saving feature maps, in an embodiment of the present invention, a first numerical value is preset. In the specific implementation process, for each feature map output by the target network layer, each target group corresponding to the target network layer and each feature map of the first numerical value corresponding to each target group are determined according to the number of feature maps output by the target network layer and the preset first numerical value. At the same time, any feature map in each target group is determined as a feature map to be compressed, and each feature map to be compressed is saved based on the data processing method in the above embodiment.

[0090] For each target group, after it is determined that the feature map to be compressed corresponding to the target group has been saved, the next feature map in the target group is determined as the feature map to be compressed, and the feature map to be compressed is saved based on the data processing method in the above embodiment until each feature map corresponding to the target group is saved, thereby achieving the simultaneous saving of the feature maps in each target group, thereby improving the efficiency of saving the feature maps.

[0091] For example, if the preset first value is 1 and the target network layer outputs 4 feature maps, then 4 target groups corresponding to the target network layer and 1 feature map corresponding to each target group are determined; if the preset first value is 4 and the target network layer outputs 4 feature maps, then 1 target group corresponding to the target network layer and 4 feature maps corresponding to the target groups are determined.

[0092] Among them, the first value is used to characterize how many feature maps are included in a group. When setting the first value, the first value corresponding to each network layer can be the same or different. When setting the first value corresponding to any network layer, it can be set according to human experience or according to the scenario. If you want to improve the efficiency of saving feature maps as much as possible, you can set the first value to be smaller. If you reduce the performance requirements of the electronic device, you can set the first value to be larger. In the specific implementation process, it can be flexibly set according to needs.

[0093] In order to further improve the efficiency of saving the feature map, the step of obtaining the pixel points contained in the feature map to be compressed includes:

[0094] Divide the feature map to be compressed into blocks according to a preset block size to determine each feature map block;

[0095] The pixel points contained in the feature image to be compressed are obtained from each feature image block respectively.

[0096] Since a feature map generally contains many pixels, if each pixel in the feature map to be compressed is processed serially according to the data processing process in the above embodiment, then before processing any pixel in the feature map to be compressed, it is necessary to wait until the previous pixel is processed before executing the subsequent steps, which reduces the efficiency of saving the feature map to be compressed. Therefore, in order to improve the efficiency of saving the feature map, in an embodiment of the present invention, a block size is preset, and the feature map to be compressed is divided into blocks according to the preset block size to determine each feature map block. Among them, the size of each feature map block is the preset block size. At the same time, the pixels contained in each feature map block are obtained, and the method in the above embodiment is used to process each pixel obtained, so as to realize the simultaneous processing of the pixels in each feature map block, further improving the saving efficiency of the feature map.

[0097] For example, if the preset block size is 64x32, the feature map to be compressed can be divided into blocks according to the block size to determine each 64x32 feature block of the feature map to be compressed; if the preset block size is 16x32, the feature map to be compressed can be divided into blocks according to the block size to determine each 16x32 feature block of the feature map to be compressed; if the preset block size is 256x256, the feature map to be compressed can be divided into blocks according to the block size to determine each 256x2567 feature block of the feature map to be compressed.

[0098] Among them, when setting the block size, the block size corresponding to each network layer can be the same or different. When setting the block size corresponding to any network layer, it can be set according to human experience or according to the scene. If you want to improve the efficiency of saving feature maps as much as possible, you can set the block size smaller. If you reduce the performance requirements of the electronic device, you can set the block size larger. In the specific implementation process, it can be flexibly set according to needs.

[0099] Embodiment 5:

[0100] In order to accurately determine the coded data corresponding to the pixel point, the characteristic value interval in the embodiment of the present invention can be set according to human experience, or can be determined by a preset rule for dividing the interval.

[0101] In a possible implementation manner, if each characteristic value interval is determined by a preset rule for dividing the intervals, the characteristic value interval is determined in the following manner:

[0102] Taking the pre-configured second value corresponding to the target network layer as the base, the identification value corresponding to the currently determined characteristic value interval is the first index result determined by the index, and determining the upper limit threshold corresponding to the currently determined characteristic value interval;

[0103] Taking the pre-configured second numerical value corresponding to the target network layer as the base, the identification value corresponding to the previous characteristic value interval is determined as the second index result determined by the index, and the lower limit threshold corresponding to the currently determined characteristic value interval is determined; wherein the identification value of each characteristic value interval is incremented in sequence according to the pre-configured determination order of each characteristic value interval.

[0104] In order to determine each characteristic value interval, the determination order and the second value of each characteristic value interval are pre-set. Among them, the second value corresponding to each network layer can be the same or different, for example, the second value corresponding to a certain network layer is 2, and the third value corresponding to another network layer is 3. In the specific implementation process, the second value corresponding to the pre-configured target network layer is determined according to the correspondence between the pre-saved second value and the network layer. And according to the determination order of each characteristic value interval set in advance, the identification value corresponding to the currently determined characteristic value interval is determined. In general, the identification value of each characteristic value interval will increase in sequence according to the determination order of each characteristic value pre-configured, that is, the identification value of any characteristic value interval is related to the number of determined characteristic value intervals. For example, the identification value corresponding to the fifth determined characteristic value interval is 5, and the identification value corresponding to the sixth determined characteristic value interval is 6. After the identification value corresponding to the currently determined characteristic value interval is determined, the identification value corresponding to the currently determined characteristic value interval is determined with the second value corresponding to the pre-configured target network layer as the base and the identification value corresponding to the currently determined characteristic value interval as the exponent, and the first index result is determined as the upper and lower thresholds corresponding to the currently determined characteristic value interval.

[0105] Since the value ranges of two adjacent characteristic value intervals of the identification value are continuous, in an embodiment of the present invention, the second numerical value corresponding to the pre-configured target network layer is used as the base, the identification value corresponding to the previous characteristic value interval is determined as the index, and the second index result is determined, and the second index result is determined as the lower limit threshold corresponding to the currently determined characteristic value interval.

[0106] It should be noted that, for the first determined characteristic value interval, the pre-configured value may be determined as the lower limit threshold of the first characteristic value interval.

[0107] For example, the pre-configured second value corresponding to the target network layer is 2. If the identification value corresponding to the currently determined characteristic value interval is 2, the characteristic value interval is determined to be [2,4); if the identification value corresponding to the currently determined characteristic value interval is 6, the characteristic value interval is determined to be [32,64).

[0108] In a possible implementation, since a binary format is generally used to represent the characteristic value, the preset second value is 2 in order to be close to the characteristic value.

[0109] In order to accurately determine the coded data corresponding to the pixel point, the residual data corresponding to the pixel point is determined according to the characteristic value of the pixel point and the identification value corresponding to the target characteristic value interval, including:

[0110] Taking the second value as the base and the identification value corresponding to the target characteristic value interval as the exponent, a third exponent result is determined;

[0111] The difference between the absolute value of the eigenvalue and the third index result is determined as the residual data corresponding to the pixel point.

[0112] In an embodiment of the present invention, when each eigenvalue interval is determined in the manner described in the above embodiment, after the target eigenvalue interval in which the eigenvalue of the pixel point is located is determined, the third index result is determined by taking the preset second numerical value corresponding to the target network layer as the base and the identification value corresponding to the target eigenvalue interval as the exponent, that is, obtaining the upper limit threshold of the target eigenvalue interval and determining the absolute value of the eigenvalue of the pixel point. According to the absolute value of the eigenvalue and the third index result, the residual data corresponding to the pixel point is determined. Specifically, the difference between the absolute value of the eigenvalue and the third index result is determined, and the difference is determined as the residual data corresponding to the pixel point.

[0113] Specifically, according to the characteristic value of the pixel point and the identification value corresponding to the target characteristic value interval, the residual data corresponding to the pixel point can be determined in the following way:

[0114]

[0115] Among them, w tail Identify the residual data corresponding to the pixel, w abs represents the absolute value of the characteristic value of the pixel point, a is the second value corresponding to the preset target network layer, and w level Indicates the identification value corresponding to the target eigenvalue interval.

[0116] In a possible implementation manner, if the preset second value is 2, the residual data may be represented by the identification value minus 1 bit to represent the residual data in a binary format.

[0117] Embodiment 6:

[0118] The data processing method provided by the embodiment of the present invention is described below through specific implementation methods:

[0119] Figure 3A schematic diagram of a specific data processing flow provided by an embodiment of the present invention, the flow includes:

[0120] The feature map to be compressed generally includes multiple pixels, and the following steps are performed for each pixel included in the feature map to be compressed:

[0121] S301: Counting the Huffman symbol sequences of the pixels included in the feature image to be compressed.

[0122] The feature map to be compressed is output by the target network layer in the image processing model.

[0123] Specifically, the process of counting the Huffman symbol sequence of the pixels contained in the feature map to be compressed is now combined with Figure 4 To explain, Figure 4 A schematic diagram of a specific Huffman symbol sequence for determining a pixel point provided by an embodiment of the present invention, the process includes:

[0124] S401: Obtain a feature map to be compressed, and obtain pixels included in the feature map to be compressed.

[0125] Specifically, the process of obtaining the feature map to be compressed includes: determining the target group corresponding to the target network layer and the feature map of the first value corresponding to each target group according to each feature map output by the target network layer in the image processing model and a preset first value; and determining each feature map in each target group as the feature map to be compressed.

[0126] The process of obtaining the pixels contained in the feature map to be compressed includes:

[0127] Divide the feature map to be compressed into blocks according to a preset block size to determine each feature map block;

[0128] The pixel points contained in the feature image to be compressed are obtained from each feature image block respectively.

[0129] S402: Determine the absolute value of the feature value of the pixel point, the target symbol value, and the identification value corresponding to the target feature interval.

[0130] S403: Determine the number of prefixes corresponding to the pixels included in the feature map to be compressed.

[0131] The number of prefixes is the number of bits before the highest bit where non-zero data is located in each bit of the characteristic value.

[0132] Specifically, the number of prefixes corresponding to the characteristic value is determined according to each bit of the characteristic value of the pixel point and the data on each bit.

[0133] S404: Determine a Huffman symbol sequence including the identification value and the number of prefixes.

[0134] If the identity value is represented by w level , the number of prefixes is expressed as zero_run, then the identifier value w is included level And the Huffman symbol sequence with the prefix number zero_run can be expressed as {w level, zero_run}.

[0135] S405: Determine whether the pixel is the last pixel included in the feature map to be compressed. If so, insert a preset end identification value into the Huffman symbol sequence; otherwise, end.

[0136] The preset end mark value is {0,0}.

[0137] S302: Determine the target code stream data corresponding to the value of each data bit in the Huffman symbol sequence.

[0138] Specifically, according to the correspondence between the pre-configured numerical values ​​and the code stream data, the target code stream data corresponding to the numerical values ​​on each data bit included in the Huffman symbol sequence is determined.

[0139] S303: Determine the residual data corresponding to the pixel point.

[0140] Taking the pre-configured second numerical value corresponding to the target network layer as the base and the identification value corresponding to the target eigenvalue interval as the exponent, a third exponent result is determined; and the difference between the absolute value of the eigenvalue and the third exponent result is determined as the residual data corresponding to the pixel point.

[0141] S304: Determine the target symbol value corresponding to the positive or negative of the eigenvalue.

[0142] For example, the eigenvalue of a pixel is -5, and the absolute value of the eigenvalue w abs is 5, the target symbol value w sign is 1, the identification value w corresponding to the target feature interval level is 3; the eigenvalue of a certain pixel is 12, and the absolute value of the eigenvalue w abs is 12, the target symbol value is w sign is 0, the identification value w corresponding to the target feature interval level is 4.

[0143] Finally, the coded data corresponding to the pixel point is determined according to the target symbol value, each target code stream data and the residual data.

[0144] If the target symbol value is 0 or 1, the target symbol value can be represented by 1-bit data.

[0145] S305: Determine whether each feature map of the target network layer is saved. If so, execute S306; otherwise, continue to execute S301.

[0146] S306: Determine whether all feature maps output in the image processing model are saved. If so, end; otherwise, execute S301.

[0147] The above data processing method for saving the feature map is a method for compressing the feature map. The process of compressing the feature map does not have a more complicated calculation process, the calculation is relatively simple, and the adaptability is strong, so that the compression ratio of each network is relatively stable and lossless. In the actual application process, it can be applied to various environments such as software / hardware, such as CPU, GPU, ASIC (application-specific digital circuit).

[0148] When the saved feature map needs to be accessed later, the encoded data corresponding to each pixel point contained in the saved feature map is decoded according to the target symbol value, each target code stream data and residual data contained in the encoded data to obtain the feature value of the pixel point.

[0149] As for the specific process of decoding the encoded data corresponding to the pixel point, it is believed that those skilled in the art can determine the specific decoding process based on the contents described in the embodiments of the present invention, which will not be described in detail here.

[0150] Embodiment 7:

[0151] An embodiment of the present invention provides a data processing device, Figure 5 A schematic diagram of the structure of a data processing device provided in an embodiment of the present invention, the device comprising:

[0152] An acquisition unit 51 is used to acquire pixel points contained in a feature map to be compressed; wherein the feature map to be compressed is output by a target network layer in an image processing model;

[0153] The processing unit 52 is used to determine the target eigenvalue interval where the eigenvalue is located based on the eigenvalue of the pixel point and the saved eigenvalue interval; determine the residual data corresponding to the pixel point based on the eigenvalue of the pixel point and the identification value corresponding to the target eigenvalue interval; determine the target symbol value corresponding to the positive and negative of the eigenvalue; determine and save the coded data corresponding to the pixel point based on the target symbol value, the identification value and the residual data.

[0154] Furthermore, the processing unit 52 is also used to determine the target feature value interval where the feature value is located based on the feature value of the pixel point and the saved feature value interval. If it is determined that the feature value of the pixel point is not 0, the step of determining the target feature value interval where the feature value is located based on the feature value of the pixel point and the saved feature value interval is executed.

[0155] Furthermore, the processing unit 52 is specifically used to determine the number of prefixes corresponding to the characteristic value according to each bit of the characteristic value of the pixel point and the data on each bit; wherein the number of prefixes is the number of bits before the highest bit where non-zero data is located in each bit of the characteristic value; determine a Huffman symbol sequence containing the identification value and the number of prefixes; determine the target code stream data corresponding to the values ​​on each data bit contained in the Huffman symbol sequence according to the correspondence between the pre-configured values ​​and the code stream data; determine the encoding data corresponding to the pixel point according to the target symbol value, each of the target code stream data and the residual data.

[0156] Furthermore, the processing unit 52 is specifically configured to determine a Huffman symbol sequence including the identification value, a preset end identification value and the number of prefixes if it is determined that the pixel point is the last pixel point included in the feature map to be compressed.

[0157] Furthermore, the acquisition unit 51 is also used to determine the target group corresponding to the target network layer and the feature map of the first value corresponding to each target group according to each feature map output by the target network layer in the image processing model and a preset first value; and determine each feature map in each target group as a feature map to be compressed.

[0158] Furthermore, the acquisition unit 51 is specifically configured to divide the feature map to be compressed into blocks according to a preset block size to determine each feature map block; and respectively obtain pixel points included in the feature map to be compressed from each feature map block.

[0159] Furthermore, the processing unit 52 is specifically configured to determine the characteristic value interval in the following manner:

[0160] Taking the pre-configured second numerical value corresponding to the target network layer as the base, the identification value corresponding to the currently determined characteristic value interval is the first index result determined by the index, and the upper limit threshold corresponding to the currently determined characteristic value interval is determined; taking the pre-configured second numerical value corresponding to the target network layer as the base, the identification value corresponding to the previous characteristic value interval is the second index result determined by the index, and the lower limit threshold corresponding to the currently determined characteristic value interval is determined; wherein the identification value of each characteristic value interval is incremented in sequence according to the pre-configured determination order of each characteristic value interval.

[0161] Furthermore, the processing unit 52 is specifically used to determine a third index result with the second value as the base and the identification value corresponding to the target eigenvalue interval as the exponent; and determine the difference between the eigenvalue and the third index result as the residual data corresponding to the pixel point.

[0162] When saving the feature map to be compressed, determine the target feature value interval where the feature value is located according to the feature value of the pixel points contained in the feature map to be compressed and the saved feature value interval, determine the residual data corresponding to the pixel point according to the feature value of the pixel point and the identification value corresponding to the target feature value interval, determine the target symbol value according to the positive or negative of the eigenvalue, and determine and save the corresponding encoding data of the pixel point according to the target symbol value, identification value and residual data, thereby realizing the saving of the feature map to be compressed.

[0163] Embodiment 8:

[0164] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present invention, the electronic device comprises: a processor 61, a communication interface 62, a memory 63 and a communication bus 64, wherein the processor 61, the communication interface 62, and the memory 63 communicate with each other through the communication bus 64;

[0165] The memory 63 stores a computer program. When the program is executed by the processor 61, the processor 61 performs the following steps:

[0166] Obtaining pixel points contained in the feature map to be compressed; wherein the feature map to be compressed is output by the target network layer in the image processing model;

[0167] Determine, according to the characteristic value of the pixel point and the saved characteristic value interval, a target characteristic value interval in which the characteristic value is located;

[0168] Determining residual data corresponding to the pixel point according to the characteristic value of the pixel point and the identification value corresponding to the target characteristic value interval;

[0169] Determine the target symbol value corresponding to the positive and negative of the eigenvalue;

[0170] According to the target symbol value, the identification value and the residual data, the encoding data corresponding to the pixel point is determined and saved.

[0171] Since the principle of solving the problem by the above electronic device is similar to the data processing method, the implementation of the above electronic device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0172] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0173] The communication interface 62 is used for communication between the above electronic device and other devices.

[0174] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0175] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (Network Processor, NP), etc.; it can also be a digital signal processing processor (Digital Signal Processing, DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.

[0176] When saving the feature map to be compressed, determine the target feature value interval where the feature value is located according to the feature value of the pixel points contained in the feature map to be compressed and the saved feature value interval, determine the residual data corresponding to the pixel point according to the feature value of the pixel point and the identification value corresponding to the target feature value interval, determine the target symbol value according to the positive or negative of the eigenvalue, and determine and save the corresponding encoding data of the pixel point according to the target symbol value, identification value and residual data, thereby realizing the saving of the feature map to be compressed.

[0177] Embodiment 9:

[0178] On the basis of the above embodiments, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program executable by a processor, and when the program runs on the processor, the processor implements the following steps when executing:

[0179] Obtaining pixel points contained in the feature map to be compressed; wherein the feature map to be compressed is output by the target network layer in the image processing model;

[0180] Determine, according to the characteristic value of the pixel point and the saved characteristic value interval, a target characteristic value interval in which the characteristic value is located;

[0181] Determining residual data corresponding to the pixel point according to the characteristic value of the pixel point and the identification value corresponding to the target characteristic value interval;

[0182] Determine the target symbol value corresponding to the positive and negative of the eigenvalue;

[0183] According to the target symbol value, the identification value and the residual data, the encoding data corresponding to the pixel point is determined and saved.

[0184] The principle of the above-mentioned computer-readable storage medium for solving the technical problem is the same as that of the above-mentioned data processing method, and the repeated parts will not be repeated.

[0185] When saving the feature map to be compressed, determine the target feature value interval where the feature value is located according to the feature value of the pixel points contained in the feature map to be compressed and the saved feature value interval, determine the residual data corresponding to the pixel point according to the feature value of the pixel point and the identification value corresponding to the target feature value interval, determine the target symbol value according to the positive or negative of the eigenvalue, and determine and save the corresponding encoding data of the pixel point according to the target symbol value, identification value and residual data, thereby realizing the saving of the feature map to be compressed.

[0186] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0187] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0188] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0189] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0190] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A data processing method, characterized in that: The method comprises: Obtaining pixel points contained in the feature map to be compressed; wherein the feature map to be compressed is output by the target network layer in the image processing model; Determine, according to the characteristic value of the pixel point and the saved characteristic value interval, a target characteristic value interval in which the characteristic value is located; Determining residual data corresponding to the pixel point according to the characteristic value of the pixel point and the identification value corresponding to the target characteristic value interval; Determine the target symbol value corresponding to the positive and negative of the eigenvalue; According to the target symbol value, the identification value and the residual data, the encoding data corresponding to the pixel point is determined and saved.

2. The method according to claim 1, characterized in that If it is determined that the characteristic value of the pixel point is not 0, the step of determining the target characteristic value interval where the characteristic value is located according to the characteristic value of the pixel point and the saved characteristic value interval is performed.

3. The method according to claim 1, characterized in that The determining, according to the target symbol value, the identification value and the residual data, the coded data corresponding to the pixel point comprises: Determine the number of prefixes corresponding to the eigenvalue according to each bit of the eigenvalue of the pixel point and the data on each bit; wherein the number of prefixes is the number of bits before the highest bit where the non-zero data is located in each bit of the eigenvalue; Determine a Huffman symbol sequence including the identification value and the number of prefixes; Determine the target code stream data corresponding to the value on each data bit included in the Huffman symbol sequence according to the correspondence between the pre-configured value and the code stream data; The coded data corresponding to the pixel point is determined according to the target symbol value, each target code stream data and the residual data.

4. The method according to claim 3, characterized in that The determining of a Huffman symbol sequence including the identification value and the number of prefixes includes: If it is determined that the pixel point is the last pixel point included in the feature map to be compressed, a Huffman symbol sequence including the identification value, a preset end identification value and the number of prefixes is determined.

5. The method according to claim 1, characterized in that The feature map to be compressed is obtained in the following way: According to each feature map output by the target network layer in the image processing model and a preset first value, determining a target group corresponding to the target network layer and a feature map of the first value corresponding to each of the target groups; Each feature map in each target group is determined as a feature map to be compressed.

6. The method according to claim 1 or 5, characterized in that: The step of obtaining the pixel points contained in the feature map to be compressed includes: Divide the feature map to be compressed into blocks according to a preset block size to determine each feature map block; The pixel points contained in the feature image to be compressed are obtained from each feature image block respectively.

7. The method according to claim 1, characterized in that The characteristic value interval is determined by: Taking the pre-configured second value corresponding to the target network layer as the base, the identification value corresponding to the currently determined characteristic value interval is the first index result determined by the index, and determining the upper limit threshold corresponding to the currently determined characteristic value interval; Taking the pre-configured second numerical value corresponding to the target network layer as the base, the identification value corresponding to the previous characteristic value interval is determined as the second index result determined by the index, and the lower limit threshold corresponding to the currently determined characteristic value interval is determined; wherein the identification value of each characteristic value interval is incremented in sequence according to the pre-configured determination order of each characteristic value interval.

8. The method according to claim 7, characterized in that The determining, according to the characteristic value of the pixel point and the identification value corresponding to the target characteristic value interval, the residual data corresponding to the pixel point includes: Taking the second value as the base and the identification value corresponding to the target characteristic value interval as the exponent, a third exponent result is determined; The difference between the absolute value of the eigenvalue and the third index result is determined as the residual data corresponding to the pixel point.

9. A data processing device, characterized in that: The device comprises: An acquisition unit, used to acquire pixel points contained in a feature map to be compressed; wherein the feature map to be compressed is output by a target network layer in an image processing model; A processing unit is used to determine the target eigenvalue interval where the eigenvalue is located based on the eigenvalue of the pixel point and the saved eigenvalue interval; determine the residual data corresponding to the pixel point based on the eigenvalue of the pixel point and the identification value corresponding to the target eigenvalue interval; determine the target symbol value corresponding to the positive and negative of the eigenvalue; determine and save the coded data corresponding to the pixel point based on the target symbol value, the identification value and the residual data.

10. The device according to claim 9, characterized in that The processing unit is used to execute the step of determining the target eigenvalue interval where the eigenvalue is located based on the eigenvalue of the pixel point and the saved eigenvalue interval if it is determined that the eigenvalue of the pixel point is not 0.

11. The device according to claim 9, characterized in that The determining, according to the target symbol value, the identification value and the residual data, the coded data corresponding to the pixel point comprises: According to each bit of the characteristic value of the pixel point and the data on each bit, determine the number of prefixes corresponding to the characteristic value; wherein the number of prefixes is the number of bits before the highest bit where non-zero data is located in each bit of the characteristic value; determine a Huffman symbol sequence containing the identification value and the number of prefixes; according to the correspondence between pre-configured numerical values ​​and code stream data, determine the target code stream data corresponding to the numerical values ​​on each data bit contained in the Huffman symbol sequence; according to the target symbol value, each of the target code stream data and the residual data, determine the encoding data corresponding to the pixel point.

12. The device according to claim 11, characterized in that The determining of a Huffman symbol sequence including the identification value and the number of prefixes includes: If it is determined that the pixel point is the last pixel point included in the feature map to be compressed, a Huffman symbol sequence including the identification value, a preset end identification value and the number of prefixes is determined.

13. The device according to claim 9, characterized in that The acquisition unit is further used to determine the target group corresponding to the target network layer and the feature map of the first value corresponding to each of the target groups according to each feature map output by the target network layer in the image processing model and the preset first value; Each feature map in each target group is determined as a feature map to be compressed.

14. The device according to claim 9 or 13, characterized in that The acquisition unit is specifically used to divide the feature map to be compressed into blocks according to a preset block size to determine each feature map block; and respectively obtain the pixel points included in the feature map to be compressed from each feature map block.

15. The device according to claim 9, characterized in that The processing unit is specifically used to determine the characteristic value interval in the following manner: Taking the pre-configured second value corresponding to the target network layer as the base, the identification value corresponding to the currently determined characteristic value interval is the first index result determined by the index, and determining the upper limit threshold corresponding to the currently determined characteristic value interval; Taking the pre-configured second numerical value corresponding to the target network layer as the base, the identification value corresponding to the previous characteristic value interval is determined as the second index result determined by the index, and the lower limit threshold corresponding to the currently determined characteristic value interval is determined; wherein the identification value of each characteristic value interval is incremented in sequence according to the pre-configured determination order of each characteristic value interval.

16. The device according to claim 15, characterized in that The processing unit is specifically used to determine a third index result with the second value as the base and the identification value corresponding to the target eigenvalue interval as the exponent; and determine the difference between the absolute value of the eigenvalue and the third index result as the residual data corresponding to the pixel point.

17. An electronic device, characterized in that: The electronic device comprises at least a processor and a memory, and the processor is used to implement the steps of the data processing method according to any one of claims 1 to 8 when executing a computer program stored in the memory.

18. A computer-readable storage medium, characterized in that: It stores a computer program, which, when executed by a processor, implements the steps of the data processing method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Image data conversion method and device and storage medium

    CN109754443A

  • Image compression method and device and electronic equipment

    CN111010574A