Method and System for Data Processing
By performing boundary adjustment and compensation of video frames, the calculation amount and clarity balance of video compression and decompression in the prior art are solved, and efficient data compression and clarity recovery are achieved.
Patent Information
- Application Number
- CN202110594135.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-28
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2041-05-28
AI Technical Summary
The existing video compression technology is difficult to balance between the calculation amount and the decompression video clarity, and there are noise problems, such as block effect and ringing effect, which affect the transmission efficiency and clarity of data.
By dividing the initial video frame into multiple units and adjusting the amplitude of the intermediate frequency to high frequency regions in each unit using different boundary adjustment coefficients to reduce signal strength and improve data compression efficiency. At the same time, during the decompression process, the amplitude of the intermediate frequency to high frequency region is compensated using the corresponding boundary compensation coefficient to restore the clarity of the initial frame.
Improves the compression efficiency and transmission efficiency of data, reduces data loss and noise, improves the clarity of data after decompression, and can even reach or exceed the clarity of the original data.
Smart Images

Figure CN115412730B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of data processing, and particularly to a method and system for data processing. Background Art
[0002] With the increasing popularity of Internet technology, especially the popularization of mobile terminals, more and more types of data have emerged in communication networks. With the popularization of computers, more and more data is occupying more and more network and storage resources. For example, video data, audio data, and so on. Data often contains a huge amount of information and has high requirements for storage and transmission. Therefore, in order to facilitate storage and transmission, data often needs to be compressed and decompressed when needed. Therefore, data compression and decompression technologies have been more and more applied.
[0003] For example, in the past few decades, video and image compression technologies have been more and more applied. Video often contains a huge amount of information. From traditional broadcast movies and television to a large number of current monitoring and Internet applications, compressed images and videos are occupying more and more network and storage resources. This makes it take a large amount of network resources if the original data of a video is transmitted from one terminal to another terminal through the network. This makes it difficult to achieve smooth transmission of the picture in some real-time video transmission cases. Therefore, video data needs to be compressed at a data compression device before transmission to facilitate transmission. After the compressed video is transmitted through a transmission medium to a data decompression device, the data decompression device decompresses the video to at least partially restore the video image.
[0004] In the prior art, the main video compression standards are the H.264 and H.265 standards. Before transmission, the video is usually compressed as a whole using an encoder according to the H.264 and H.265 standards, and after transmission, the video is decompressed as a whole using a decoder according to the H.264 and H.265 standards. However, the above method of compressing the video as a whole still cannot satisfy people in terms of the balance between the computational complexity and the clarity of the decompressed video. This is because when the H.264 and H.265 standards process the original video, they need to generate a predicted frame of the original frame through various complex algorithms, and then record the residual between the original frame and the predicted frame. The closer the predicted frame is to the original frame, the smaller the residual, and the smaller the amount of data after encoding a video. To make the encoding easier, a common method is to filter the original frame to reduce the high-frequency information in the original frame image. According to the Fourier transform, the frequency information at the boundary of an object in a picture is often relatively rich, and the high-frequency components at the boundary are usually greater than those in other smooth regions. Therefore, although the frame image with reduced high-frequency information becomes blurred visually (i.e., the clarity of the image is reduced), it can make the residual between the predicted frame and the filtered original frame smaller. In this way, both the computational complexity required for video encoding and the encoded data stream are reduced a lot. However, the technology of frame prediction is very complex and will consume a large amount of computing resources. Taking a video codec system as an example, on average, for every 30% - 40% increase in encoding efficiency, the computational complexity will increase by about 10 times. At the same time, the clarity of the data after decompression is reduced after transmission, and there are often various noises, such as blocking artifacts or ringing artifacts. The blocking artifact refers to the discontinuity at the image boundary caused by the block-based Fourier transform in image processing. The ringing artifact refers to the gray-scale oscillation at the location of the sharp gray-scale change in the output image when a spectral adjustment function with a fast change in value (i.e., a region with a sharp change in derivative) is selected for spectral adjustment processing of an image in image processing, just like the air oscillation generated after a bell is struck. The noise mostly appears at the image boundary. If an output image has strong noise, it cannot meet the increasing requirements of people for the clarity of data. Therefore, how to further improve the compression efficiency of data, while improving the clarity of the decompressed data and eliminating noise, has always been the goal pursued in the field of data compression and decompression technology.
[0005] Therefore, in order to improve the transmission efficiency of data and the clarity of the decompressed data, a data processing method and system with higher compression efficiency and clearer data decompression are needed. Summary of the Invention
[0006] This specification provides a data processing method and system with higher compression efficiency and clearer data decompression. Taking video data as an example, the data processing method and system can divide the initial frames in the initial video data into multiple units, obtain the amplitudes of the medium-frequency to high-frequency regions of each unit, and use different boundary adjustment coefficients to adjust the amplitudes of the medium-frequency to high-frequency regions in each unit to reduce the amplitudes of the initial frames in the medium-frequency to high-frequency regions. If the amplitudes of the medium-frequency to high-frequency regions in the current unit are large, it means that the current unit contains strong boundaries, then a boundary adjustment coefficient less than 1 and greater than 0 is used to adjust the amplitudes of the medium-frequency to high-frequency regions in the current unit to reduce the amplitudes of the medium-frequency to high-frequency regions in the current unit, thereby reducing the signal strength in the medium-frequency to high-frequency regions in the current unit, thereby reducing the data information volume, and improving the data compression efficiency when performing prediction and calculating residuals. If the amplitudes of the medium-frequency to high-frequency regions in the current unit are small, it means that the current unit contains weak boundaries, then a boundary adjustment coefficient greater than 1 is used to adjust the amplitudes of the medium-frequency to high-frequency regions in the current unit to enhance the amplitudes of the medium-frequency to high-frequency regions in the current unit, so as to avoid the loss of weak boundaries in the current unit during the data compression (prediction and calculating residuals) process and avoid detail loss. The data processing method and system can enhance the data information volume of weak boundaries while improving the data compression efficiency, so as to avoid detail loss during the data compression process, that is, while improving the data compression efficiency, reducing data distortion.
[0007] When decompressing the compressed frames, the method and system can use the units during data compression as data decompression units, and use boundary compensation coefficients corresponding to the boundary adjustment coefficients for each unit to perform boundary compensation on the amplitudes of the medium-frequency to high-frequency regions to compensate for the amplitudes of the medium-frequency to high-frequency regions reduced during the data compression process, obtaining decompressed frames. The boundary compensation corresponds to the boundary adjustment, and there is a corresponding relationship between the boundary compensation coefficient and the boundary adjustment coefficient. The boundary compensation can restore the compressed data after the boundary adjustment to the clarity of the initial frame or even higher than the clarity of the initial frame. That is to say, without significantly increasing the computational complexity of encoding and decoding, the decoding end can at least restore the data in the important frequencies of the decompressed data to the clarity of the initial frame, and even can obtain a clarity exceeding the initial frame.
[0008] Since the boundary adjustment coefficients of the initial frames during the boundary adjustment process are all greater than 0, the information in the compressed frames is not missing. Therefore, the boundary adjustment coefficient and the boundary compensation coefficient can be designed according to the relationship and respective characteristics of the boundary adjustment coefficient and the boundary compensation coefficient to restore the information in the compressed frames. The method and system can significantly improve the data compression efficiency, enhance the data transmission efficiency, reduce data loss, avoid detail loss, and at the same time eliminate noise and improve the clarity of the decompressed data.
[0009] Based on this, in a first aspect, this specification provides a data processing method, including: selecting an initial frame from initial data, where the initial frame includes initial data of a preset number of bytes; and performing data compression on the initial frame to obtain a compressed frame, where the data compression includes performing boundary adjustment on the frame being compressed, and the frame being compressed includes the initial frame and any data state before the initial frame becomes the compressed frame during the data compression process, where the boundary adjustment includes using a corresponding boundary adjustment coefficient for each of multiple units of the frame being compressed to adjust the amplitude of each unit in the intermediate frequency to high frequency region, so as to reduce the amplitude of the frame being compressed in the intermediate frequency to high frequency region, and the boundary adjustment coefficient is greater than 0.
[0010] In some embodiments, the performing boundary adjustment on the frame being compressed includes: dividing the frame being compressed into the multiple units based on a preset unit size; and using the corresponding boundary adjustment coefficient for each unit to adjust the amplitude of each unit in the intermediate frequency to high frequency region.
[0011] In some embodiments, the using the corresponding boundary adjustment coefficient for each unit to adjust the amplitude of each unit in the intermediate frequency to high frequency region includes, for each unit: selecting a function from a preset set of encoding functions as an encoding function, adjusting it through the encoding function to obtain a first unit, so that the components in the low frequency region of the first unit in the frequency domain are retained while the components in the intermediate frequency to high frequency region are attenuated; taking the difference between it and the first unit to obtain its corresponding first boundary, where the first boundary includes its components in the intermediate frequency to high frequency region; and using the corresponding boundary adjustment coefficient to adjust the amplitude of the first boundary to obtain its corresponding encoded boundary; and superimposing the first unit and the encoded boundary.
[0012] In some embodiments, the using the corresponding boundary adjustment coefficient to adjust the amplitude of the first boundary includes: determining that the boundary value of the first boundary is less than a preset first threshold, and enhancing the amplitude of the first boundary through the boundary adjustment coefficient greater than 1; or determining that the boundary value of the first boundary is greater than a preset second threshold, and reducing the amplitude of the first boundary through the boundary adjustment coefficient less than 1.
[0013] In some embodiments, enhancing the amplitude of the first boundary by the boundary adjustment coefficient greater than 1 includes: selecting a coefficient from a preset first boundary adjustment coefficient group as the boundary adjustment coefficient to enhance the amplitude of the first boundary, where the coefficients in the first boundary adjustment coefficient group are all greater than 1; reducing the amplitude of the first boundary by the boundary adjustment coefficient less than 1 includes: selecting a coefficient from a preset second boundary adjustment coefficient group as the boundary adjustment coefficient to reduce the amplitude of the first boundary, where the coefficients in the second boundary adjustment coefficient group are all less than 1.
[0014] In some embodiments, adjusting the amplitude of the first boundary using the corresponding boundary adjustment coefficient includes: taking the weighted value of the distortion rate and the code rate as the optimization objective, and based on an optimization algorithm, obtaining the boundary adjustment coefficient, and adjusting the amplitude of the first boundary with the boundary adjustment coefficient.
[0015] In some embodiments, performing data compression on the initial frame includes at least one of the following methods: first performing the boundary adjustment on the initial frame, and then performing prediction and residual calculation on the initially framed data after the boundary adjustment; first performing prediction on the initial frame to obtain a predicted frame, and then performing the boundary adjustment and residual calculation on the initial frame and the predicted frame; and first performing prediction and residual calculation on the initial frame, and then performing the boundary adjustment on the residual.
[0016] In some embodiments, the compressed frame further includes the encoding function and the boundary adjustment coefficient corresponding to each unit in the plurality of units.
[0017] In a second aspect, the present specification further provides a data processing system, including: at least one storage medium and at least one processor, the at least one storage medium stores at least one instruction set for data processing; the at least one processor is communicatively connected to the at least one storage medium, wherein when the system runs, the at least one processor reads the at least one instruction set and executes the data processing method described in the first aspect of the present specification according to the instructions of the at least one instruction set.
[0018] In a third aspect, the present specification further provides a data processing method, including: obtaining compressed data, the compressed data including a compressed frame obtained by performing data compression on an initial frame, the data compression including boundary adjustment; and performing data decompression on the compressed frame to obtain a decompressed frame, the data decompression including performing boundary compensation on the frame during decompression, the frame during decompression including the compressed frame and any data state before the compressed frame becomes the decompressed frame during the data decompression process, where there is a preset association relationship between the boundary compensation and the boundary adjustment.
[0019] In some embodiments, the boundary adjustment includes adjusting the amplitude of each unit in the plurality of units of the in-frame in the intermediate frequency to high frequency region using its corresponding boundary adjustment coefficient to reduce the amplitude of the in-frame in the intermediate frequency to high frequency region. The boundary adjustment coefficient is greater than 0. The in-frame includes the initial frame and any data state of the initial frame before it becomes the compressed frame during the data compression process. The boundary compensation includes, for each unit in the plurality of units of the out-of-frame, based on the association relationship, compensating the amplitude of the unit in the intermediate frequency to high frequency region using a boundary compensation coefficient corresponding to the boundary adjustment coefficient.
[0020] In some embodiments, the boundary adjustment of the in-frame includes: dividing the in-frame into the plurality of units based on a preset unit size; and adjusting the amplitude of each unit in the intermediate frequency to high frequency region using its corresponding boundary adjustment coefficient, including for each unit: selecting a function from a preset set of encoding functions as the encoding function, adjusting it through the encoding function to obtain a first unit, so that the components in the low frequency region in the frequency domain are retained while the components in the intermediate frequency to high frequency region are attenuated; taking the difference between it and the first unit to obtain its corresponding first boundary, the first boundary including its components in the intermediate frequency to high frequency region; and adjusting the amplitude of the first boundary using its corresponding boundary adjustment coefficient to obtain its corresponding encoded boundary; and superimposing the first unit and the encoded boundary.
[0021] In some embodiments, the boundary compensation of the out-of-frame includes: dividing the out-of-frame into the plurality of units based on the preset unit size; and compensating the amplitude of each unit in the intermediate frequency to high frequency region using the boundary compensation coefficient corresponding to the boundary adjustment coefficient.
[0022] In some embodiments, compensating the amplitude of each unit in the intermediate frequency to high frequency region using the boundary compensation coefficient corresponding to the boundary adjustment coefficient includes, for each unit: determining a decoding function, adjusting it through the decoding function to obtain a second unit, so that the components in the low frequency region in the frequency domain are retained while the components in the intermediate frequency to high frequency region are attenuated; taking the difference between it and the second unit to obtain its corresponding second boundary, the second boundary including its components in the intermediate frequency to high frequency region; and compensating the amplitude of the second boundary using the boundary compensation coefficient corresponding to the boundary adjustment coefficient to obtain its corresponding decoded boundary; and superimposing the current unit and the decoded boundary.
[0023] In some embodiments, determining the decoding function includes: selecting a function from a preset group of decoding functions as the decoding function.
[0024] In some embodiments, using the boundary compensation coefficient corresponding to the boundary adjustment coefficient to compensate the amplitude of the second boundary includes: selecting one from a preset group of boundary compensation coefficients as the boundary compensation coefficient to compensate the amplitude of the second boundary.
[0025] In some embodiments, the compressed frame includes: the encoding function and the boundary adjustment coefficient corresponding to each unit in a plurality of units in the compressed frame.
[0026] In some embodiments, determining the decoding function includes: selecting a function corresponding to the encoding function from a preset group of decoding functions as the decoding function.
[0027] In some embodiments, using the boundary compensation coefficient corresponding to the boundary adjustment coefficient to compensate the amplitude of the second boundary includes: determining the boundary compensation coefficient based on the association relationship between the boundary adjustment coefficient and the boundary compensation coefficient to compensate the amplitude of the second boundary.
[0028] In some embodiments, decompressing the compressed frame includes at least one of the following methods: decoding the compressed frame first and then performing the boundary compensation; performing the boundary compensation during the decoding process of the compressed frame; and performing the boundary compensation on the compressed frame first and then performing the decoding.
[0029] In some embodiments, the association relationship includes: the boundary compensation makes the amplitude of the decompressed frame at any frequency in the low-frequency to medium-frequency region not less than 85% of the initial frame.
[0030] In some embodiments, the association relationship further includes: the boundary compensation makes the amplitude of the decompressed frame increase smoothly in the medium-frequency region relative to the initial frame.
[0031] In some embodiments, the association relationship further includes: the boundary compensation makes the amplitude of the decompressed frame decrease smoothly in the high-frequency region relative to the initial frame.
[0032] Fourthly, this specification also provides a data processing system, including at least one storage medium and at least one processor. The at least one storage medium stores at least one instruction set for data processing. The at least one processor is communicatively connected to the at least one storage medium. When the system runs, the at least one processor reads the at least one instruction set and executes the data processing method described in the third aspect of this specification according to the instructions of the at least one instruction set.
[0033] Other functions of the data processing method and system provided in this specification will be partially listed in the following description. According to the description, the content introduced by the following numbers and examples will be obvious to those of ordinary skill in the art. The creative aspects of the data processing method, system, and storage medium provided in this specification can be fully explained by practicing or using the methods, devices, and combinations described in the following detailed examples. Brief Description of the Drawings
[0034] To more clearly illustrate the technical solutions in the embodiments of this specification, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of this specification. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0035] Figure 1 Shows a schematic diagram of a data processing system provided according to an embodiment of this specification;
[0036] Figure 2 Shows a schematic diagram of a data compression device for data processing provided according to an embodiment of this specification;
[0037] Figure 3A Shows a flowchart of data compression and data decompression provided according to an embodiment of this specification;
[0038] Figure 3B Shows a flowchart of data compression and data decompression provided according to an embodiment of this specification;
[0039] Figure 3C Shows a flowchart of data compression and data decompression provided according to an embodiment of this specification;
[0040] Figure 4A Shows a flowchart of a data processing method for compressing data provided according to an embodiment of this specification;
[0041] Figure 4B Shows a flowchart of boundary adjustment provided according to an embodiment of this specification;
[0042] Figure 5 Shows a structural block diagram of a boundary adjustment provided according to an embodiment of the present specification;
[0043] Figure 6 Shows a curve graph of a coding function provided according to an embodiment of the present specification;
[0044] Figure 7A Shows a flowchart of a data processing method for decompressing a compressed frame provided according to an embodiment of the present specification;
[0045] Figure 7B Shows a flowchart of a boundary compensation provided according to an embodiment of the present specification;
[0046] Figure 8 Shows a structural flowchart of a boundary compensation provided according to an embodiment of the present specification;
[0047] Figure 9A Shows an overall adjustment function H 0 (f) curve graph;
[0048] Figure 9B Shows an overall adjustment function H 0 (f) curve graph;
[0049] Figure 9C Shows an overall adjustment function H 0 (f) curve graph;
[0050] Figure 9D Shows an overall adjustment function H 0 (f) curve graph;
[0051] Figure 10A Shows an overall adjustment function H of a normal mode 0 (f), boundary adjustment function H 1 (f) and decoding function H 2 (f) curve graph; and
[0052] Figure 10B Shows an overall adjustment function H of an enhanced mode 0 (f), boundary adjustment function H 1 (f) and decoding function H 2 (f) curve graph. Detailed implementation manners
[0053] The following description provides specific application scenarios and requirements of this specification, aiming to enable those skilled in the art to manufacture and use the content in this specification. For those skilled in the art, various partial modifications to the disclosed embodiments are obvious, and without departing from the spirit and scope of this specification, the general principles defined here can be applied to other embodiments and applications. Therefore, this specification is not limited to the illustrated embodiments, but rather to the broadest scope consistent with the claims.
[0054] The terms used herein are for the purpose of describing specific example embodiments only and are not restrictive. For example, unless the context clearly dictates otherwise, as used herein, the singular forms "a", "an" and "the" may also include the plural forms. When used in this specification, the terms "comprising", "including" and / or "containing" mean that the associated integers, steps, operations, elements and / or components exist, but do not exclude the existence of one or more other features, integers, steps, operations, elements, components and / or groups, or the addition of other features, integers, steps, operations, elements, components and / or groups in the system / method.
[0055] In view of the following description, these features of this specification and other features, as well as the operations and functions of the related elements of the structure, and the economy of the combination and manufacture of the components can be significantly improved. Referring to the accompanying drawings, all of these form a part of this specification. However, it should be clearly understood that the drawings are for illustrative and descriptive purposes only and are not intended to limit the scope of this specification. It should also be understood that the drawings are not drawn to scale.
[0056] The flowcharts used in this specification illustrate the operations implemented by the system according to some embodiments in this specification. It should be clearly understood that the operations in the flowchart may not be implemented in sequence. On the contrary, the operations may be implemented in reverse order or simultaneously. In addition, one or more other operations may be added to the flowchart. One or more operations may be removed from the flowchart.
[0057] On the one hand, this specification provides a data processing system 100 (hereinafter referred to as system 100). On the second hand, this specification describes a data processing method P200 for compressing data. On the third hand, this specification describes a data processing method P300 for decompressing compressed frames.
[0058] Figure 1 A schematic diagram of a data processing system 100 is shown. System 100 may include a data compression device 200, a data decompression device 300, and a transmission medium 120.
[0059] The data compression device 200 can receive an initial frame in the initial data to be compressed and compress the initial data using the data processing method P200 proposed in this specification to generate a compressed frame. The data compression device 200 can store data or instructions for executing the data processing method P200 described in this specification and execute the data and / or instructions.
[0060] The data decompression device 300 can receive the compressed frame and decompress the compressed frame using the data processing method P300 proposed in this specification to obtain a decompressed frame. The data decompression device 300 can store data or instructions for executing the data processing method P300 described in this specification and execute the data and / or instructions.
[0061] The data compression device 200 and the data decompression device 300 can include a wide range of devices. For example, the data compression device 200 and the data decompression device 300 can include desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, handheld devices such as smart phones, televisions, cameras, display devices, digital media players, video game consoles, in-vehicle computers, or the like.
[0062] Such as Figure 1As shown, the data compression device 200 and the data decompression device 300 can be connected through the transmission medium 120. The transmission medium 120 can facilitate the transmission of information and / or data. The transmission medium 120 can be any data carrier that can transmit compressed frames from the data compression device 200 to the data decompression device 300. For example, the transmission medium 120 can be a storage medium (e.g., an optical disc), a wired or wireless communication medium. The communication medium can be a network. In some embodiments, the transmission medium 120 can be any type of wired or wireless network, or a combination thereof. For example, the transmission medium 120 can include a cable network, a wired network, an optical fiber network, a telecommunication network, an intranet, the Internet, a local area network (LAN), a wide area network (WAN), a wireless local area network (WLAN), a metropolitan area network (MAN), a wide area network (WAN), a public switched telephone network (PSTN), a Bluetooth network, a ZigBee network, a near field communication (NFC) network, or a similar network. One or more components in the data decompression device 300 and the data compression device 200 can be connected to the transmission medium 120 to transmit data and / or information. The transmission medium 120 can include routers, switches, base stations, or other devices that facilitate communication from the data compression device 200 to the data decompression device 300. In other embodiments, the transmission medium 120 can be a storage medium, such as a mass storage device, a removable storage device, a volatile read / write memory, a read-only memory (ROM), or similar content, or any combination thereof. Exemplary mass storage may include non-transitory storage media such as magnetic disks, optical discs, solid state drives, etc. Removable storage may include flash drives, floppy disks, optical discs, memory cards, zip disks, magnetic tapes, etc. Typical volatile read / write memory may include random access memory (RAM). RAM may include dynamic RAM (DRAM), double data rate synchronous dynamic RAM (DDR SDRAM), static RAM (SRAM), thyristor RAM (T-RAM), and zero capacitor RAM (Z-RAM), etc. ROM may include masked ROM (MROM), programmable ROM (PROM), virtual programmable ROM (PEROM), electrically programmable ROM (EEPROM), compact disc read-only memory (CD-ROM), and digital versatile disc ROM, etc. In some embodiments, the transmission medium 120 can be a cloud platform. Merely by way of example, the cloud platform may include forms such as private cloud, public cloud, hybrid cloud, community cloud, distributed cloud, inter-cloud, or forms similar to the above, or any combination of the above.
[0063] As Figure 1As shown, the data compression device 200 receives the initial data and executes the instructions of the data processing method P200 described in this specification to compress the initial data and generate a compressed frame; the compressed frame is transmitted to the data decompression device 300 through the transmission medium 120; the data decompression device 300 executes the instructions of the data processing method P300 described in this specification to decompress the compressed frame and obtain a decompressed frame.
[0064] Figure 2 The figure shows a schematic diagram of a data compression device 200 for data processing. The data compression device 200 can execute the data processing method P200 described in this specification. The data processing method P200 is introduced in other parts of this specification.
[0065] As Figure 2 As shown, the data compression device 200 includes at least one storage medium 230 and at least one compression-end processor 220. In some embodiments, the data compression device 200 may further include a communication port 250 and an internal communication bus 210. At the same time, the data compression device 200 may further include an I / O component 260.
[0066] The internal communication bus 210 can connect different system components, including the storage medium 230 and the compression-end processor 220.
[0067] The I / O component 260 supports input / output between the data compression device 200 and other components.
[0068] The storage medium 230 may include a data storage device. The data storage device may be a non-transitory storage medium or a transitory storage medium. For example, the data storage device may include one or more of a magnetic disk 232, a read-only storage medium (ROM) 234, or a random access storage medium (RAM) 236. The storage medium 230 further includes at least one set of instructions stored in the data storage device. The instructions are computer program code, and the computer program code may include programs, routines, objects, components, data structures, processes, modules, etc. for executing the data processing method provided in this specification.
[0069] The communication port 250 is used for data communication between the data compression device 200 and the outside world. For example, the data compression device 200 can be connected to the transmission medium 120 through the communication port 250.
[0070] At least one compression - side processor 220 communicates with at least one storage medium 230 through an internal communication bus 210. The at least one compression - side processor 220 is configured to execute the above - mentioned at least one instruction set. When the system 100 is running, the at least one compression - side processor 220 reads the at least one instruction set and executes a data - processing method P200 according to the indication of the at least one instruction set. The compression - side processor 220 can execute all steps included in the data - processing method P200. The compression - side processor 220 can be in the form of one or more processors. In some embodiments, the compression - side processor 220 can include one or more hardware processors, such as a microcontroller, a microprocessor, a reduced instruction set computer (RISC), an application - specific integrated circuit (ASIC), an application - specific instruction - set processor (ASIP), a central processing unit (CPU), a graphics processing unit (GPU), a physics processing unit (PPU), a microcontroller unit, a digital signal processor (DSP), a field - programmable gate array (FPGA), an advanced RISC machine (ARM), a programmable logic device (PLD), any circuit or processor capable of performing one or more functions, etc., or any combination thereof. For illustrative purposes only, only one compression - side processor 220 is described in the data - compression device 200 in this specification. However, it should be noted that the data - compression device 200 in this specification can also include multiple processors. Therefore, the operations and / or method steps disclosed in this specification can be executed by one processor as described in this specification or jointly executed by multiple processors. For example, if the compression - side processor 220 of the data - compression device 200 in this specification executes step A and step B, it should be understood that step A and step B can also be executed jointly or separately by two different compression - side processors 220 (e.g., the first processor executes step A, the second processor executes step B, or the first and second processors jointly execute steps A and B).
[0071] Although the above structure is described for the data - compression device 200, this structure is also applicable to the data - decompression device 300. The data - decompression device 300 can execute the data - processing method P300 described in this specification. The data - processing method P300 is introduced in other parts of this specification.
[0072] Data processing methods P200, P300 and system 100 can be used for data compression and decompression to improve the transmission efficiency of the data, save resources and space. The data can be non-real-time data or real-time data. There are various types of data in traditional broadcast film and television to a large number of current monitoring and Internet applications. For example, the data can be non-real-time video data, audio data or image data, etc. The data can also be real-time map data, real-time sensor data, real-time video surveillance data, network monitoring data, meteorological data, aerospace data, etc. For instance, the data can be map data received by an autonomous vehicle from a base station during driving. This specification does not limit the specific categories of the data. The methods and steps adopted by the data processing methods P200, P300 and system 100 described in this specification are the same when processing different categories of data. For the convenience of demonstration, this specification will describe it by taking the processing of video data as an example.
[0073] In data compression and data decompression, compression and decompression are often carried out in units of frames. A frame is a processing unit that constitutes a data sequence. The initial data can include one or more initial frames. Each initial frame includes initial data of a preset number of bytes. In video compression, the initial data can be initial video data, and the initial frame can be a frame image in the initial video data. In traditional video compression technologies, the H.264 and H.265 standards are usually used to encode the initial video data, so as to achieve the purpose of compressing the video data. The main technical means adopted by the H.264 and H.265 standards when encoding video data is predictive coding, that is, predicting the initial data in the video data to obtain a predicted value, and then subtracting the predicted value from the initial value of the initial data to obtain a residual value, thereby compressing the video data. When restoring and decompressing (i.e., decoding), adding the residual value and the predicted value can restore the initial frame.
[0074] The data processing methods P200, P300 and system 100 provided in this specification can combine boundary adjustment and encoding during data compression to reduce the amount of data during encoding, improve the compression efficiency of video data, and enhance the transmission efficiency of the video; during data decompression, boundary compensation can be combined with decoding to decompress the compressed data that has undergone boundary adjustment and encoding, so that the decompressed data can be restored to the initial data.
[0075] The data processing method P200 can perform data compression on the video data. The data processing method P200 can adopt a method combining encoding (i.e., prediction and residual calculation) and boundary adjustment to perform data compression on the initial frame to obtain a compressed frame. Specifically, the data processing method P200 can perform the boundary adjustment and the encoding on the frame being compressed. The frame being compressed includes the initial frame and any data state before the initial frame becomes the compressed frame during the data compression process. The boundary adjustment refers to adjusting the amplitude of the spectrogram of the data to be processed. For example, the boundary adjustment can adjust the amplitude of the selected region in the frequency domain of the data to be processed, such as the amplitude in the intermediate frequency region, the high frequency region, or the amplitude from the low frequency to the intermediate frequency region, or the amplitude from the intermediate frequency to the high frequency region, etc. In some embodiments, the boundary adjustment can be implemented by a boundary adjustment coefficient greater than 0 and less than 1 to attenuate the amplitude of the selected region in its frequency domain, thereby reducing the data information amount in the data to be processed. Those of ordinary skill in the art can understand that the frequency components of the data with attenuated amplitude become smaller in the selected frequency region, and the information amount in the data decreases. Therefore, the encoding efficiency of the data with attenuated amplitude can be improved, and the compression ratio can be increased.
[0076] The data processing method P300 can perform data decompression on the compressed frame that has undergone the data compression by the data processing method P200 to obtain a decompressed frame to restore the video data. The data processing method P300 can adopt a method combining decoding (i.e., restoring the frame being compressed according to the residual value and the predicted value) and boundary compensation to perform data decompression on the compressed frame to restore the data in the compressed frame. Specifically, the data processing method P300 can perform the boundary compensation and the decoding on the frame being decompressed. The frame being decompressed can include the compressed frame and any data state before the compressed frame becomes the decompressed frame during the data decompression process. The boundary compensation can enable the data that has undergone the boundary adjustment to be completely restored or approximately restored to the state before the boundary adjustment without considering other calculation errors.
[0077] Therefore, the data processing methods P200, P300 and the system 100 can significantly improve the compression efficiency of video data, reduce data loss during video data compression, improve the transmission efficiency, restoration rate of the video and the clarity of the decompressed video, and reduce the noise in the decompressed video. The specific processes of the boundary adjustment and the boundary compensation will be described in detail in the following description.
[0078] When the system 100 performs data compression on video data, the order of the boundary adjustment and the encoding can be interchanged or can be performed alternately. The boundary adjustment can be performed before or after the encoding. Similarly, when the system 100 performs data decompression on the compressed frames, the order of the boundary compensation and the decoding can be interchanged or can be performed alternately. It should be noted that to ensure that the data information after decompression can restore the information in the original data, the order of the boundary compensation and the decoding in the data decompression should correspond to the order of the boundary adjustment and the encoding in the data compression, that is, the boundary compensation and the decoding can be symmetrically and reversely operated with the boundary adjustment and the encoding. For example, if the compressed frame is obtained by first performing the boundary adjustment and then the encoding, the compressed frame should be first decoded and then the boundary compensation during data decompression. For the convenience of description, we define the data in the original frame before data compression processing as P 0 , and define the data in the decompressed frame obtained by decompressing through the data decompression device 300 as P 4 .
[0079] In the data processing method P200, when the data compression device 200 performs data compression on the original frame, it can first perform the boundary adjustment on the original frame and then perform the encoding; or it can first perform the encoding on the original frame and then perform the boundary adjustment. Figures 3A to 3C The figure shows some flowcharts of data compression and data decompression provided according to the embodiments of the present specification.
[0080] Figure 3A The figure shows a flowchart of a data compression and data decompression provided according to the embodiments of the present specification. As Figure 3A shown, the data compression device 200 can perform data compression on the original data as follows: the data compression device 200 first performs the boundary adjustment on the original frame P 0 , and then performs the encoding, that is, performs prediction and residual calculation on the original frame after the boundary adjustment to obtain the predicted data PI and the residual data R, and inputs the predicted data PI and the residual data R into the bitstream generation module for synthesis to obtain the compressed frame. The compressed frame includes the predicted data PI and the residual data R. Among them, the compressed frame can be the original frame P 0 . For the convenience of display, we define the data obtained after the boundary adjustment as the encoded adjustment frame P 1 . As mentioned above, the boundary adjustment can adjust the compressed frame (original frame P 0)It is divided into multiple units, and the boundary adjustment is performed on each unit using the corresponding boundary adjustment coefficient. In some embodiments, the data compression device 200 may also input the encoding function and the boundary adjustment coefficient corresponding to each unit in the boundary adjustment into the bitstream generation module for synthesis. That is, the compressed frame may also include the encoding function and the boundary adjustment coefficient corresponding to each unit in the boundary adjustment. For the convenience of display, we define the data of the encoding function and the boundary adjustment coefficient corresponding to each unit in the compressed frame as the encoded data RAMI (Regional Amplitude Modulation Information). For the convenience of display, in Figure 3A , we will describe it by taking the compressed frame including the encoded data RAMI as an example. The encoding function and the boundary adjustment coefficient in the boundary adjustment will be introduced in detail in the following description. Figure 3A The data compression method shown can improve the encoding efficiency, further reduce the amount of data in the compressed frame, increase the compression ratio, and at the same time can reduce data loss and avoid detail loss.
[0081] Such as Figure 3A shown, the data decompression device 300 decompresses the compressed frame as follows: The data decompression device 300 first decodes the compressed frame and then performs boundary compensation. Specifically, the data decompression device 300 can first decode the compressed frame, that is, parse the compressed frame based on the bitstream parsing module to generate the predicted data PI, the residual data R, and the encoded data RAMI; then predict based on the predicted data PI to obtain a predicted frame, and superimpose it with the residual data R to obtain a decoded frame. For the convenience of description, we define the data in the decoded frame as P 2 . Then the data decompression device 300 uses the decoded data corresponding to the encoded data RAMI based on the encoded data RAMI to perform 2 boundary compensation on the decoded frame P 4 to obtain the decompressed frame P 2 for output. The in-frame decoding may be the decoded frame P 2) It is divided into multiple units, and boundary compensation is performed on each unit using a boundary compensation coefficient corresponding to the boundary adjustment coefficient. The decoded data may include a decoding function and a boundary compensation coefficient corresponding to each unit. The decoding function corresponds to the encoding function, and the boundary compensation coefficient corresponds to the boundary adjustment coefficient. Therefore, the data decompression device 300 can determine the decoding function and the boundary compensation coefficient corresponding to each unit based on the encoded data RAMI. The specific content of the decoding function and the boundary compensation coefficient corresponding to the boundary compensation will be introduced in detail in the following description. For the convenience of display, we will use the decompressed frame P 4 and the initial data P 0 The transfer function between them is defined as the overall spectrum adjustment function H 0 (f). Figure 3A The method shown can reduce the amount of data in the compressed frame, thereby improving the compression ratio and encoding efficiency of the initial data, enhancing the transmission efficiency of the initial data, and at the same time reducing data loss and avoiding detail loss.
[0082] The data compression device 200 can also perform data compression on the initial data by integrating the boundary adjustment into the encoding process. The boundary adjustment can be performed at any stage during the encoding process. Correspondingly, the boundary compensation can also be performed at the corresponding stage during the decoding process.
[0083] Figure 3B shows a flowchart of data compression and data decompression provided according to an embodiment of the present specification. As Figure 3B shown, the data compression device 200 can perform data compression on the initial data as follows: The data compression device 200 first predicts the initial frame P 0 to obtain a predicted frame and predicted data PI, and then performs boundary adjustment and residual calculation on the initial frame P 0 and the predicted frame to obtain the residual data R; The predicted data PI, the residual data R, and the encoded data RAMI are input into the bitstream generation module for synthesis to obtain the compressed frame. The compressed frame can be the predicted frame and the initial frame P 0 . Figure 3B The specific operations of the data compression shown Figure 3A are the same as the method shown, except for the operation order. The content of the boundary adjustment will be introduced in detail in the following description.
[0084] As Figure 3BAs shown, the data decompression device 300 decompressing the compressed frame may be: during the decoding process of the compressed frame by the data decompression device 300, boundary compensation is performed. Specifically, the data decompression device 300 may first parse the compressed frame based on the bitstream parsing module to generate the predicted data PI, the residual data R, and the coded data RAMI; perform prediction based on the predicted data PI to obtain a predicted frame; based on the coded data RAMI, use the corresponding decoded data to perform boundary compensation on the predicted frame; superimpose the predicted frame after the boundary compensation and the residual data R, and perform boundary compensation on the superimposed data to obtain the decompressed frame P 4 The frame during decompression may be the predicted frame and the superimposed data of the predicted frame and the residual data R. For ease of description, we define the data in the superimposed frame as P 3 Specifically, for the superimposed frame P 3 The specific process of performing boundary correction on the boundary in it will be specifically described in the following content.
[0085] Figure 3B The method shown can reduce the amount of data in the compressed frame, thereby improving the compression ratio and coding efficiency of the initial data, enhancing the transmission efficiency of the initial data, and at the same time reducing data loss and avoiding detail loss.
[0086] Figure 3C shows a flowchart of data compression and data decompression provided according to an embodiment of the present specification. As Figure 3C shown, the data compression device 200 compressing the initial data may be: the data compression device 200 first performs prediction and residual calculation on the initial frame P 0 to obtain the predicted data PI and the residual R 1 , and then performs the boundary adjustment on the residual R 1 to obtain the residual data R; input the residual data R, the predicted data PI, and the coded data RAMI after the boundary adjustment into the bitstream generation module for synthesis to generate the compressed frame. The frame during compression may be the residual R 1 . Figure 3C The specific operation of the data compression method shown is the same as the method shown in Figure 3A , except for the operation order. The content regarding the boundary adjustment will be introduced in detail in the following description.
[0087] As Figure 3CAs shown, the data decompression of the compressed frame by the data decompression device 300 may be as follows: The data decompression device 300 parses the compressed frame based on the bitstream parsing module to generate the predicted data PI and the residual data R; then predicts the predicted frame according to the predicted data PI; based on the encoded data RAMI, uses the corresponding decoded data to perform boundary compensation on the residual data R to obtain the residual R 1 ; and adds the residual R 1 to the predicted frame to obtain the decompressed frame P 4 . The in-frame decoding may be the residual data R
[0088] Figure 3C The method shown can reduce the amount of data in the compressed frame, thereby improving the compression ratio and encoding efficiency of the initial data, enhancing the transmission efficiency of the initial data, and at the same time reducing data loss and avoiding detail loss
[0089] Figure 4A The flowchart of a data processing method P200 for compressing data is shown. As described above, the data compression device 200 can execute the data processing method P200. Specifically, the storage medium in the data compression device 200 can store at least one set of instruction sets. The instruction sets are configured to instruct the compression processor 220 in the data compression device 200 to complete the data processing method P200. When the data compression device 200 runs, the compression processor 220 can read the instruction sets and execute the data processing method P200. As Figure 4A shown, the method P200 may include:
[0090] S220: Select the initial frame P in the initial data 0 .
[0091] A frame is a processing unit that makes up a data sequence. During data processing, calculations are often performed in units of frames. The initial data may include one or more initial frames. The initial frame P 0 includes the initial data of a preset number of bytes. As described above, in this specification, video data is used as an example for description. Therefore, the initial data may be initial video data, and the initial frame P 0 may be a frame image in the initial video data. In step S220, the data compression device 200 may select a part of the frame images from the initial data as the initial frame P 0 , or may select all the frame images in the initial data as the initial frame P 0 . The data compression device 200 may select the initial frame P according to the application scenario of the initial data 0If the initial data is applied to scenarios with low requirements for accuracy and compression quality, some frame images can be selected as the initial frame P. 0 , for example, there are usually no foreign objects in the monitoring images in secluded places. Therefore, most frame images of the monitoring images in secluded places are the same, and the data compression device 200 can select some frame images from them as the initial frame P. 0 for compression and transmission. Another example is that for high-definition TV playback videos, in order to ensure the viewing effect, the data compression device 200 can select all frame images as the initial frame P. 0 for compression and transmission.
[0092] S240: Perform the data compression on the initial frame P 0 to obtain a compressed frame.
[0093] The data compression can include performing the boundary adjustment and the encoding on the frame being compressed. The performing of the boundary adjustment on the frame being compressed can be to input the frame being compressed into a boundary adjuster for boundary adjustment. The frame being compressed can include the initial frame P 0 and any data state before the initial frame P 0 becomes the compressed frame during the data compression process. For example, the frame being compressed includes the initial frame P 0 and the initial frame P 0 in any data state during the process of performing the boundary adjustment and encoding, such as, for example, an initial frame, a predicted frame, a residual frame, and so on.
[0094] The boundary adjustment refers to adjusting the amplitude of the spectrogram of the frame being compressed. For example, the boundary adjustment can adjust the amplitude of a selected region in the frequency domain of the frame being compressed, such as the amplitude in the intermediate frequency region, the high frequency region, or the amplitude from the low frequency to the intermediate frequency region, or the amplitude from the intermediate frequency to the high frequency region, and so on. In some embodiments, the boundary adjustment can be implemented by a boundary adjustment coefficient to adjust the amplitude of a selected region in its frequency domain. For example, the boundary adjustment can be implemented by a boundary adjustment coefficient greater than 0 and less than 1 to attenuate the amplitude of a selected region in its frequency domain, thereby reducing the amount of data information in the frame being compressed. For different forms of data, the receiver's sensitivity to frequencies is different. Therefore, the data compression operation can select different regions in the frequency domain for amplitude attenuation according to different forms of data. The intermediate frequency to high frequency components in the spectrum of a frame of data are mainly concentrated in the regions where the data changes violently in this frame of data, that is, the boundary data of the data. As mentioned above, taking video data as an example, for a frame of image, for example, the intermediate frequency to high frequency data is mainly concentrated at the boundaries of the objects in the image, that is, the boundary data of this frame of image. Since the intermediate frequency and high frequency information is rich in the edge parts of the objects in the picture, and the intermediate frequency and high frequency regions carry more data. Therefore, reducing the amplitude of the intermediate frequency to high frequency region will visually blur the boundary data of the frame being compressed, and at the same time greatly reduce the amount of information in the image. It should be noted that reducing the amplitude of the low frequency region will also reduce the amount of information in the image. In this specification, taking video data as an example, the boundary adjustment can be to adjust the amplitude of the intermediate frequency to high frequency region of the frame being compressed, such as attenuating the amplitude of the intermediate frequency to high frequency region to reduce the amount of data information in the intermediate frequency to high frequency region. Those of ordinary skill in the art can understand that compared with the situation without boundary adjustment processing, the amplitude of the intermediate frequency to high frequency region in the intermediate state frame after boundary adjustment processing is attenuated, and the amount of data information is also reduced. Therefore, the intermediate state frame after boundary adjustment processing will have a higher compression ratio in encoding.
[0095] Taking video data compression as an example, the data processing method P200 can adopt a method combining boundary adjustment and encoding to compress the initial frame P 0 to adjust the amplitude of the intermediate frequency to high frequency region to reduce the amount of data information, further improve the compression ratio of video data, and enhance the efficiency of video transmission. As mentioned above, when compressing the initial frame P 0 the order of the boundary adjustment and the encoding can be interchanged, or they can be carried out alternately. Step S240 can include Figure 3A 、 Figure 3B and Figure 3C at least one of the data compression methods shown in. For the convenience of display, this specification will use Figure 3ATaking the shown manner as an example, step S240 is described in detail. That is, the data compression device 200 processes the initial frame P 0 to perform the boundary adjustment first, so that the initial frame P 0 has an amplitude attenuation in the intermediate frequency to high frequency region, thereby making the boundary information of the initial frame P 0 blurred to obtain the encoded adjustment frame P 1 , so as to reduce the amount of information in the initial frame P 0 , thereby reducing the space resources occupied after compression of the initial frame P 0 ; then encode the encoded adjustment frame P 1 (i.e., prediction and residual calculation), predict the encoded adjustment frame P 1 to obtain the predicted frame of the encoded adjustment frame P 1 and the predicted data PI; then subtract the predicted frame of the encoded adjustment frame P 1 from the encoded adjustment frame P 1 to obtain the residual data R; input the residual data R, the predicted data PI, and the encoded data RAMI into the bitstream generation module for synthesis to obtain the compressed frame. The data processing method P200 can improve the encoding efficiency of the encoded adjustment frame P 1 , further reduce the amount of data in the compressed frame, improve the encoding efficiency, and increase the compression ratio. Since the object of the boundary adjustment is the initial frame P 0 , the frame being compressed is the initial frame P 0 . Taking video data as an example, in step S240, the data compression of the frame being compressed (initial frame) may include executing by at least one compression end processor 220 of the data compression device 200:
[0096] S242: Perform the boundary adjustment on the frame being compressed (initial frame P 0 ), to obtain the encoded adjustment frame P 1 . Figure 4B shows a flowchart of a boundary adjustment provided according to an embodiment of the present specification; Figure 5 shows a structural block diagram of a boundary adjustment provided according to an embodiment of the present specification. As Figure 4B and Figure 5 shown, step S242 may include executing by at least one compression end processor 220 of the data compression device 200:
[0097] S242-2: Divide the frame being compressed (initial frame P 0 ) into multiple units based on a preset unit size.
[0098] As we know, when encoding the image data and video data, the data processing unit for processing can be a frame of data or a part of a frame of data. For example, we can divide a frame of data into several regions and then encode each region separately. Taking video data as an example, the region can be a frame or a field of an image, or a part of a frame / field of an image. For example, in video coding, an image is further divided into slices, tiles, coding units (CUs), macroblocks, blocks, or subblocks. A region is usually an NxN square or an MxN rectangle. The region includes but is not limited to the above names. For the convenience of description, we define each region as a unit. The boundary adjustment can take the above units as the adjustment objects and perform the boundary adjustment on each unit. Here, the size of the unit can be arbitrarily selected as needed, that is, the values of M and N can be any integers, such as 4, 8, 16, 32, 16, 128, or 256, and can even be smaller, such as 2. In some embodiments, the unit may only contain one pixel. When the resolution of a frame of image is higher, the size of the unit can also be larger. As mentioned above, the 0 (initial frame P 0 ) can be divided into multiple units. For the convenience of description, we define the data of the unit in the i-th row and j-th column in the initial frame P
[0099] S242-4: Adjust the amplitude of each unit in the medium-frequency to high-frequency region by using the corresponding boundary adjustment coefficient thereof.
[0100] Taking video data as an example, the boundary adjustment can be to adjust the amplitude of each unit in multiple units of the 0 (initial frame P 0 ) in the medium-frequency to high-frequency region by using the corresponding boundary adjustment coefficient thereof, so as to reduce the amplitude of the whole (initial frame P
[0101] S242-42: Select a function from a preset set of coding functions as the coding function Adjust the current unit through the coding function to obtain a first unit The components in the low-frequency region of it in the frequency domain are retained while the components in the medium-frequency to high-frequency regions are attenuated.
[0102] Wherein, represents the current cell at the i-th row and j-th column corresponding encoding function. The encoding function can be a low-pass filter in the frequency domain to make the initial frame P 0 the current cell in smoothly decrease in amplitude in the frequency domain, so that the initial frame P 0 the current cell in the components in the low-frequency region of it in the frequency domain are retained while the components in the medium-frequency to high-frequency regions are attenuated, thereby obtaining the first cell corresponding to the current cell In order to save the computational amount required in the implementation process and avoid the occurrence of the ringing effect, the encoding function should make the amplitude of the current cell smoothly transition in the frequency domain. The encoding function can be any form of low-pass filter with smooth transition, and this specification does not limit it.
[0103] It should be noted that, in order to avoid the ringing effect, the encoding function is a curve with smooth transition to avoid the sharp change of the amplitude adjustment gain in the curve. As mentioned above, the ringing effect refers to that in image processing, when performing spectral adjustment processing on an image, if the selected encoding function has a rapid change, it will cause "ringing" in the image. The so-called "ringing" refers to the oscillation generated at the place where the gray level of the output image changes violently, just like the air oscillation generated after a bell is struck. The ringing effect often appears at the image boundary.
[0104] Adjusting the current cell through the encoding function can be manifested as convolving the current cell with the encoding convolution kernel in the time domain. Adjusting the current cell through the encoding function can be expressed as multiplying the transfer function in the frequency domain of the current cell (i.e., the encoding function) or performing the corresponding convolution calculation in the time domain. If the current cell is digital data, the convolution operation can be to select the encoding convolution kernel corresponding to the encoding function to perform the convolution operation. For the convenience of description, this specification will take the convolution in the time domain as an example to describe the adjustment of the current cell through the encoding function for adjustment. However, those skilled in the art should understand that multiplying by an encoding function in the frequency domain is also within the scope of protection of this specification.
[0105] The encoding function group may be stored in the storage medium of the data compression device 200. The encoding function group may include at least one different encoding function. Each encoding function corresponds to an encoding convolution kernel. That is to say, the storage medium of the data compression device 200 may include at least one encoding convolution kernel. When the data compression device 200 performs convolution on the current unit it can arbitrarily select one from the encoding function group as the encoding function corresponding to the current unit and use its corresponding convolution kernel as the encoding convolution kernel to perform convolution on the current unit
[0106] When performing boundary adjustment processing on an image, if there are regions with drastic numerical changes in the selected encoding function, a convolution kernel or a combination of convolution kernels with a higher order is required in the implementation process. This means increasing unnecessary computational complexity. At the same time, a higher-order convolution kernel is more likely to cause a strong color oscillation at the locations where the grayscale or color of the output image changes drastically, which is called the ringing effect. The ringing effect often appears at the image boundary. By making the encoding function smoothly transition the amplitude adjustment gain for the current unit in the frequency domain, the sharp change of the amplitude adjustment gain can be avoided. For example, when the low-frequency region is not connected to the middle-frequency region, the encoding function can adjust the amplitude of the middle-low frequency region of the current unit in the frequency domain so that the change of the amplitude adjustment gain in the middle-low frequency region is smooth and continuous.
[0107] Compared with the encoding function The ratio of the absolute value of the sum of negative coefficients to the sum of non - negative coefficients in the corresponding encoded convolution kernel should be less than 0.1. For example, in some embodiments, the convolution kernel coefficients in the encoded convolution kernel can all be non - negative numbers. Taking video data as an example, when there are many negative coefficients in the encoded convolution kernel, the pixel values at the image boundary differ greatly. A large pixel value multiplied by a negative coefficient will make the final result of the convolution smaller, which is reflected in the image as darker pixels. If the convolution result is negative and the absolute value of the negative number is large, when calculating the convolution result using unsigned integer calculation, it may cause the unsigned integer calculation result to be reversed, taking the unsigned complement code value of a negative number, which will lead to a larger convolution result, reflected in the image as brighter pixels. Therefore, when designing the encoded convolution kernel, the coefficients of the encoded convolution kernel can all be non - negative numbers, or the ratio of the absolute value of the sum of negative coefficients to the sum of non - negative coefficients in the encoded convolution kernel should be less than 0.1, that is, a small number of negative coefficients with small absolute values are allowed to appear in the encoded convolution kernel.
[0108] Figure 6 shows a coding function provided according to an embodiment of the present specification curve schematic diagram. The horizontal axis is the normalized frequency f, and the vertical axis is the amplitude adjustment gain H of the coding function 1 . The normalized frequency f on the horizontal axis can be divided into a low - frequency region, a mid - low - frequency region, a mid - frequency region, a mid - high - frequency region, and a high - frequency region. The definitions of the low - frequency, mid - frequency, and high - frequency regions for different types of data can be different. For example Figure 6 As shown, the maximum value of the normalized frequency on the horizontal axis is 0.5. The high-frequency region may include frequencies between (d, 0.5] in the normalized frequency domain, where d is the lower frequency limit of the high-frequency region. For example, d may be any one of the frequencies 0.35, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41, 0.42, 0.43, 0.44, and 0.45 in the normalized frequency domain. In some embodiments, the high frequency may include frequencies between (0.33, 0.5] in the normalized frequency domain. For example, the high frequency may include an interval between any two of the frequencies 0.33, 0.34, 0.35, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47, 0.48, 0.49, 0.5 in the normalized frequency domain, where 0.5 is the maximum normalized frequency. The intermediate-frequency region may include frequencies between (b, c], where b is the lower frequency limit of the intermediate-frequency region and c is the upper frequency limit of the intermediate-frequency region. For example, the lower frequency limit b of the intermediate-frequency region may be any one of the frequencies 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, and 0.28 in the normalized frequency domain; the upper frequency limit c of the intermediate-frequency region may be any one of the frequencies 0.35, 0.34, 0.33, 0.32, and 0.31 in the normalized frequency domain. The low-frequency region may include frequencies between [0, a] in the normalized frequency domain, where a is the upper frequency limit of the low-frequency region. The upper frequency limit a of the low-frequency region may be any one of the frequencies 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.10, 0.12, 0.13, 0.14, and 0.15 in the normalized frequency domain. When the low-frequency region is not connected to the intermediate-frequency region, the frequency region between the two is called the intermediate-low-frequency region. When the intermediate-frequency region is not connected to the high-frequency region, the frequency region between the two is called the intermediate-high-frequency region.
[0109] Encoding function can filter the components in the intermediate-frequency to high-frequency regions. Encoding function The stopband interval in can be any interval between frequencies 0.15 to 0.50. For example, encoding function The stopband interval in can be within the interval specified by any two of the values 0.15, 0.17, 0.19, 0.21, 0.23, 0.25, 0.27, 0.29, 0.31, 0.33, 0.35, 0.37, 0.39, 0.41, 0.43, 0.45, and 0.50. Encoding function The passband interval in can be any interval between frequencies 0 and 0.35. For example, the passband interval in the encoding function
[0110] It should be noted that Figure 6 only video data is taken as an example for illustration. Those skilled in the art should understand that the curve of the encoding function is not limited to Figure 6 the form shown. All encoding functions that can smoothly reduce the amplitude of the current unit in the frequency domain, so that the components of the current unit 0 in the initial frame P in the low-frequency region of the frequency domain are retained while the components in the medium-frequency to high-frequency regions are attenuated, as well as the linear combination of the encoding function and or the product combination of the encoding function or the combination of the linear combination and the product combination all fall within the scope of protection of this specification. Among them, m ≥ 1, represents the linear combination of n functions, represents the m-th function, and k represents the weight corresponding to the m-th function. q ≥ 1, m represents the product combination of n functions, and k represents the weight corresponding to the q-th function, q and can be any function.
[0111] Table 1 shows a parameter table of an encoding convolution kernel provided according to an embodiment of this specification. Table 1 exemplarily lists the parameters of an encoding convolution kernel. Among them, each row in Table 1 represents an encoding convolution kernel. For an 8-bit video image, it is necessary to ensure that the gray value of the pixel points in the first unit obtained after encoding convolution is within 0 to 255. Therefore, in this embodiment, the result of convolution needs to be divided by 16. The encoding convolution kernel is obtained through Fourier transform based on the encoding function Table 1 only gives an exemplary illustration. Those skilled in the art should know that the encoding convolution kernel is not limited to the parameters shown in Table 1. All encoding convolution kernels that can smoothly reduce the amplitude of the current unit in the frequency domain, so that the initial frame P0 the current unit Encoding convolution kernels in which components in the low-frequency region in the frequency domain are retained and components in the medium-frequency to high-frequency regions are attenuated fall within the scope of protection of this specification.
[0112]
[0113] As described above, in the boundary adjustment, the data compression device 200 may perform step S242-42 on each unit. Each unit After passing through the encoding function After adjustment, a corresponding first unit is obtained The encoding functions corresponding to all units Combined to form the encoding function H 1 (f). The encoding functions corresponding to each unit Can be combined according to the positions of the respective units to generate the encoding function H 1 (f), and the encoding function H 1 (f) can be regarded as a matrix. It should be noted that when performing step S242-42 on different units, the same encoding function (i.e., the encoding convolution kernel) can be selected, or different encoding functions (i.e., the encoding convolution kernel) can be selected. That is, different units The corresponding encoding function Can be the same or different.
[0114] The first units corresponding to all units Combined to form the first frame P 1b 。The first units corresponding to each unit Can be combined according to the positions of the respective units to generate the first frame P 1b , and the first frame P 1b Is a blurred image. P 0 And P 0b The relationship between them can be expressed by the following formula:
[0115] P 1b = P 0 H 1 (f) Formula (1)
[0116] As Figure 4B And Figure 5 Shown, when performing the boundary adjustment on the unit at the i-th row and the j-th column , step S242-4 can include performing on the current unit Execute:
[0117] S242-44: For the current unit And the first unit Find the difference to obtain the current cell The corresponding first boundary
[0118] The medium to high frequency components in the spectrum of each frame of data are mainly concentrated in the area where the data changes violently in this frame of data, that is, the boundary data of the data. For example, for a frame of image, the medium to high frequency data is mainly concentrated on the boundary of the object in the image, that is, the boundary data of this frame of image. The encoding function Makes the current cell The amplitude in the frequency domain decreases smoothly to attenuate the components in the medium to high frequency region. Therefore, the first cell Can be understood as the data with the boundary information in the current cell Removed. Next, find the difference between the current cell And the first cell To obtain the boundary of the current cell , that is, the first boundary Therefore, the first boundary Includes the current cell The components in the medium to high frequency region. The first boundary Includes the current cell The boundary information in. Each cell After going through steps S242-44, a corresponding first boundary is obtained The first boundaries corresponding to all cells Combined to form the first boundary frame E 1b . The first boundaries corresponding to each cell Can be combined according to the positions of each cell to generate the first boundary frame E 1b . The first boundary frame E 1b Can be expressed by the following formula:
[0119] E 1b =P 0 -P 1b =P 0 -P 0 H 1 (f) Formula (2)
[0120] As Figure 4B And Figure 5 Shown, when performing the boundary adjustment on the cell at the i-th row and j-th column , steps S242-4 can include executing on the current cell :
[0121] S242-46: Use the boundary adjustment coefficient corresponding to the current cell To the first boundary Adjust the amplitude value to obtain the current cell The corresponding coding boundary
[0122] For the sake of convenience in description, we define the boundary adjustment coefficient corresponding to the said boundary adjustment as g 1 . We define the cell at the i-th row and the j-th column The corresponding boundary adjustment coefficient as For a frame of image, there may be strong boundaries, weak boundaries, or both strong and weak boundaries at the same time. The strong boundary can be a boundary where the pixel values between adjacent pixels differ greatly. The weak boundary can be a boundary where the pixel values between adjacent pixels differ slightly. Through step S242-2, the initial frame P 0 is divided into multiple cells, thus dividing the initial frame P 0 into multiple small regions. The smaller the size of the cell, the more single the boundary contained in the cell. When the cell is small enough, each cell can include only strong boundaries or only weak boundaries. Therefore, by dividing the initial frame P 0 into multiple cells through step S242-2, the data compression device 200 can adjust the boundary information of each cell separately.
[0123] For an image data or video data, when encoding the image data or video data using the standard H.264 / H.265, it may cause some loss of details in certain images and videos to a certain extent. That is to say, for those weak boundaries where the difference between adjacent pixels is small, after the encoding process, the difference between them may become even smaller or even disappear, resulting in loss of details in the image data or video data. Therefore, in order to avoid the loss of weak boundaries with small differences between adjacent pixel points during the encoding and decoding processes, the boundary adjustment can enhance the amplitude value of those weak boundaries with small differences between adjacent pixel points in the intermediate frequency to high frequency regions, thereby increasing the difference between the pixel values of adjacent pixels in the weak boundaries, avoiding the loss of weak boundaries during the encoding process, avoiding loss of details, and enabling the details to still be retained after encoding and decoding.
[0124] For those strong boundaries where the difference between adjacent pixels is large, they will not disappear after encoding and decoding processes. The boundary adjustment can attenuate the amplitude value of those strong boundaries with large differences between adjacent pixel points in the intermediate frequency to high frequency regions to reduce the difference between the pixel values of adjacent pixels in the strong boundaries, thereby reducing the data information contained in the strong boundaries and improving the compression ratio. The difference between adjacent pixel points in the strong boundaries is large enough, and even after the amplitude attenuation through the boundary adjustment, the remaining boundaries are still large enough and will not disappear after encoding and decoding processes.
[0125] Taking video data as an example, when using the boundary adjustment coefficient to adjust the amplitude of the first boundary , it is necessary to retain as much as possible the information contained in the initial frame P 0 without loss, so that the information can be better restored during decompression. Therefore, the boundary adjustment coefficient should be greater than 0. After being processed by the boundary adjustment coefficient , the amplitude of the encoded boundary in the intermediate frequency to high frequency region is also greater than zero, and there will be no data loss. Therefore, all data can be restored when decompressing the compressed data. Otherwise, if the boundary adjustment coefficient has a zero point, the data in the intermediate frequency to high frequency region within the unit corresponding to the zero point may be lost, and the decoding end will not be able to restore the lost data during decompression, so the initial data cannot be restored.
[0126] In step S242-46, the data compression device 200 can determine the boundary adjustment coefficient corresponding to the current unit according to the magnitude of the boundary value of the first boundary corresponding to the current unit . Different units may have different boundary adjustment coefficients . The boundary value can be the value corresponding to each pixel in the first boundary . Step S242-46 may include:
[0127] S242-462: Determine that the boundary value of the first boundary corresponding to the current unit is less than a preset first threshold, and enhance the amplitude of the first boundary through the boundary adjustment coefficient greater than 1 .
[0128] S242-464: Determine that the boundary value of the first boundary corresponding to the current unit is greater than a preset second threshold, and reduce the amplitude of the first boundary through the boundary adjustment coefficient less than 1 .
[0129] In step S242-462, if the boundary value in the first boundary corresponding to the current unit is less than the first threshold, it means that the current unit contains a weak boundary, which contains a lot of fine details. At this time, use the boundary adjustment coefficient greater than 1 to process the current unit The corresponding first boundary Adjust the amplitude of the intermediate frequency to high frequency region to enhance the current unit The corresponding first boundary Adjust the amplitude of the intermediate frequency to high frequency region of, maintain the signal-to-noise ratio of the current unit To avoid the weak boundary in the current unit During the data compression (prediction and residual calculation) process, avoid detail loss and ensure the coding effect. The data processing method P200 can enhance the data information amount of the weak boundary while improving the data compression efficiency, so as to avoid detail loss during the data compression process, that is, while improving the data compression efficiency, reduce data distortion. The first threshold can be 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, and so on. In some embodiments, the first threshold can be smaller, for example, 1, 2, 3, 4, and so on. In some embodiments, the first threshold can be any number between 5 and 30.
[0130] In step S242-464, if the first boundary corresponding to the current unit The corresponding first boundary If the boundary value in is greater than the second threshold, it means that the current unit Contains a strong boundary, then use a boundary adjustment coefficient less than 1 and greater than 0 For the current unit The corresponding first boundary Adjust the amplitude of the intermediate frequency to high frequency region to reduce the current unit The corresponding first boundary The amplitude of the intermediate frequency to high frequency region of, thereby reducing the current unit The corresponding first boundary Reduce the signal strength in the intermediate frequency to high frequency region of, thereby reducing the data information amount, and can improve the data compression efficiency when performing prediction and residual calculation. The second threshold can be greater than the first threshold or equal to the first threshold.
[0131] It should be noted that when the first threshold and the second threshold are not equal, for the boundary value in the first boundary The boundary value between the first threshold and the second threshold (including the first threshold and the second threshold), no boundary adjustment may be performed, and at this time the boundary adjustment coefficient Can be 1.
[0132] In some embodiments, a first boundary adjustment coefficient group and a second boundary adjustment coefficient group may be pre-stored in the storage medium of the data compression device 200. The first boundary adjustment coefficient group includes at least one coefficient. And the coefficients in the first boundary adjustment coefficient group are all greater than 1. The coefficients in the first boundary adjustment coefficient group may be any number greater than 1. When the data compression device 200 executes step S242-462, it may select a coefficient from the preset first boundary adjustment coefficient group as the boundary adjustment coefficient Enhance the first boundary amplitude. In some embodiments, when the data compression device 200 selects the boundary adjustment coefficient from the preset first boundary adjustment coefficient group, it may make a selection according to the magnitude of the boundary value in the first boundary . The larger the boundary value of the first boundary , the smaller the corresponding boundary adjustment coefficient ; the smaller the boundary value of the first boundary , the larger the corresponding boundary adjustment coefficient .
[0133] The second boundary adjustment coefficient group includes at least one coefficient. And the coefficients in the second boundary adjustment coefficient group are all coefficients greater than 0 and less than 1. The coefficients in the second boundary adjustment coefficient group may be any number greater than 0 and less than 1. When the data compression device 200 executes step S242-464, it may select a coefficient from the preset second boundary adjustment coefficient group as the boundary adjustment coefficient Reduce the amplitude of the first boundary In some embodiments, when the data compression device 200 selects the boundary adjustment coefficient from the preset second boundary adjustment coefficient group, it may make a selection according to the magnitude of the boundary value in the first boundary . The larger the boundary value of the first boundary , the smaller the corresponding boundary adjustment coefficient ; the smaller the boundary value of the first boundary , the larger the corresponding boundary adjustment coefficient .
[0134] In some embodiments, the data compression device 200 may also determine the boundary adjustment coefficient corresponding to the current unit through an optimization algorithm Specifically, the data compression device 200 may establish an optimization equation. For example, the data compression device 200 may use the weighted value of the distortion rate and the code rate corresponding to the current unit as the optimization objective. That is, taking the current unit The minimum weighted value of the corresponding distortion rate and code rate is used as the optimization objective. Based on the optimization algorithm, the boundary adjustment coefficient is iteratively calculated to determine the boundary adjustment coefficient Using the boundary adjustment coefficient to adjust the amplitude of the first boundary .
[0135] As described above, in the boundary adjustment, the data compression device 200 can execute steps S242-46 for each unit. Each unit The corresponding first boundary After being adjusted by the boundary adjustment coefficient , a corresponding coding boundary The boundary adjustment coefficients corresponding to all units Combined to form the boundary adjustment coefficient g 1 . The boundary adjustment coefficients corresponding to each unit Can be combined according to the positions of the respective units to generate the boundary adjustment coefficient g 1 . The boundary adjustment coefficient g 1 Can be regarded as a matrix. It should be noted that the boundary adjustment coefficients Corresponding to different units Can be the same or different.
[0136] The coding boundaries corresponding to all units Combined to form the coding boundary frame E 1m . The coding boundaries corresponding to each unit Can be combined according to the positions of the respective units to generate the coding boundary frame E 1m . The relationship between E 1m and E 1b Can be expressed by the following formula:
[0137] E 1m = g 1 E 1b Formula (3)
[0138] As Figure 4B and Figure 5 shown, when performing the boundary adjustment on the unit in the i-th row and j-th column , steps S242-4 can include executing on the current unit :
[0139] S242-48: Superimpose the first unit with the coding boundary to obtain the coding unit corresponding to the current unit
[0140] Each unit The corresponding first unit And the coding boundary After superposition, a corresponding coded unit is obtained for each The coded units corresponding to all units Combined to form the coding adjustment frame P 1 。The coded units corresponding to each unit Can be combined according to the positions of the respective units to generate the coding adjustment frame P 1 。P 1 And E 1m And P 1b The relationship between them can be expressed by the following formula:
[0141] P 1 =E 1m +P 1b Formula (4)
[0142] Based on Formulas (1) to (4), it can be seen that the relationship between P 1 And P 0 The relationship between them can be expressed by the following formula:
[0143] P 1 =P 0 (g 1 (1 - H 1 (f)) + H 1 (f)) Formula (5)
[0144] For the sake of convenience of description, we define the transfer function between P 1 And P 0 As the coding transfer function H E (f), and the coding transfer function H E Can be expressed by the following formula:
[0145] H E (f) = g 1 (1 - H 1 (f)) + H 1 (f) Formula (6)
[0146] Thus, it can be seen that by step S242 - 2, the initial frame P 0 Is divided into multiple units, thereby dividing the initial frame P 0 Into multiple small regions, so that different boundary adjustment coefficients can be selected according to the characteristics of each unit Thereby, the adjustment of the signal strength of the components in the intermediate - frequency to high - frequency regions can be performed more flexibly, achieving a better balance between the coding effect and the bitstream size.
[0147] Such asFigure 4A As shown, step S240 may further include:
[0148] S244: Perform the encoding (prediction and residual calculation) on the encoded adjustment frame P 1 to obtain the predicted data PI and the residual data R.
[0149] S246: Input the predicted data PI and the residual data R into the bitstream generation module for synthesis to obtain the compressed frame.
[0150] In some embodiments, step S240 may further include:
[0151] S248: Input the encoding function 0 of each unit and the boundary adjustment coefficient during the boundary adjustment process of the initial frame P into the bitstream generation module for synthesis to obtain the compressed frame.
[0152] That is, input the encoding function H 0 corresponding to the initial frame P 1 (f) and the boundary adjustment coefficient g 1 into the bitstream generation module for synthesis to obtain the compressed frame. That is, the compressed frame includes not only the predicted data PI and the residual data R, but also the encoding function corresponding to each unit in the plurality of units and the boundary adjustment coefficient The encoding function corresponding to each unit and the boundary adjustment coefficient 1 That is the aforementioned encoded data RAMI. It should be noted that the boundary adjustment coefficient g can be the difference between the boundary adjustment coefficients That is, taking one of the plurality of units as the basic data, the boundary adjustment coefficients 1 corresponding to the remaining units are the differences between them and the basic data. The boundary adjustment coefficient g can also be the difference between it and a certain nearby boundary adjustment coefficient 1 where m and n are both integers and not both zero at the same time. This can further reduce the amount of data in the boundary adjustment coefficient g
[0153] After the data compression device 200 performs the boundary adjustment on the initial frame P 0 , the encoded adjustment frame P 1 is obtained. The encoded adjustment frame P 1Amplitude attenuation from medium frequency to high frequency of strong boundaries in. Although the amplitude of the medium frequency to high frequency of the weak boundaries in the encoded adjustment frame P 1 is enhanced, after the data compression device 200 performs the boundary adjustment on the initial frame P 0 , the overall data information amount of the encoded adjustment frame P 1 is reduced. The data compression device 200 then performs encoding and bitstream generation calculations on the encoded adjustment frame P 1 , which can improve the encoding efficiency of the initial frame P 0 , thereby increasing the compression ratio of the initial frame and enhancing the transmission efficiency of the initial data. At the same time, the enhancement of the amplitude from medium frequency to high frequency of the weak boundaries in the encoded adjustment frame P 1 can also avoid detail loss.
[0154] In summary, the data processing method P200 can perform the boundary adjustment on the initial frame simultaneously, while increasing the compression ratio of the initial frame, improving the encoding efficiency and the transmission efficiency of the initial data, and reducing data loss and avoiding detail loss.
[0155] Figure 7A FIG. shows a flowchart of a data processing method P300 for decompressing a compressed frame. As described above, the data decompression device 300 can execute the data processing method P300. Specifically, the storage medium in the data decompression device 300 can store at least one set of instruction sets. The instruction sets are configured to instruct the decompression processor in the data decompression device 300 to complete the data processing method P300. When the data decompression device 300 runs, the decompression end processor can read the instruction sets and execute the data processing method P300. For convenience of description, we will use the method shown in Figure 3A to describe the data processing method P300. The method P300 may include:
[0156] S320: Obtain compressed data. The compressed data includes the compressed frame.
[0157] The compressed data may include the compressed frame obtained by performing data compression on the initial frame in the initial data through the data processing method P200. The compressed frame includes compressed predicted data PI and residual data R. In some embodiments, the compressed frame further includes the encoding function corresponding to each unit in multiple units in the frame being compressed and the boundary adjustment coefficient i.e., the encoding function H 1 (f) and the boundary adjustment coefficient g 1 , that is, the aforementioned encoded data RAMI. For convenience of display, in the following description, we will use the compressed frame further including the encoding function H 1(f) and boundary adjustment coefficient g 1 is described as an example. As Figure 3A shown, step S320 may include: inputting the compressed frame into the bitstream parsing module for analysis and calculation to obtain the prediction data PI, the residual data R, and the encoding function H 1 (f) and boundary adjustment coefficient g 1 . As described above, in the present application, a frame is a common processing unit that constitutes a data sequence. When processing data, calculations are often performed in units of frames. In the data processing method P200 for compressing data by the data compression device 200, the initial data can be compressed in units of frames. When the data decompression device 300 decompresses the compressed frame, data decompression can also be performed in units of frames.
[0158] S340: Perform data decompression on the compressed frame to obtain a decompressed frame.
[0159] The data decompression refers to performing decompression calculation on the compressed frame to obtain a decompressed frame, so that the decompressed frame is restored or substantially restored to the initial data, or the decompressed frame is clearer than the initial data. Taking video data as an example, when the amplitude of the decompressed frame at any frequency in the low-frequency to medium-frequency region is restored to the threshold of the initial frame or above the threshold, it is difficult for the human eye to perceive the difference between the decompressed frame and the initial frame. The threshold can be any value between 80% and 90%. For example, the threshold can be any value in the closed interval defined by any two values among 80%, 81%, 82%, 83%, 84%, 85%, 86%, 87%, 88%, 89%, 90%. For example, the data decompression should make the amplitude of the decompressed frame at any frequency in the low-frequency to medium-frequency region not less than 85% ± 3% of the initial frame.
[0160] The data decompression includes performing boundary compensation on the frame being decompressed and decoding the data after the boundary compensation to obtain the required decompressed frame. The frame being decompressed is a frame of data being decompressed, including the compressed frame and any data state before the compressed frame becomes the decompressed frame during the decompression process.
[0161] Taking video data as an example, the data processing method P200 compresses the initial frame by combining boundary adjustment and encoding to further increase the compression ratio of video data and improve the efficiency of video transmission. In video decompression technology, the data processing method P300 can decompress the compressed frame by combining decoding (i.e., restoring the compressed frame according to the residual data R and the prediction data PI) and boundary compensation to obtain the required decompressed frame and restore the data in the compressed frame. The decompressed frame can include any data state of the compressed frame and the compressed frame during the decoding process according to the prediction data PI and the residual data R. For example, the decompressed frame can be the compressed frame, the decoded frame obtained by decoding, or the predicted frame obtained by prediction, and so on.
[0162] As mentioned above, the data compression can be achieved by adjusting the amplitude of the intermediate to high frequency region of the compressed frame through the boundary adjustment. For example, the amplitude of the intermediate to high frequency region is attenuated to reduce the data information amount in the intermediate to high frequency region, thereby reducing the data information amount in the compressed frame. Taking video data as an example, since the edge part of the object in the image is rich in intermediate and high frequency information, and the intermediate and high frequency regions carry more data, reducing the amplitude of the intermediate to high frequency region will visually blur the boundary data of the compressed frame and also greatly reduce the information amount in the image. Therefore, the data decompression can be achieved by compensating the amplitude of the intermediate to high frequency region of the compressed frame through boundary compensation. For example, the amplitude of the intermediate to high frequency region is enhanced to restore it to the state in the initial frame or to enhance it relative to the state in the initial frame.
[0163] The boundary compensation applied to the decompression of the compressed frame refers to inputting the decompressed frame into the boundary compensator for boundary compensation. The boundary compensation can correspond to the boundary adjustment, that is, there should be a preset correlation between the boundary compensation and the boundary adjustment. By carefully setting the correlation between the boundary compensation and the boundary adjustment, after the compressed frame of the boundary adjustment undergoes the boundary compensation and the data processing, without considering other calculation errors, it can be completely restored or basically restored to the data index before the boundary adjustment (such as the image clarity of the image data), and even exceeds the data before the coding adjustment in some indicators (such as the clarity of the decoded image exceeds the original image). As mentioned above, during the boundary adjustment process, the encoded data RAMI (encoding function H 1 (f) and the boundary adjustment coefficient g 1 ) is generated. The preset correlation that should exist between the boundary compensation and the boundary adjustment can be the decoded data in the boundary compensation (decoding function H 2 (f) and the boundary compensation coefficient g 2) There is a preset association relationship. Regarding the decoded data (decoding function H 2 (f) and the boundary compensation coefficient g 2 ) and the encoded data RAMI (encoding function H 1 (f) and the boundary adjustment coefficient g 1 ) and the decoded data (decoding function H 2 (f) and the boundary compensation coefficient g 2 ), the association relationship will be described in detail in the following description.
[0164] Specifically, step S340 may include:
[0165] S342: Decode the compressed frame to obtain a decoded frame P 2 .
[0166] In the method P300, the in-frame may be the decoded frame P 2 . The compressed frame may be obtained by encoding the encoded adjustment frame P 1 by the data compression device 200. The data decompression device 300 may decode the compressed frame to obtain the decoded frame P 2 . That is, a predicted frame is obtained by prediction according to the predicted data PI, and is superimposed with the residual data R to obtain the decoded data P 2 , and the decoded data P 2 is the data P of the decoded frame 2 . There may be a certain error in the encoding and decoding processes. Assuming that the deviation caused by the encoding and decoding processes is very small, the decoded frame P 2 is basically the same as the encoded adjustment frame P 1 . Therefore, the relationship between P 1 and P 2 can be expressed by the following formula:
[0167] P 2 ≈P 1 Formula (7)
[0168] S344: Perform the boundary compensation on the in-frame (decoded frame P 2 ) to obtain the decompressed frame P 4 .
[0169] Figure 7B shows a flowchart of a boundary compensation provided according to an embodiment of the present specification; Figure 8 shows a structural flowchart of a boundary compensation provided according to an embodiment of the present specification. As Figure 7B and Figure 8 shown, step S344 may include being executed by at least one decompression end processor of the data decompression device 300:
[0170] S344 - 2: Divide the decoded frame P ( 2 ) into the multiple units based on the preset unit size. The division method of the decoded frame P ( 2 ) can be the same as the division method of the compressed frame (initial frame P 0 ) in step S242 - 2, and each unit corresponds to each other, which will not be elaborated here. For the convenience of description, we define the data of the unit in the i-th row and j-th column in the decoded frame P 2 as
[0171] S344 - 4: For each of the units, use the boundary compensation coefficient corresponding to the boundary adjustment coefficient to compensate the amplitude in the intermediate frequency to high frequency region.
[0172] When decompressing the data of the compressed frame, the data processing method P300 can use the units during data compression as the data decompression units, and for each unit, use the boundary compensation coefficient corresponding to the boundary adjustment coefficient to perform boundary compensation on the amplitude in the intermediate frequency to high frequency region, so as to compensate the amplitude in the intermediate frequency to high frequency region reduced during the data compression process and obtain the decompressed frame. The boundary compensation corresponds to the boundary adjustment, and there is a corresponding relationship between the boundary compensation coefficient and the boundary adjustment coefficient. The boundary compensation can restore the clarity of the compressed data after the boundary adjustment to the clarity of the initial frame or even higher than the clarity of the initial frame. The boundary compensation can be for each of the multiple units in the decoded frame P ( 2 ), and based on the association relationship, use the boundary compensation coefficient corresponding to the boundary adjustment coefficient to compensate the amplitude in its intermediate frequency to high frequency region. The association relationship and the boundary compensation coefficient will be introduced in detail in the following description. When performing the boundary compensation on the unit in the i-th row and j-th column , step S344 - 4 can include performing the following operations on the current unit :
[0173] S344 - 42: Determine the decoding function Through the decoding function adjust the current unit to obtain a second unit such that the components in the low frequency region in the frequency domain are retained while the components in the intermediate frequency to high frequency region are attenuated.
[0174] Among them, represents the decoding function corresponding to the current unit in the i-th row and j-th column. The decoding function can be a low-pass filter in the frequency domain, so that the decoded frame P2 the current unit in has its amplitude smoothly decreased in the frequency domain so that the decoded frame P 2 the current unit in has the components in the low - frequency region in the frequency domain retained while the components in the medium - to - high - frequency regions are attenuated, thereby obtaining the current unit the corresponding second unit To save the computational amount required in the implementation process and avoid the occurrence of the ringing effect, the decoding function should make the amplitude of the said current unit smoothly transition in the frequency domain. The decoding function can be a low - pass filter with any form of smooth transition, and this specification does not limit it.
[0175] It should be noted that, to avoid the ringing effect, the decoding function is a curve with smooth transition, avoiding a sharp change in the amplitude adjustment gain in the curve. As mentioned above, the ringing effect refers to that in image processing, when performing spectral adjustment processing on an image, if the selected decoding function has a rapid change, it will cause "ringing" in the image. The so - called "ringing" refers to the oscillation generated at the location where the gray level of the output image changes violently, just like the air oscillation generated after a bell is struck. The ringing effect often appears at the image boundary.
[0176] There are many ways of the boundary compensation processing. Sometimes, traditional techniques directly filter the decoded frame P 2 using a high - pass filter or a band - pass filter, filtering out the components in the low - frequency region of the decoded frame P 2 and extracting the components in the medium - to - high - frequency region of the decoded frame P 2 to extract the boundary information. However, there will be many negative coefficients in the coefficients of the convolution kernels corresponding to the high - pass filter and the band - pass filter. As mentioned above, when there are many negative coefficients in the convolution kernel, strong ringing effects may appear in the image obtained by convolving through the convolution kernel. Therefore, to avoid the ringing effect, the data decompression described in this specification uses a decoding function with smooth transition to adjust the decoded frame P 2 filtering out the components in the medium - to - high - frequency region of the decoded frame P 2 and then for the decoded frame P 2 and the decoded frame P after passing through the decoding function By taking the difference of the adjusted data, the boundary information can be obtained; the boundary information is adjusted using a boundary compensation coefficient to restore it to the initial state or enhance it relative to the initial state. When obtaining boundary information using the above solution, a decoding convolution kernel can be designed such that all its coefficients are non-negative, or the absolute value of the sum of the negative coefficients is less than 0.1 of the sum of the non-negative coefficients, thus avoiding the occurrence of the ringing effect.
[0177] Similar to the boundary adjustment, through the decoding function Adjusting the current unit can also be performed by convolving the current unit with a decoding convolution kernel in the time domain Therefore, there should also be a corresponding correlation between the decoding convolution kernel used for the boundary compensation and the encoding convolution kernel used for the boundary adjustment. That is to say, the encoding function and the decoding function should also have a corresponding correlation. That is, by selecting a decoding function corresponding to the encoding function and the encoding convolution kernel, the two methods can achieve the same effect. For the convenience of description, this specification will describe the boundary compensation by taking convolution in the time domain as an example, but those skilled in the art should understand that the method of adjusting the spectrum by multiplying the decoding function in the frequency domain is also within the scope protected by this specification.
[0178] When performing boundary adjustment processing on an image, if there are regions with drastic numerical changes in the selected decoding function, a convolution kernel or a combination of convolution kernels with a higher order is required during implementation. This means an increase in unnecessary computational complexity. At the same time, a higher-order convolution kernel is more likely to cause stronger color oscillations at the locations where the grayscale or color of the output image changes drastically, which is called the ringing effect. The ringing effect often appears at the image boundaries. By making the amplitude adjustment gain of the decoding function smoothly transition in the frequency domain for the current unit , the sharp change of the amplitude adjustment gain can be avoided. For example, when the low-frequency region is not connected to the middle-frequency region, the decoding function can adjust the amplitude of the mid-low frequency region of the current unit in the frequency domain, so that the change of the amplitude adjustment gain in the mid-low frequency region is smooth and continuous.
[0179] To avoid the ringing effect, the ratio of the absolute value of the sum of the negative coefficients to the sum of the non - negative coefficients in the decoding convolution kernel is less than a threshold. For example, the threshold can be any value among 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.2, 0.3, 0.4 or any value within the interval defined by any two of these numbers. For example, the convolution kernel coefficients in the decoding convolution kernel can all be selected as non - negative numbers. Decoding function In the , the amplitude adjustment gain for the medium - frequency to high - frequency region is equal to 0 and can fluctuate within a certain error range. The error range can be within the interval defined by any two of the values 0, ±1%, ±2%, ±3%, ±4%, ±5%, ±6%, ±7%, ±8%, ±9%, ±10%, ±11%, ±12%, ±13%, ±14%, ±15%, ±16%, ±17%, ±18%, ±19%, ±20%, ±21%, ±22%, ±23%, ±24%, ±25%, ±26%, ±27%, ±28%, ±29%, ±30%, ±31%, ±32%, ±33%, ±34%, ±35%, etc.
[0180] The one through the decoding function can maintain the DC part, that is, the amplitude adjustment gain for the part with a frequency of 0 is 1, so as to ensure that the basic information in the initial frame can be retained. Therefore, through the decoding function when adjusting the current unit the amplitude adjustment gain for the low - frequency region smoothly transitions from the amplitude adjustment gain of 1 at the position with a frequency of 0 to an amplitude adjustment gain close to 0 in the medium - frequency region.
[0181] As mentioned above, the encoding function and the decoding function should also have a corresponding association relationship. That is to say, the decoding function should correspond to the encoding function The storage medium of the data decompression device 300 can store a group of decoding functions. The group of decoding functions can include at least one different decoding function. Each decoding function corresponds to a decoding convolution kernel. That is to say, the storage medium of the data decompression device 300 can include at least one decoding convolution kernel. In some embodiments, the storage medium of the data decompression device 300 can also store the correspondence between the decoding function and the encoding function
[0182] As mentioned above, in some embodiments, the compressed frame includes the encoded data RAMI, that is, the encoding function H 1 (f) and the boundary adjustment coefficient g 1 , that is, the encoding function corresponding to each unit and the boundary adjustment coefficient When the data decompression device 300 performs convolution on the current unit it can be based on the encoding function H 1 (f) and the decoding function and the encoding function According to the corresponding relationship between them, select from the preset decoding function group the one that corresponds to the current unit of the encoding function The corresponding function is used as the decoding function of the current unit corresponding Select from the at least one decoding convolution kernel the decoding function corresponding to the current unit The corresponding convolution kernel is used as the decoding convolution kernel to perform convolution on the current unit for convolution.
[0183] In some embodiments, the compressed frame does not include the encoded data RAMI, that is, the encoding function H 1 (f) and the boundary adjustment coefficient g 1 . At this time, when the data decompression device 300 performs convolution on the current unit it can arbitrarily select a function from the preset decoding function group as the decoding function and use its corresponding convolution kernel as the decoding convolution kernel to perform convolution on the current unit The data decompression device 300 can also select the decoding function from the decoding function group depending on the empirical value For example, select the decoding function by means of machine learning
[0184] In some embodiments, the decoding function can be the same as the encoding function identical. Figure 6 The curve shown can also be the decoding function Those skilled in the art should understand that all can make the amplitude of the current unit smoothly decrease in the frequency domain so that the current unit in the decoded frame P 2 in the frequency domain The components in the low-frequency region are retained while the components in the middle-frequency to high-frequency regions are attenuated. The decoding function and the decoding function linear combination of or the decoding function product combination or a combination of a linear combination and a product combination all fall within the scope of protection of this specification. Among them, m≥1, represents a linear combination of n functions, represents the m-th function, k m represents the weight corresponding to the m-th function. q ≥ 1, represents a product combination of n functions, k q represents the weight corresponding to the q-th function, can be any function.
[0185] As described above, in the boundary compensation, the data decompression device 300 can perform step S344-42 on each unit. Each unit after passing through the decoding function is adjusted to obtain a corresponding second unit The decoding functions corresponding to all units are combined to form the decoding function H 2 (f). The decoding functions corresponding to each unit can be combined according to the positions of the respective units to generate the decoding function H 2 (f). The decoding function H 2 (f) can be regarded as a matrix.
[0186] The second units corresponding to all units are combined to form the second frame P 2b . The second units corresponding to each unit can be combined according to the positions of the respective units to generate the second frame P 2b . The second frame P 2b is a blurred image. P 2 and P 2b The relationship between them can be expressed by the following formula:
[0187] P 2b = P 2 H 2 (f) Formula (8)
[0188] As Figure 7B and Figure 8 shown, when performing the boundary compensation on the unit in the i-th row and the j-th column , step S344-4 can further include performing on the current unit :
[0189] S344-44: Subtract the current unit from the second unit to obtain the second boundary corresponding to the current unit
[0190] The medium-frequency to high-frequency components in the spectrum of each frame of data are mainly concentrated in the area where the data changes violently in this frame of data, that is, the boundary data of the data. For example, for a frame of image, the medium-frequency to high-frequency data are mainly concentrated at the boundary of the object in the image, that is, the boundary data of this frame of image. The decoding function makes the current unit smoothly reduce the amplitude in the frequency domain to attenuate the components in the medium-frequency to high-frequency region. Therefore, the second unit can be understood as the data with the boundary information removed from the current unit . Next, take the difference between the current unit and the second unit to obtain the boundary of the current unit , that is, the second boundary Therefore, the second boundary includes the components of the current unit in the medium-frequency to high-frequency region. The second boundary includes the boundary information in the current unit . After each unit goes through step S344-44, a corresponding second boundary is obtained. The second boundaries corresponding to all units are combined to form the second boundary frame E 2b . The second boundaries corresponding to each unit can be combined according to the positions of the respective units to generate the second boundary frame E 2b . The second boundary frame E 2b can be expressed by the following formula:
[0191] E 2b = P 2 - P 2b = P 2 - P 2 H 2 (f) Formula (9)
[0192] As Figure 7B and Figure 8 shown, when performing the boundary compensation on the unit in the i-th row and j-th column, step S344-4 can further include performing on the current unit :
[0193] S344-46: Use the boundary compensation coefficient corresponding to the boundary adjustment coefficient of the current unit to compensate the amplitude of the second boundary to obtain the decoded boundary corresponding to the current unit
[0194] For convenience of description, we define the boundary compensation coefficient corresponding to the boundary compensation as g 2 . We define the unit in the i-th row and the j-th column The corresponding boundary compensation coefficient is defined as As described above, the boundary adjustment can attenuate the amplitude of the strong boundary in the compressed frame in the medium-frequency to high-frequency region of its frequency domain, blur the boundary data in the compressed frame, thereby reducing the amount of data generated by coding. The boundary compensation can restore and even enhance the data after the boundary adjustment. That is to say, the boundary compensation can completely restore or basically restore the amplitude in the medium-frequency to high-frequency region in the decompressed frame to the state before attenuation or even enhance it relative to the state before attenuation. That is to say, the boundary adjustment coefficient and the boundary compensation coefficient There is a preset correlation relationship, that is, the boundary adjustment coefficient and the boundary compensation coefficient Correspond to each other. The storage medium of the data decompression device 300 may store a boundary compensation coefficient group. The boundary compensation coefficient group may include at least one different coefficient. In some embodiments, the storage medium of the data decompression device 300 may also store the corresponding relationship between the boundary adjustment coefficient and the boundary compensation coefficient .
[0195] As described above, in some embodiments, the compressed frame includes the encoded data RAMI, that is, the encoding function H 1 (f) and the boundary adjustment coefficient g 1 , that is, the encoding function corresponding to each unit and the boundary adjustment coefficient When the data decompression device 300 executes step S344-46, it can be based on the boundary adjustment coefficient and the boundary compensation coefficient The correlation relationship selects the boundary compensation coefficient corresponding to the boundary adjustment coefficient of the current unit from the preset boundary compensation coefficient group as the boundary compensation coefficient corresponding to the current unit as the boundary compensation coefficient corresponding to the current unit Compensate the amplitude of the second boundary . Compensate the amplitude of the second boundary
[0196] In some embodiments, the compressed frame does not include the encoded data RAMI, that is, the encoding function H 1 (f) and the boundary adjustment coefficient g 1At this time, when the data decompression device 300 executes step S344-46, it can arbitrarily select one from the preset boundary compensation coefficient groups as the current unit corresponding boundary compensation coefficient to compensate the amplitude of the second boundary The data decompression device 300 can also select the boundary compensation coefficient from the boundary compensation coefficient group depending on the empirical value For example, select the boundary compensation coefficient by means of machine learning
[0197] The decoding boundaries corresponding to all units are combined to form the decoding boundary frame E 2m The decoding boundaries corresponding to each unit can be combined according to the positions of the respective units to generate the decoding boundary frame E 2m E 2m and E 2b The relationship between them can be expressed by the following formula:
[0198] E 2m = g 2 E 2b Formula (10)
[0199] As Figure 7B and Figure 8 shown, when performing the boundary compensation on the unit in the i-th row and the j-th column, step S344-4 may include performing on the current unit :
[0200] S344-48: Superimpose the current unit with the decoding boundary to obtain the decoding unit corresponding to the current unit
[0201] After superimposing each unit with the decoding boundary a corresponding decoding unit is obtained All the decoding units corresponding to the units are combined to form the decompression frame P 4 The decoding units corresponding to each unit can be combined according to the positions of the respective units to generate the decompression frame P 4 P 4 and E 2m and P 2 The relationship between them can be expressed by the following formula:
[0202]
[0202] P 4 = E2m +P 2 Equation (11)
[0203] Based on Equations (8) to (11), P 2 and P 4 The relationship between them can be expressed by the following equation:
[0204] P 4 = P 2 (g 2 (1 - H 2 (f)) + 1) Equation (12)
[0205] For the sake of convenience in description, we define the transfer function between P 4 and P 2 as the decoding transfer function H D (f). The decoding transfer function H D can be expressed by the following equation:
[0206] H D (f) = g 2 (1 - H 2 (f)) + 1 Equation (13)
[0207] Based on Equations (5), (6), (12) and (13), P 0 and P 4 The relationship between them can be expressed by the following equation:
[0208] P 4 = P 2 H D (f) ≈ P 0 H D (f)H E (f) Equation (14)
[0209] Taking video data as an example, since the human eye is more sensitive to information in the low - to - mid - frequency region, and the design of the boundary adjustment only attenuates the amplitude of the mid - to - high - frequency region in the initial frame P 0 , so that the encoded adjustment frame P 1 retains the low - frequency information in the initial frame P 0 . The decoded frame P 2 is basically the same as the encoded adjustment frame P 1 . Therefore, the decoded frame P 2 also retains the low - frequency information. And the design of the boundary compensation only compensates the amplitude of the mid - to - high - frequency region in the decoded frame P 2 . Therefore, the decompressed frame P 4 retains the low - frequency information in the initial frame P 4 0The low-frequency frequency information in. Theoretically, without considering the deviation caused by other algorithms, the boundary compensation for the decoded frame P 2 The decompressed frame P obtained by compensating the amplitudes in the intermediate to high-frequency regions in 4 , can completely or basically restore the initial frame P 0 All the frequency information in the intermediate frequency. That is to say, the data decompression can restore or even enhance the data after data compression at any intermediate frequency. Therefore, after data decompression, the decompressed frame P 4 The amplitude at any low-frequency should be approximately equal to the initial frame P 0 , and the amplitude at any frequency in the intermediate frequency region should be approximately equal to or greater than the initial frame P 0 . The so-called approximate equality means that the amplitude of the decompressed frame P 4 is equal to the amplitude of the initial frame P 0 , and fluctuates within a certain error range. Taking video data as an example, when the amplitude of the decompressed frame P 4 at any frequency from low to intermediate frequency is restored to 85% or more of the initial frame P 0 , it is very difficult for the human eye to detect the difference between the decompressed frame P 4 and the initial frame P 0 . Therefore, after data decompression, the amplitude of the decompressed frame P 4 at any frequency from low to intermediate frequency should not be less than 85% of the initial frame P 0 . That is, the error range should not cause the amplitude of the decompressed frame P 4 at any frequency from low to intermediate frequency to be lower than 85% of the initial frame P 0 . Since the human eye is not very sensitive to the information in the high-frequency region, therefore, the information in the high-frequency region in the decompressed frame P 4 can be retained to adapt to high-quality requirements scenarios, or attenuated to suppress unnecessary high-frequency noise. That is to say, the amplitude of the decompressed frame P 4 at any high-frequency should be approximately equal to the initial frame P 0 , can also be lower than the initial frame P 0 , and can also be greater than the initial frame P 0 . The relationship between P 0 and P 4 can be expressed by the following formula:
[0210] Or
[0211]
[0212] It should be noted that a certain range of errors can be allowed in the formula. For example, P 4 ≥P 0 It can be P 4 The basic value is greater than or equal to P 0 In the case of 4 Fluctuates within a certain error range. That is, in P 4 =P 0 When P 4 In the case of negative error, P can be allowed 4 Slightly smaller than P 0 The formula here only lists P 4 With P 0 The basic relationship formula does not include the error in the formula. Those skilled in the art should understand that fluctuations within the error range make the decompressed frame P 4 The amplitude in the low-frequency to medium-frequency region is slightly smaller than that in the initial frame P 0 The situation also belongs to the protection scope of this specification. In the following formula, a certain range of error is also allowed. 4 The amplitude is greater than or equal to the initial frame P 0 For fluctuations within the error range, those skilled in the art can deduce it themselves.
[0213] For the convenience of description, we will 0 With P 4 The overall spectrum adjustment function between is defined as H 0 (f), then P 0 With P 4 The relationship between can be expressed as the following formula:
[0214] P 4 =H 0 (f)P 0 Formula (17)
[0215] Then, the overall spectrum adjustment function H 0 (f) can be expressed as the following formula:
[0216] or
[0217]
[0218] Among them, f 0 is the cutoff value of the human eye’s sensitive frequency. For video data, f 0 It can be 0.33, or other values larger or smaller than 0.33. For different types of data, f 0 The values of are different.
[0219] The H in the above formulas (18) to (19) 0 (f), when in the selected frequency domain interval H 0 (f) ≈ 1, the decompressed frame P 4 The data within the selected frequency domain interval can be restored to the initial frame P 0 ; when in the selected frequency domain interval H 0 (f) > 1, the data within the selected frequency domain interval of the decompressed frame P 4 Can be enhanced, that is, the decompressed frame P 4 The amplitude in the selected area is higher than that of the initial frame P 0 . For example, if the initial frame P 0 Is a frame in a video, as long as H 0 (f) in the selected frequency domain interval is greater than 1, clarity enhancement can be achieved. For the convenience of description, we define H 0 (f) ≈ 1 as the normal mode and H 0 (f) > 1 as the enhancement mode. Next, we will take video data as an example to elaborate on the overall spectrum adjustment function H 0 (f).
[0220] Figure 9A Shows a curve graph of an overall adjustment function H 0 (f) provided according to an embodiment of the present specification. Figure 9B Shows a curve graph of an overall adjustment function H 0 (f) provided according to an embodiment of the present specification. Figure 9C Shows a curve graph of an overall adjustment function H 0 (f) provided according to an embodiment of the present specification. Figure 9D Shows a curve graph of an overall adjustment function H 0 (f) provided according to an embodiment of the present specification. As Figures 9A to 9D Shown, the horizontal axis is the normalized frequency f, and the vertical axis is the amplitude adjustment gain H 0 (f) of the overall spectrum adjustment function H 0 . Figures 9A to 9D The curves in represent different overall spectrum adjustment functions H 0 (f). The maximum value of the normalized frequency on the horizontal axis is 0.5. The normalized frequency f on the horizontal axis can be divided into a low-frequency region, a mid-low-frequency region, a mid-frequency region, a mid-high-frequency region, and a high-frequency region. The frequencies between (0, a] belong to the low frequency; the frequencies between (a, b] belong to the mid-low frequency; the frequencies between (b, c] belong to the mid-frequency; the frequencies between (c, d] belong to the mid-high frequency; the frequencies between (d, 0.5] belong to the high frequency. Among them, the values of a, b, c, d, e refer to Figure 6The above is not repeated here.
[0221] Since the human eye is more sensitive to low-frequency to medium-frequency data in the video data than to high-frequency data, after the data is decompressed, the decompressed frame P should be kept as close as possible. 4 Relative to the initial frame P 0 The information in the low-frequency to mid-frequency region is not lost, that is, the overall spectrum adjustment function H 0 (f) The decompressed frame P 4 The amplitude in the low-frequency to medium-frequency region is not less than the initial frame P 0 85% and can even be greater than the initial frame P 0 Since the human eye is not sensitive to information in high-frequency areas, the decompressed frame P 4 The amplitude in the high frequency region can be selected according to different application scenarios. For example, in a scenario with low definition requirements, the decompressed frame P 4 The amplitude in the high frequency region may be smaller than that of the initial frame P 0 In a reconnaissance scenario with high definition requirements, the decompressed frame P 4 The amplitude in the high frequency region can be approximately equal to the initial frame P 0 or greater than the initial frame P 0 .like Figures 9A to 9D As shown, the overall adjustment function H 0 (f) Amplitude adjustment gain H at any frequency f in the low-frequency to mid-frequency region (including the low-frequency and mid-frequency regions) 0 is greater than 1 or approximately equal to 1, so that the decompressed frame P 4 The amplitude is not less than the initial frame P 0 85% of the original image, so that the clarity is restored or enhanced, and the visual observation effect is improved. The approximately equal to 1 here can fluctuate within a certain error range equal to 1. The error range can be within the interval specified by any two of the values of 0, ±1%, ±2%, ±3%, ±4%, ±5%, ±6%, ±7%, ±8%, ±9%, ±10%, ±11%, ±12%, ±13%, ±14%, ±15%, etc. For the convenience of description, we will adjust the overall function H 0 (f) The amplitude adjustment gain in the high frequency region is defined as a first amplitude adjustment gain, the amplitude adjustment gain in the medium frequency region is defined as a second amplitude adjustment gain, and the amplitude adjustment gain in the low frequency region is defined as a third amplitude adjustment gain. The third amplitude adjustment gain value, the second amplitude adjustment gain value, and the first amplitude adjustment gain value may fluctuate within the error range.
[0222] like Figure 9A As shown, the overall adjustment function H 0(f) the third amplitude adjustment gain value, the second amplitude adjustment gain value and the first amplitude adjustment gain value in the low-frequency to high-frequency region are all approximately equal to 1, so that the decompressed frame P 4 The amplitude in the low-frequency to high-frequency region is no less than the initial frame P 0 85% of the decompressed frame P 4 The data in the low-frequency to high-frequency region can be smoothly restored or substantially restored to the initial frame P 0 status.
[0223] like Figure 9B As shown, the overall adjustment function H 0 (f) The third amplitude adjustment gain value and the second amplitude adjustment gain value in the low-frequency to medium-frequency region are approximately equal to 1, so that the decompressed frame P 4 The data in the low-frequency to medium-frequency region can be smoothly restored or substantially restored to the initial frame P 0 The overall regulation function H 0 (f) The first amplitude adjustment gain value in the high frequency region is less than 1, so that the decompressed frame P 4 The amplitude in the high frequency region is relative to the initial frame P 0 Smoothly reduce to suppress high-frequency noise. The smooth reduction of the amplitude can be that the amplitude is attenuated by the first amplitude adjustment gain value, or the amplitude is attenuated within a certain error range near the first amplitude adjustment gain value. For example, the first amplitude adjustment gain can be any value between 0 and 1. For example, the first amplitude adjustment gain value can be in the interval specified by any two of the values 0, 0.04, 0.08, 0.12, 0.16, 0.20, 0.24, 0.28, 0.32, 0.36, 0.40, 0.44, 0.48, 0.52, 0.56, 0.60, 0.64, 0.68, 0.72, 0.76, 0.80, 0.84, 0.88, 0.92, 0.96 and 1. Figure 9B As shown, the overall adjustment function H 0 (f) In the high frequency region (approximately in the range of 0.4 to 0.5), the first amplitude adjustment gain is about 0.6. The second and third amplitude adjustment gain values are both near 1. The second and third amplitude adjustment gain values can fluctuate within a certain error range. For example, the second and third amplitude adjustment gain values can be within the range specified by any two of the values 0.85, 0.90, 0.95, 1, 1.05, 1.10, and 1.15.
[0224] like Figure 9C As shown, the overall adjustment function H 0 (f) The third amplitude adjustment gain value in the low frequency region is approximately equal to 1, so that the decompressed frame P 4Data in the low-frequency region can be smoothly restored or basically restored to the state of the initial frame P. 0 The overall adjustment function H 0 (f) The second amplitude adjustment gain value in the medium-frequency region and the first amplitude adjustment gain value in the high-frequency region are both greater than 1, so that the amplitude of the decompressed frame P 4 in the medium-frequency to high-frequency region relative to the initial frame P 0 increases smoothly, thereby enhancing the data clarity in the medium-frequency to high-frequency region. The smooth increase in the amplitude can be that the amplitude is enhanced by the second amplitude adjustment gain value and the first amplitude adjustment gain value, or the amplitude is enhanced within a certain error range near the second amplitude adjustment gain value and the first amplitude adjustment gain value. The magnitudes of the second amplitude adjustment gain value and the first amplitude adjustment gain value can be generally the same, or the second amplitude adjustment gain value can be greater than the first amplitude adjustment gain value, or the second amplitude adjustment gain value can be less than the first amplitude adjustment gain value. Figure 9C In the curve shown, the magnitudes of the second amplitude adjustment gain value and the first amplitude adjustment gain value are generally the same. The second amplitude adjustment gain value and the first amplitude adjustment gain value can be any value greater than 1. For example, the second amplitude adjustment gain value and the first amplitude adjustment gain value can be within the intervals specified by any two of the values 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2, 2.1, 2.2, and 2.4, etc. As Figure 9C shown, the overall adjustment function H 0 (f) The second amplitude adjustment gain and the first amplitude adjustment gain in the medium-frequency to high-frequency region are around 1.2.
[0225] As Figure 9D shown, the overall adjustment function H 0 (f) The third amplitude adjustment gain value in the low-frequency region is approximately equal to 1, so that the data in the low-frequency region of the decompressed frame P 4 can be smoothly restored or basically restored to the state of the initial frame P 0 The overall adjustment function H 0 (f) The second amplitude adjustment gain value in the medium-frequency region is greater than 1, so that the amplitude of the decompressed frame P 4 in the medium-frequency relative to the initial frame P 0 increases smoothly, thereby enhancing the data clarity in the medium-frequency region. The overall adjustment function H 0 (f) The first amplitude adjustment gain value in the high-frequency region is less than 1, so that the amplitude of the decompressed frame P 4 in the high-frequency region relative to the initial frame P 0 decreases smoothly, thereby reducing the data volume in the insensitive high-frequency region to suppress high-frequency noise.Figure 9D The shown curve can enhance clarity while reducing the amount of data. The second amplitude adjustment gain value can be any value greater than 1. The first amplitude adjustment gain can be any value between 0 and 1. As Figure 9D shown, the overall adjustment function H 0 (f) has a second amplitude adjustment gain of around 1.2 in the intermediate frequency region and a first amplitude adjustment gain of around 0.6 in the high frequency region.
[0226] Furthermore, when the high frequency region is not connected to the intermediate frequency region, the overall spectrum adjustment function H 0 (f) can also adjust the amplitude in the high frequency region so that the change of the amplitude adjustment gain in the mid-high frequency region is smooth and continuous.
[0227] Furthermore, when the intermediate frequency region is not connected to the low frequency region, the overall spectrum adjustment function H 0 (f) can also adjust the amplitude in the mid-low frequency region so that the change of the amplitude adjustment gain in the mid-low frequency region is continuous.
[0228] The curve of the overall adjustment function H 0 (f) is a smoothly transitioning curve. In engineering implementation, when implementing the decompressed frame P 4 in the low frequency to intermediate frequency region, the amplitude is approximately equal to or greater than that of the initial frame P 0 on the basis of which small fluctuations in the curve of the overall adjustment function H 0 (f) are allowed, and these fluctuations do not affect the decompression effect. For data in other forms than video data, the parameters of the overall adjustment function H 0 (f) can be set according to the sensitivity of the receiver to the data. For different forms of data, the receiver's sensitivity to frequencies is different.
[0229] For the convenience of demonstration, we will describe it by taking the case shown in formula (18) as an example. Combining formula (17) and formula (18), the decompressed frame P 4 can be expressed as the following formula:
[0230]
[0231] Figure 10A shows a graph of an overall adjustment function H 0 (f), an encoding function H 1 (f), an encoding transfer function H E (f), and a decoding transfer function H D (f) according to an embodiment of the present specification in the normal mode. Figure 10BShows an overall adjustment function H in an enhanced mode provided according to an embodiment of the present specification 0 (f), encoding function H 1 (f), encoding transfer function H E (f) and decoding transfer function H D (f) curve graphs. Figure 10A And Figure 10B The encoding convolution kernel and the decoding convolution kernel used in are the same, both being the convolution kernel shown in Table 1. Figure 10A The boundary adjustment coefficient g in 1 = 0.5, boundary compensation coefficient g 2 = 0.96. Figure 10B The boundary adjustment coefficient g in 1 = 0.5, boundary compensation coefficient g 2 = 1.6. As Figure 10A And Figure 10B Shown, the horizontal axis is the normalized frequency f, and the vertical axis is the amplitude adjustment gain H. As Figure 10A Shown, the overall spectrum adjustment function H in any frequency region 0 (f) ≈ 1, the overall spectrum adjustment function H 0 (f) performs spectrum adjustment in the normal mode on the decompressed frame, that is, all frequency information in the overall spectrum adjustment function H 0 (f) is completely retained, and the data in the decompressed frame can be basically restored to the data in the initial frame. As Figure 10B Shown, the overall spectrum adjustment function H in the low-frequency region 0 (f) ≈ 1, in the intermediate-frequency to high-frequency region, the overall spectrum adjustment function H 0 (f) > 1. The overall spectrum adjustment function H 0 (f) performs enhanced-mode spectrum adjustment on the intermediate-frequency to high-frequency region of the decompressed frame, that is, the information in the intermediate-frequency to high-frequency region in the overall spectrum adjustment function H 0 (f) is enhanced, and the data in the intermediate-frequency to high-frequency region of the decompressed frame is enhanced compared to the data in the intermediate-frequency to high-frequency region of the initial frame. It should be noted that Figure 10A And Figure 10B The curves shown are only for illustrative purposes, and those skilled in the art should understand that H 0 (f), H 1 (f), H E (f) and H D (f) curves are not limited to Figure 10A And Figure 10B The forms shown, all H 0 (f), H 1 (f), H E (f) and H that meet formulas (18) and (19)D The (f) curves all fall within the scope protected by this specification.
[0232] In summary, for the data processing system 100 provided in this specification, when compressing the initial data, by executing method P200 through the data compression device 200, the initial frames in the initial video data can be divided into multiple units, and the amplitudes of the intermediate frequency to high frequency regions of each unit can be obtained. Different boundary adjustment coefficients are used to adjust the amplitudes of the intermediate frequency to high frequency regions in each unit to reduce the amplitudes of the initial frames in the intermediate frequency to high frequency regions. If the amplitudes of the intermediate frequency to high frequency regions in the current unit are large, it means that the current unit contains strong boundaries, then a boundary adjustment coefficient less than 1 and greater than 0 is used to adjust the amplitudes of the intermediate frequency to high frequency regions in the current unit to reduce the amplitudes of the intermediate frequency to high frequency regions in the current unit, thereby reducing the signal intensity in the intermediate frequency to high frequency regions in the current unit, reducing the data information volume, and improving the data compression efficiency when performing prediction and calculating residuals. If the amplitudes of the intermediate frequency to high frequency regions in the current unit are small, it means that the current unit contains weak boundaries, then a boundary adjustment coefficient greater than 1 is used to adjust the amplitudes of the intermediate frequency to high frequency regions in the current unit to enhance the amplitudes of the intermediate frequency to high frequency regions in the current unit, so as to avoid the loss of weak boundaries in the current unit during the data compression (prediction and calculating residuals) process and avoid detail loss. The data processing method P200 and system 100 can enhance the data information volume of weak boundaries while improving the data compression efficiency, so as to avoid detail loss during the data compression process, that is, while improving the data compression efficiency, reducing data distortion.
[0233] The data processing system 100 provided in this specification, when decompressing the compressed frame, executes method P300 through the data decompression device 300. Using the unit during data compression as the data decompression unit, for each unit, the amplitude in the intermediate to high frequency region is compensated for the boundary using the boundary compensation coefficient corresponding to the boundary adjustment coefficient, so as to compensate for the amplitude reduction in the intermediate to high frequency region during the data compression process, and obtain the decompressed frame. The boundary compensation corresponds to the boundary adjustment, and there is a corresponding relationship between the boundary compensation coefficient and the boundary adjustment coefficient. The boundary compensation can restore the compressed data after the boundary adjustment to the clarity of the initial frame or even higher than the clarity of the initial frame. That is to say, without significantly increasing the computational complexity of encoding and decoding, the decoding end can at least restore the data of the decompressed data in the important frequencies to the clarity of the initial frame, and even obtain a clarity exceeding that of the initial frame. Since the boundary adjustment coefficients during the boundary adjustment process of the initial frame are all greater than 0, the information in the compressed frame is not missing. Therefore, according to the relationship and respective characteristics of the boundary adjustment coefficient and the boundary compensation coefficient, the boundary adjustment coefficient and the boundary compensation coefficient can be designed to restore the information in the compressed frame. The method and system can significantly improve the data compression efficiency, enhance the data transmission efficiency, reduce data loss, avoid detail loss, and at the same time eliminate noise and improve the clarity of the decompressed data.
[0234] This specification further provides a non-transitory storage medium storing at least one set of executable instructions for data processing. When the executable instructions are executed by a processor, the executable instructions direct the processor to perform the steps of data processing method P200. In some possible implementation manners, various aspects of this specification can also be implemented in the form of a program product, which includes program code. When the program product runs on the data compression device 200, the program code is used to cause the data compression device 200 to perform the steps of data processing described in this specification. The program product for implementing the above method can adopt a portable compact disc read-only memory (CD-ROM) and include program code, and can run on the data compression device 200, such as a personal computer. However, the program product of this specification is not limited thereto. In this specification, the readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or combined with an instruction execution system (such as the compression-end processor 220). The program product can adopt any combination of one or more readable media. The readable media can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. The computer-readable storage medium can include a data signal propagated in a baseband or as part of a carrier wave, in which the readable program code is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable storage medium can also be any readable medium other than the readable storage medium, and this readable medium can send, propagate, or transmit a program for use by or combined with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above. The program code for performing the operations of this specification can be written in any combination of one or more programming languages, and the programming languages include object-oriented programming languages - such as Java, C++, etc., and also include conventional procedural programming languages - such as the "C" language or similar programming languages. The program code can be executed entirely on the data compression device 200, partially on the data compression device 200, executed as an independent software package, partially on the data compression device 200 and partially on a remote computing device, or entirely on a remote computing device.In the case of a remote computing device, the remote computing device may be connected to the data compression device 200 via a transmission medium 120, or alternatively, may be connected to an external computing device.
[0235] The foregoing has described specific embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the acts or steps recited in the claims may be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require a particular order or a sequential order to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0236] In summary, after reading this detailed disclosure, those skilled in the art will appreciate that the foregoing detailed disclosure may be presented by way of example only and is not limiting. Although not explicitly stated herein, those skilled in the art will understand that this specification is intended to encompass various reasonable changes, improvements, and modifications to the embodiments. These changes, improvements, and modifications are intended to be proposed by this specification and are within the spirit and scope of the exemplary embodiments of this specification.
[0237] Furthermore, certain terms in this specification have been used to describe embodiments of this specification. For example, "one embodiment", "an embodiment", and / or "some embodiments" mean that the particular features, structures, or characteristics described in connection with the embodiment may be included in at least one embodiment of this specification. Thus, it should be emphasized and understood that two or more references to "an embodiment" or "one embodiment" or "alternative embodiments" in various parts of this specification do not necessarily all refer to the same embodiment. Additionally, the particular features, structures, or characteristics may be appropriately combined in one or more embodiments of this specification.
[0238] It should be understood that in the foregoing description of the embodiments of this specification, for the purpose of helping to understand a feature, and for the purpose of simplifying this specification, this specification combines various features in a single embodiment, figure, or its description. However, this does not mean that the combination of these features is necessary, and those skilled in the art may well extract some of these features as separate embodiments for understanding when reading this specification. That is to say, the embodiments in this specification may also be understood as an integration of multiple sub - embodiments. And it also holds when the content of each sub - embodiment contains less than all the features of a single foregoing disclosed embodiment.
[0239] Each patent, patent application, publication of patent application, and other materials cited herein, such as articles, books, specifications, publications, documents, items, etc., may be incorporated herein by reference. The entire content for all purposes, except any prosecution file history associated therewith, any identical ones that may be inconsistent or conflict with this document, or any identical prosecution file history that may have a limiting effect on the broadest scope of the claims. Now or hereafter associated with this document. By way of example, if there is any inconsistency or conflict between the description, definition, and / or use of a term associated with any of the incorporated materials and the terms, description, definition, and / or herein of this document, the terms of this document shall control.
[0240] Finally, it should be understood that the embodiments of the application disclosed herein are illustrative of the principles of the embodiments of this specification. Other modified embodiments are also within the scope of this specification. Therefore, the embodiments disclosed in this specification are merely by way of example and not limitation. Those skilled in the art may adopt alternative configurations in accordance with the embodiments in this specification to implement the application in this specification. Therefore, the embodiments of this specification are not limited to the embodiments precisely described in the application.
Claims
1. A method for data processing, characterized in that, comprising: selecting an initial frame from the initial data, the initial frame including initial data of a preset number of bytes; and performing data compression on the initial frame to obtain a compressed frame, wherein the data compression includes performing boundary adjustment on the frame being compressed, and the frame being compressed includes the initial frame and any data state of the initial frame before it becomes the compressed frame during the data compression process, wherein the boundary adjustment includes adjusting the amplitude of each of a plurality of units of the frame being compressed in the intermediate frequency to high frequency region using a corresponding boundary adjustment coefficient thereof to reduce the amplitude of the frame being compressed in the intermediate frequency to high frequency region, and the boundary adjustment coefficient is greater than 0.
2. The method for data processing according to claim 1, characterized in that, the performing boundary adjustment on the frame being compressed includes: dividing the frame being compressed into the plurality of units based on a preset unit size; and adjusting the amplitude of each unit in the intermediate frequency to high frequency region using the corresponding boundary adjustment coefficient thereof.
3. The method for data processing according to claim 2, characterized in that, the adjusting the amplitude of each unit in the intermediate frequency to high frequency region using the corresponding boundary adjustment coefficient thereof includes, for each unit: selecting a function from a preset set of coding functions as a coding function, and adjusting it through the coding function to obtain a first unit, such that the components in the low frequency region in the frequency domain are retained while the components in the intermediate frequency to high frequency region are attenuated; taking the difference between it and the first unit to obtain its corresponding first boundary, the first boundary including its components in the intermediate frequency to high frequency region; and adjusting the amplitude of the first boundary using the corresponding boundary adjustment coefficient thereof to obtain its corresponding coded boundary; and superimposing the first unit and the coded boundary.
4. The method for data processing according to claim 3, characterized in that, the adjusting the amplitude of the first boundary using the corresponding boundary adjustment coefficient thereof includes: determining that the boundary value of the first boundary is less than a preset first threshold, and enhancing the amplitude of the first boundary through the boundary adjustment coefficient greater than 1; or determining that the boundary value of the first boundary is greater than a preset second threshold, and reducing the amplitude of the first boundary through the boundary adjustment coefficient less than 1.
5. The method for data processing according to claim 4, characterized in that, the enhancing the amplitude of the first boundary through the boundary adjustment coefficient greater than 1 includes: selecting a coefficient from a preset first set of boundary adjustment coefficients as the boundary adjustment coefficient to enhance the amplitude of the first boundary, and the coefficients in the first set of boundary adjustment coefficients are all greater than 1; the reducing the amplitude of the first boundary through the boundary adjustment coefficient less than 1 includes: selecting a coefficient from a preset second set of boundary adjustment coefficients as the boundary adjustment coefficient to reduce the amplitude of the first boundary, and the coefficients in the second set of boundary adjustment coefficients are all less than 1.
6. The method for data processing according to claim 3, It is characterized in that Adjusting the amplitude of the first boundary using the corresponding boundary adjustment coefficient thereof includes: Taking the weighted value of the distortion rate and the code rate as the optimization objective, and based on the optimization algorithm, obtaining the boundary adjustment coefficient, and adjusting the amplitude of the first boundary with the boundary adjustment coefficient.
7. The data processing method according to claim 3, It is characterized in that The data compression of the initial frame includes at least one of the following methods: First performing the boundary adjustment on the initial frame, and then performing prediction and residual calculation on the initial frame after the boundary adjustment; First performing prediction on the initial frame to obtain a prediction frame, and then performing the boundary adjustment and residual calculation on the initial frame and the prediction frame; And First performing prediction and residual calculation on the initial frame, and then performing the boundary adjustment on the residual.
8. The data processing method according to claim 7, It is characterized in that The compressed frame further includes the encoding function and the boundary adjustment coefficient corresponding to each unit in the multiple units.
9. A data processing system, It is characterized in that Including: At least one storage medium storing at least one instruction set for data processing; And At least one processor communicatively connected to the at least one storage medium, Wherein, when the system runs, the at least one processor reads the at least one instruction set and executes the data processing method according to any one of claims 1-8 according to the indication of the at least one instruction set.
10. A data processing method, It is characterized in that Including: Obtaining compressed data, the compressed data including a compressed frame obtained by performing data compression on an initial frame, the data compression including boundary adjustment, the boundary adjustment including using a corresponding boundary adjustment coefficient for each unit in a plurality of units of the frame being compressed to adjust the amplitude in the intermediate frequency to high frequency region thereof, so as to reduce the amplitude of the frame being compressed in the intermediate frequency to high frequency region, and the boundary adjustment coefficient being greater than 0; And Performing data decompression on the compressed frame to obtain a decompressed frame, the data decompression including performing boundary compensation on the frame being decompressed, and the frame being decompressed including the compressed frame and any data state before the compressed frame becomes the decompressed frame during the data decompression process, Wherein, there is a preset association relationship between the boundary compensation and the boundary adjustment.
11. The data processing method according to claim 10, It is characterized in that The frame being compressed includes the initial frame and any data state before the initial frame becomes the compressed frame during the data compression process, and the boundary compensation includes, for each unit in the plurality of units of the frame being decompressed, based on the association relationship, using a boundary compensation coefficient corresponding to the boundary adjustment coefficient to compensate the amplitude in the intermediate frequency to high frequency region thereof.
12. The data processing method according to claim 11, It is characterized in that The boundary adjustment of the frame being compressed includes: Dividing the frame being compressed into the plurality of units based on a preset unit size; and For each of the units, adjust the amplitude in the intermediate frequency to high frequency region using the corresponding boundary adjustment coefficient, including for each of the units: Select a function from a preset group of coding functions as the coding function, and adjust it through the coding function to obtain a first unit, so that the components in the low frequency region in the frequency domain are retained while the components in the intermediate frequency to high frequency region are attenuated; Take the difference between it and the first unit to obtain its corresponding first boundary, where the first boundary includes its components in the intermediate frequency to high frequency region; and Adjust the amplitude of the first boundary using the corresponding boundary adjustment coefficient to obtain its corresponding coded boundary; and Superimpose the first unit and the coded boundary.
13. The data processing method according to claim 12, characterized in that the boundary compensation for the in-frame decoding includes: Dividing the in-frame decoding into the multiple units based on the preset unit size; and Compensate the amplitude of each unit in the intermediate frequency to high frequency region using the boundary compensation coefficient corresponding to the boundary adjustment coefficient.
14. The data processing method according to claim 13, characterized in that the compensating the amplitude of each unit in the intermediate frequency to high frequency region using the boundary compensation coefficient corresponding to the boundary adjustment coefficient includes, for the current unit in each unit: Determine a decoding function, and adjust it through the decoding function to obtain a second unit, so that the components in the low frequency region in the frequency domain are retained while the components in the intermediate frequency to high frequency region are attenuated; Take the difference between it and the second unit to obtain its corresponding second boundary, where the second boundary includes its components in the intermediate frequency to high frequency region; and Compensate the amplitude of the second boundary using the boundary compensation coefficient corresponding to the boundary adjustment coefficient to obtain its corresponding decoded boundary; and Superimpose the current unit and the decoded boundary.
15. The data processing method according to claim 14, characterized in that the determining the decoding function includes: Select a function from a preset group of decoding functions as the decoding function.
16. The data processing method according to claim 14, characterized in that the compensating the amplitude of the second boundary using the boundary compensation coefficient corresponding to the boundary adjustment coefficient includes: Select one from a preset group of boundary compensation coefficients as the boundary compensation coefficient to compensate the amplitude of the second boundary.
17. The data processing method according to claim 14, characterized in that the compressed frame includes: The coding function and the boundary adjustment coefficient corresponding to each unit in the multiple units in the in-frame compression.
18. The data processing method according to claim 17, characterized in that the determining the decoding function includes: Select a function corresponding to the coding function from a preset group of decoding functions as the decoding function.
19. The data processing method according to claim 17, characterized in that Compensating the amplitude of the second boundary using the boundary compensation coefficient corresponding to the boundary adjustment coefficient includes: Determining the boundary compensation coefficient based on the correlation between the boundary adjustment coefficient and the boundary compensation coefficient, and compensating the amplitude of the second boundary.
20. The data processing method according to claim 10, wherein, The data decompression of the compressed frame includes at least one of the following methods: Performing decoding on the compressed frame first and then performing the boundary compensation; Performing the boundary compensation during the decoding process of the compressed frame; and Performing the boundary compensation on the compressed frame first and then performing the decoding.
21. The data processing method according to claim 10, wherein, The correlation includes: The boundary compensation makes the amplitude of the decompressed frame at any frequency in the low-frequency to mid-frequency region not less than 85% of the initial frame.
22. The data processing method according to claim 21, wherein, The correlation further includes: The boundary compensation makes the amplitude of the decompressed frame increase smoothly relative to the initial frame in the mid-frequency region.
23. The data processing method according to claim 21, wherein, The correlation further includes: The boundary compensation makes the amplitude of the decompressed frame decrease smoothly relative to the initial frame in the high-frequency region.
24. A data processing system, wherein, includes: At least one storage medium storing at least one instruction set for data processing; and At least one processor communicatively connected to the at least one storage medium, wherein, when the system runs, the at least one processor reads the at least one instruction set and executes the data processing method according to any one of claims 10-23 according to the instructions of the at least one instruction set.
Citation Information
Patent Citations
Compressed sensing theory-based classification quantification image coding method
CN102158701A
Encoding device and encoding method
US20150131748A1