CN110545446A - desktop image encoding and decoding methods, related devices and storage medium - Google Patents

desktop image encoding and decoding methods, related devices and storage medium Download PDF

Info

Publication number
CN110545446A
CN110545446A CN201810524485.2A CN201810524485A CN110545446A CN 110545446 A CN110545446 A CN 110545446A CN 201810524485 A CN201810524485 A CN 201810524485A CN 110545446 A CN110545446 A CN 110545446A
Authority
CN
China
Prior art keywords
image
code stream
data
hit block
desktop
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810524485.2A
Other languages
Chinese (zh)
Other versions
CN110545446B (en
Inventor
罗得安
黄忠强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN201810524485.2A priority Critical patent/CN110545446B/en
Publication of CN110545446A publication Critical patent/CN110545446A/en
Application granted granted Critical
Publication of CN110545446B publication Critical patent/CN110545446B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44004Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving video buffer management, e.g. video decoder buffer or video display buffer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

the embodiment of the invention discloses a desktop image coding and decoding method, a related device and a storage medium, which are used for realizing third-party coding and decoding of natural images in non-hit blocks of desktop images, so that the coding and decoding speed of the desktop images is increased, and the use experience of users on the desktop images is improved. The method provided by the embodiment of the invention comprises the following steps: acquiring a desktop image to be transmitted; judging whether the desktop image is partially hit in the cache; dividing the desktop image into a hit block and a non-hit block according to a judgment result; carrying out image-text recognition on the non-hit block to determine a natural image and a character image in the non-hit block; compressing the natural image by adopting a lossy compression algorithm to obtain first data, wherein the lossy compression algorithm supports third-party encoding and decoding; and packaging the first data into a first code stream for sending.

Description

desktop image encoding and decoding methods, related devices and storage medium
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a desktop image encoding method, a desktop image decoding method, a related apparatus, and a storage medium.
Background
The virtual desktop is a technology supporting enterprise-level realization of unified hosting of remote dynamic access and a data center of a desktop system. The virtual desktop realizes centralized management of data and application by using virtualization technology, a plurality of desktops are virtualized in the server, and a client is connected with the server through a client to use a desktop operating system. The virtual desktop is intensively deployed in the data center through the personal desktop, unified management and control of the desktop are achieved, hardware cost can be saved, management cost and operation and maintenance cost can be saved, and meanwhile the cloud desktop accessed as required is provided for users.
A key technology in the virtual desktop is to transmit desktop contents to a thin terminal through a network, and the flow occupied in desktop image transmission directly influences the use experience of a user under the limited bandwidth. In the prior art, a method of caching and compressing is mostly adopted for transferring desktop images, but the method has obvious disadvantages in the following situations:
when a plurality of non-character scenes such as videos, PPT and the like appear in a desktop scene, compared with a common character office scene, the occupied flow is high, and the usability is influenced;
secondly, encoding and decoding of desktop contents must depend on a server and a thin terminal, and particularly when the thin terminal decodes, due to the limited CPU performance of the thin terminal, the decoding speed is too slow, which affects the use experience of a user.
disclosure of Invention
the embodiment of the invention provides a desktop image encoding and decoding method, a related device and a storage medium, which are used for realizing third-party encoding and decoding of natural images in non-hit blocks of desktop images, so that the encoding and decoding speed of the desktop images is increased, and the use experience of users on the desktop images is improved.
the first aspect of the embodiments of the present invention provides a method for encoding a desktop image, including:
acquiring a desktop image to be transmitted;
judging whether the desktop image is partially hit in the cache;
dividing the desktop image into a hit block and a non-hit block according to a judgment result;
carrying out image-text recognition on the non-hit block to determine a natural image and a character image in the non-hit block;
Compressing a natural image by adopting a lossy compression algorithm to obtain first data, wherein the lossy compression algorithm supports third-party encoding and decoding;
And packaging the first data into a first code stream for sending.
preferably, the first data includes: compressed natural image data;
Or the like, or, alternatively,
compressed natural image data and natural image data control information.
preferably, the method further comprises: recording the position information of the hit block in the desktop image and the cache position of the hit block;
compressing the character image by adopting a lossless compression algorithm to obtain character image data of lossless pixel coding;
respectively packaging and compressing natural image data control information, character image data of lossless pixel coding, position information of a hit block in the desktop image and a cache position of the hit block to generate a second code stream;
And sending the second code stream to the client.
preferably, the lossy compression algorithm comprises: h264 video compression algorithm;
compressing the natural image by adopting a lossy compression algorithm, wherein the lossy compression algorithm comprises the following steps:
And compressing the natural image by adopting an H264 video compression algorithm.
preferably, the compressing the natural image by using an H264 video compression algorithm includes:
maintaining a desktop image at an encoder end;
Marking a natural image area adopting an H264 video compression algorithm in a desktop image to generate a natural image mask table;
and compressing the natural image according to the desktop image and the natural image mask table.
A second aspect of the embodiments of the present invention provides a method for decoding a desktop image, including:
acquiring a final code stream to be decoded, wherein the final code stream comprises a third code stream, and the third code stream data comprises: natural image data of non-hit blocks in the desktop image;
and performing third-party decoding on the third code stream to restore the natural image of the non-hit block in the desktop image.
preferably, the final code stream further includes: the fourth code stream, the fourth code stream data include the compressed data of the data control information of the natural image;
before performing third party decoding on the third code stream, the method further comprises:
And performing decompression operation on the fourth code stream data to obtain decompressed fourth code stream data, wherein the decompressed fourth code stream data comprises: natural image data control information;
And performing third-party decoding on the third code stream to restore the natural image of the non-hit block in the desktop image, wherein the third-party decoding comprises the following steps:
Performing third party decoding on the third code stream to obtain third code stream data;
And restoring a natural image of a non-hit block in the desktop image according to the third code stream data and the decompressed fourth code stream data.
preferably, the fourth code stream data further includes: compressed data of non-hit block text and image data of lossless pixel coding, compressed data of position information of a hit block in a desktop image and compressed data of a cache position of the hit block;
the fourth decompressed code stream data further includes: non-hit block character image data of lossless pixel coding, position information of a hit block in a desktop image and a cache position of the hit block;
the method further comprises the following steps:
decompressing the non-hit block text image data of the lossless pixel coding by using a lossless decompression algorithm to restore the non-hit block text image in the desktop image;
And restoring the hit block in the desktop image according to the position information of the hit block in the desktop image and the cache position of the hit block.
preferably, the method further comprises:
And synthesizing, filtering and color coding the natural images of the hit blocks and the non-hit blocks and the character images of the non-hit blocks to restore the desktop image.
a third aspect of an embodiment of the present invention provides a desktop image encoding apparatus, including:
the device comprises a first acquisition unit, a second acquisition unit and a display unit, wherein the first acquisition unit is used for acquiring a desktop image to be transmitted;
The judging unit is used for judging whether the desktop image is partially hit in the cache;
The dividing unit is used for dividing the desktop image into a hit block and a non-hit block according to a judgment result;
the image-text recognition unit is used for performing image-text recognition on the non-hit block so as to determine a natural image and a character image in the non-hit block;
the lossy compression unit is used for compressing the natural image by adopting a lossy compression algorithm to obtain first data, and the lossy compression algorithm supports third-party encoding and decoding;
and the packaging sending unit is used for packaging the first data into a first code stream to be sent.
preferably, the first data includes: compressed natural image data;
or the like, or, alternatively,
Compressed natural image data and natural image data control information.
Preferably, the apparatus further comprises:
the recording unit is used for recording the position information of the hit block in the desktop image and the cache position of the hit block;
the lossless compression unit is used for compressing the character image by adopting a lossless compression algorithm to obtain character image data of lossless pixel coding;
The packaging compression unit is used for respectively packaging and compressing the control information of the natural image data, the character image data of the lossless pixel coding, the position information of the hit block in the desktop image and the cache position of the hit block to generate a second code stream;
and the sending unit is used for sending the second code stream to the client.
a fourth aspect of the embodiments of the present invention provides a desktop image decoding apparatus, including:
A second obtaining unit, configured to obtain a final code stream to be decoded, where the final code stream includes a third code stream, and the third code stream includes: natural image data of non-hit blocks in the desktop image;
and the first restoring unit is used for executing third-party decoding on the third code stream and restoring the natural image of the non-hit block in the desktop image.
preferably, the final code stream further includes: the fourth code stream, the fourth code stream data include the compressed data of the data control information of the natural image;
The device further comprises:
a decompression unit, configured to perform a decompression operation on the fourth code stream data to obtain decompressed fourth code stream data, where the decompressed fourth code stream data includes: natural image data control information;
The first reduction unit includes:
the third party decoding module is used for performing third party decoding on the third code stream to acquire third code stream data;
And the restoring module is used for restoring the natural image of the non-hit block in the desktop image according to the third code stream data and the decompressed fourth code stream data. Preferably, the fourth code stream data further includes: compressed data of non-hit block text and image data of lossless pixel coding, compressed data of position information of a hit block in a desktop image and compressed data of a cache position of the hit block;
the decompressed fourth code stream data further includes: non-hit block character image data of lossless pixel coding, position information of a hit block in a desktop image and a cache position of the hit block;
the device further comprises:
The second restoring unit is used for decompressing the non-hit block character image data of the lossless pixel coding by using a lossless decompression algorithm to restore the non-hit block character image in the desktop image;
And the third restoring unit is used for restoring the hit block in the desktop image according to the position information of the hit block in the desktop image and the cache position of the hit block.
preferably, the apparatus further comprises:
and the synthesis unit is used for synthesizing, filtering and color coding the natural image of the hit block, the natural image of the non-hit block and the character image of the non-hit block so as to restore the desktop image.
An embodiment of the present invention further provides a computer apparatus, including a processor, where the processor is configured to implement the method for encoding a desktop image according to the first aspect of the present invention when executing a computer program stored in a memory.
the embodiment of the present invention further provides a computer apparatus, which includes a processor, and the processor is configured to implement the method for decoding a desktop image according to the second aspect of the embodiment of the present invention when executing a computer program stored in a memory.
An embodiment of the present invention further provides a readable storage medium, on which a computer program is stored, where the computer program is used, when executed by a processor, to implement the method for encoding a desktop image provided in the first aspect of the embodiment of the present invention.
the embodiment of the present invention further provides a readable storage medium, on which a computer program is stored, where the computer program is used, when executed by a processor, to implement the method for decoding a desktop image provided by the second aspect of the embodiment of the present invention.
According to the technical scheme, the embodiment of the invention has the following advantages:
in the embodiment of the invention, the desktop image to be transmitted is obtained firstly, whether the desktop image partially hits a cache is judged, the desktop image is divided into a hit block and a non-hit block according to the judgment result, the non-hit block is subjected to image-text recognition to determine a natural image and a character image in the non-hit block, the natural image in the non-hit block is compressed by adopting a lossy compression algorithm to obtain first data, the compression algorithm supports third-party encoding and decoding, and finally the first data is packaged into a first code stream to be transmitted, because the algorithm for processing the natural image in the non-hit block is a lossy compression algorithm which supports third-party encoding and decoding, the compression ratio of the desktop image can be improved to a certain extent, the flow occupied by the desktop image in transmission is reduced, and the lossy compression algorithm can be encoded and decoded by third-party hardware or an encoding library, the processing speed of the desktop image is further accelerated, so that the display speed of the desktop image is improved, and the use experience of a user is improved.
drawings
FIG. 1 is a schematic diagram of an embodiment of a desktop image encoding method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of another embodiment of a desktop image encoding method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of another embodiment of a desktop image encoding method according to an embodiment of the present invention
FIG. 4 is a diagram of an embodiment of a desktop image decoding method according to an embodiment of the present invention;
FIG. 5 is a diagram of another embodiment of a desktop image decoding method according to an embodiment of the present invention;
FIG. 6 is a diagram of another embodiment of a desktop image decoding method according to an embodiment of the present invention;
FIG. 7 is a diagram of an embodiment of a desktop image encoding apparatus according to an embodiment of the present invention;
FIG. 8 is a diagram of a desktop image decoding apparatus according to an embodiment of the present invention.
Detailed Description
the embodiment of the invention provides a desktop image encoding and decoding method, a related device and a storage medium, which are used for realizing third-party encoding and decoding of natural images in non-hit blocks of desktop images, so that the encoding and decoding speed of the desktop images is increased, and the use experience of users on the desktop images is improved.
for convenience of understanding, a method for encoding a desktop image according to an embodiment of the present invention is described below, and referring to fig. 1, an embodiment of a method for encoding a desktop image according to an embodiment of the present invention includes:
101. Acquiring a desktop image to be transmitted;
the application scenario of this embodiment may be: a user logs in a cloud desktop through a thin terminal, so that a desktop image is encoded by depending on a server in the transmission process, the thin terminal decodes the desktop image, and the thin terminal has a low decoding speed due to limited CPU processing capacity, so that the use experience of the user at the thin terminal is influenced.
Based on the problem, one solution is to encode or decode the desktop image with a third party encoding library or third party hardware in the desktop image processing.
Before encoding a desktop image, the desktop image encoding apparatus must first obtain the desktop image to be transmitted.
102. judging whether the desktop image is partially hit in the cache;
In the desktop image transmission, the cache is a method capable of saving transmission flow, so that the desktop image coding device firstly judges whether part of the desktop image is in the cache after obtaining the desktop image to be transmitted, if so, only the storage position of the cache needs to be transmitted, and if not, the desktop image coding device needs to code by adopting a corresponding coding method according to the characteristics of a miss block.
Specifically, as a possible embodiment, the hash value calculated by the hash algorithm may represent a desktop image in a certain specific area, and as a possible embodiment, the rolling hash value of the desktop image may be calculated by the rolling hash algorithm, and the rolling hash value is matched with the rolling hash value of the desktop image in the cache, if the rolling hash value of the desktop image partially exists in the cache library, it is indicated that the desktop image partially hits the cache, if the rolling hash value of the desktop image does not exist in the cache, it is indicated that the desktop image does not hit the cache, and if the rolling hash value of the desktop image completely exists in the cache, the desktop image completely hits the cache.
103. dividing the desktop image into a hit block and a non-hit block according to a judgment result;
according to the judgment result of the step 102, the desktop image can be divided into a hit block and a non-hit block, that is, if the rolling hash value part of the desktop image exists in the cache library, it indicates that the desktop image part hits the cache, the hit cache part is divided into the hit block, and the other parts are divided into the non-hit blocks; if the rolling hash value of the desktop image does not exist in the cache, the desktop image is not hit in the cache, and all the desktop images are non-hit blocks; if all the rolling hash values of the desktop image exist in the cache, all the desktop image of the desktop hits the cache, and all the desktop image is a hit block.
104. Carrying out image-text recognition on the non-hit block to determine a natural image and a character image in the non-hit block;
the desktop image coding device identifies the non-hit block in the desktop image in a graphic mode to determine the natural image and the text image in the non-hit block, so that different compression algorithms can be adopted for different images.
typical images can be classified as: the method comprises the steps that natural images and character images are suitable for different compression methods according to characteristics of the images, for example, the character image edge is large, if lossy compression is adopted, the character edge is fuzzy, user experience is poor, the natural images change slowly, and due to the fact that human beings are insensitive to high-frequency regions, lossy compression is more suitable, and the compression ratio can be greatly improved under the condition that visual experience is not influenced.
105. Compressing the natural image by adopting a lossy compression algorithm to obtain first data, wherein the lossy compression algorithm supports third-party encoding and decoding;
For a natural image of a non-hit block, because the natural image has characteristics such as slow image change and insensitivity of human beings to a high-frequency region, a lossy compression algorithm is adopted to compress the natural image to obtain first data, wherein the lossy compression method supports third-party encoding and decoding.
because the compression algorithm for processing the natural image is a lossy compression algorithm and supports third-party encoding and decoding, the compression ratio of the desktop image can be improved to a certain extent, the flow occupied in transmission is reduced, and the compression algorithm supports third-party encoding and decoding, so that the encoding and decoding speed of the desktop image is further accelerated, the display speed of the desktop image at a client is improved, and the use experience of a user is improved.
Wherein, the lossy compression algorithm includes but is not limited to an H264 video compression algorithm, and when the lossy compression algorithm is the H264 video compression algorithm, the first data is: compressed natural image data, or compressed natural image data and natural image data control information.
specifically, when the size of the desktop image is fixed and inconvenient, the first data is compressed natural image data, and when the size of the desktop image changes, the first data is compressed natural image data and natural image data control information, where the natural image data control information includes creation and destruction information of the size of the desktop image, for example, when the size of the desktop image is 1024 × 826 on the first frame image and 826 × 426 on the fifth frame image, the natural image data control information in the first data is used to indicate the specific size of the desktop image, and the creation time and the destruction time of the size.
it should be noted that, the control information of the natural image data may also be added with other information content according to the requirement of the user, and the above is only an explanation of the control information of the natural image data, and is not limited specifically.
the compression algorithm for the digital image in the non-hit block and the hit block is described in detail in the following embodiments.
106. and packaging the first data into a first code stream for sending.
the desktop image coding device compresses the natural image of the non-hit block in the desktop image to obtain first data, and packages the first data into a first code stream to be sent.
Specifically, the image encoding device may send the first code stream to a client, and the client sends the first code stream to a third party for decoding, and then the first code stream is displayed by the client; or the image coding device directly sends the first code stream to a third party, the third party decodes the first code stream, and the client displays the first code stream after the decoding is finished. Specifically, the receiver of the first code stream may be set by the user, and is not limited herein.
in the embodiment of the invention, the desktop image to be transmitted is obtained firstly, whether the desktop image partially hits a cache is judged, the desktop image is divided into a hit block and a non-hit block according to the judgment result, the non-hit block is subjected to image-text recognition to determine a natural image and a character image in the non-hit block, the natural image in the non-hit block is compressed by adopting a lossy compression algorithm to obtain first data, the compression algorithm supports third-party encoding and decoding, and finally the first data is packaged into a first code stream to be transmitted, because the algorithm for processing the natural image in the non-hit block is a lossy compression algorithm which supports third-party encoding and decoding, the compression ratio of the desktop image can be improved to a certain extent, the flow occupied by the desktop image in transmission is reduced, and the lossy compression algorithm can be encoded and decoded by third-party hardware or an encoding library, the processing speed of the desktop image is further accelerated, so that the display speed of the desktop image is improved, and the use experience of a user is improved.
With reference to fig. 2, another embodiment of the method for encoding a desktop image according to the present invention comprises:
201. compressing the character image by adopting a lossless compression algorithm to obtain character image data of lossless pixel coding;
Because the edge of the text image has large variation, if lossy compression is applied to the text image, the text edge is blurred, and the user experience is poor, so lossless compression algorithms are generally applied to the text image, wherein the lossless compression algorithms include but are not limited to QUIC and GLZ compression, and text image data of lossless pixel coding is obtained after the text image is compressed.
202. Recording the position information of the hit block in the desktop image and the cache position of the hit block;
meanwhile, the desktop image coding device records the position information of the hit block in the desktop image and the cache position of the hit block and sends the information to the client, so that the client recovers and restores the hit block in the desktop image according to the position information of the hit block in the desktop image and the cache position of the hit block.
203. and encapsulating and compressing the character image data of the lossless pixel codes, the position information in the desktop image of the hit block and the cache position of the hit block to generate a second code stream, and sending the second code stream to the client.
in order to further improve the compression ratio of the desktop image and reduce the flow occupied by the desktop image in transmission, the text image data of lossless pixel coding, the position information in the desktop image of the hit block and the cache position of the hit block can be packaged and compressed to generate a second code stream, and the second code stream is sent to the client.
When the first data includes the natural image data control information, in order to further reduce the traffic occupied by the desktop image in the transmission, the natural image data control information, the lossless coded text image data, the position information of the hit block in the desktop image, and the cache position of the hit block may be further encapsulated and compressed to generate a second code stream, and the second code stream is sent to the client.
in the embodiment, different compression algorithms are adopted for the character images of the hit blocks and the non-hit blocks in the desktop image, so that the compression ratio of the desktop image is further improved on the premise of ensuring the quality of the desktop image, and the flow occupied by the desktop image in transmission is reduced.
Referring to fig. 3, a compression flow of a natural image in a non-hit block is described in detail below by taking an H264 video compression algorithm as an example, and another embodiment of the desktop image encoding method in the embodiment of the present invention includes:
301. maintaining a desktop image at an encoder end;
Because the H264 video compression algorithm cannot change the position and size of the compressed area, when the H264 video compression algorithm is used to compress the desktop image, only the full-screen desktop image can be compressed, so that a desktop image needs to be maintained at the encoder end in the compression process, and the area needing H264 video compression is compressed according to the desktop image.
302. marking a natural image area in the desktop image by adopting an H264 video compression algorithm to generate a natural image mask table;
specifically, in the process of H264 video compression, in order to accurately compress the region of the natural image, in the compression process, the natural image region adopting the H264 video compression algorithm needs to be marked to generate a natural image mask table, so that the natural image region in the desktop image can be accurately encoded according to the natural image mask table, and therefore, H264 encoding logic skips some macro blocks which do not need to be encoded, and the encoding performance is improved while the code stream is reduced.
303. And compressing the natural image according to the desktop image and the natural image mask table.
in order to ensure the accurate coding of the non-hit block natural image in the desktop image, after the desktop image and the natural image mask table are available, the natural image area in the desktop image can be accurately coded according to the desktop image and the natural image mask table.
With reference to fig. 4, an embodiment of a method for decoding a desktop image according to an embodiment of the present invention includes:
401. acquiring a final code stream to be decoded, wherein the final code stream comprises a third code stream, and the third code stream data comprises: natural image data of non-hit blocks in the desktop image;
Since the natural image data of the non-hit block in this embodiment supports third-party encoding and decoding, the desktop image decoding apparatus may execute step 402 after acquiring the final code stream to be decoded.
Wherein the final code stream includes a third code stream, and the third code stream data includes: natural image data of non-hit blocks in the desktop image.
402. And performing third-party decoding on the third code stream to restore the natural image of the non-hit block in the desktop image.
after the desktop image decoding device acquires the third code stream data in the final code stream, third party decoding can be performed on the third code stream data to restore the natural image of the non-hit block in the desktop image.
the third-party decoding may be third-party hardware decoding, or may be decoding by calling a third-party decoding library.
in this embodiment, an ultimate code stream is first obtained, where the ultimate code stream includes a third code stream, where the third code stream is natural image data of a non-hit block, and then third-party decoding is performed on the third code stream to restore a natural image of the non-hit block in the desktop image.
Corresponding to the embodiment described in fig. 1, when the size of the desktop image changes during the transmission process, and when the natural image is compressed, natural image data control information is also generated, and corresponding to the decoding process, the final code stream further includes: a fourth code stream, wherein the fourth code stream data includes: the natural image data controls compressed data of the information.
Referring to fig. 5, another embodiment of a method for decoding a desktop image according to an embodiment of the present invention is described as follows, including:
501. acquiring a final code stream to be decoded, wherein the final code stream comprises a third code stream and a fourth code stream, and the third code stream data comprises: the fourth code stream data includes natural image data of non-hit blocks in the desktop image: compressed data of natural image data control information;
corresponding to the embodiments described in fig. 1 and 2, when the size of the desktop image changes during transmission, the natural image data control information is also generated during the process of compressing the natural image, whereas in the embodiment described in fig. 2, the natural image data control information is also compressed in order to further improve the compression rate and reduce the transmission flow.
Therefore, corresponding to the decoding process, in the final code stream to be decoded, which is obtained by the desktop image decoding device, the final code stream further includes: a fourth code stream, wherein the fourth code stream data includes: the natural image data controls compressed data of the information.
502. performing decompression operation on the fourth code stream data to obtain decompressed fourth code stream data, wherein the decompressed fourth code stream data comprises: natural image data control information;
in order to decompress the natural image, a decompression operation needs to be performed on the fourth code stream data to obtain decompressed fourth code stream data, where the decompressed fourth code stream data includes: natural image data control information.
503. Performing third party decoding on the third code stream to obtain third code stream data;
After the desktop image decoding device acquires the third code stream in the final code stream, third-party decoding can be performed on the third code stream to acquire third code stream data, and then a natural image of a non-hit block in the desktop image is restored according to the third code stream data, wherein the third code stream data comprises: natural image data of non-hit blocks in the desktop image.
504. And restoring a natural image of a non-hit block in the desktop image according to the third code stream data and the decompressed fourth code stream data.
it is easy to understand that, in the process of compressing the natural image of the non-hit block, when the size of the desktop image changes in the transmission process, the natural image data control information is also generated, so that in the process of restoring the natural image of the non-hit block, the desktop image decoding device needs to refer to the natural image data control information, that is, the decompressed fourth code stream data, so that after acquiring the third code stream data and the fourth code stream data, the desktop image decoding device can restore the natural image of the non-hit block in the desktop image according to the third code stream data and the decompressed fourth code stream data.
and the desktop image decoding device acquires third code stream data after performing third-party decoding on the third code stream, and restores a natural image of a non-hit block in the desktop image according to the natural image data of the non-hit block in the desktop image and the control information of the natural image data after acquiring decompressed fourth code stream data.
referring to fig. 6, a process for decoding a text image and a hit block of a non-hit block in a desktop image is described as follows, and another embodiment of the desktop image decoding method according to the embodiment of the present invention includes:
corresponding to the embodiment described in fig. 2, since the text image data encoded by lossless pixels, the position information in the desktop image of the hit block, and the cache position of the hit block are encapsulated and compressed in the compression process, the fourth code stream data acquired by the desktop image decoding apparatus further includes, in the decoding process: and compressing data of non-hit block text and digital image data, compressing data of position information of a hit block in the desktop image and compressing data of a cache position of the hit block by lossless pixel coding, wherein the fourth decompressed code stream data comprises: natural image data control information, lossless pixel coded text image data, position information in the desktop image of the hit block, and a cache position of the hit block.
601. acquiring a final code stream to be decoded, wherein the final code stream comprises a third code stream and a fourth code stream, and the third code stream data comprises: the fourth code stream data includes natural image data of non-hit blocks in the desktop image: compressed data of natural image data control information, compressed data of non-hit block text and image data of lossless pixel coding, compressed data of position information of a hit block in a desktop image and compressed data of a cache position of the hit block;
602. performing decompression operation on the fourth code stream data to obtain decompressed fourth code stream data, wherein the decompressed fourth code stream data comprises: natural image data control information, character image data of lossless pixel coding, position information in a desktop image of a hit block, and a cache position of the hit block;
603. Performing third party decoding on the third code stream to obtain third code stream data;
604. restoring a natural image of a non-hit block in the desktop image according to the third code stream data and the decompressed fourth code stream data;
605. decompressing the character image data of lossless pixel coding by using a lossless decompression algorithm to restore the non-hit block character image in the desktop image;
606. restoring the hit block in the desktop image according to the position information of the hit block in the desktop image and the cache position of the hit block;
607. And synthesizing, filtering and color coding the natural images of the hit blocks and the non-hit blocks and the character images of the non-hit blocks to restore the desktop image.
In this embodiment, the third party is used to decode the natural image of the non-hit block, the lossless decompression algorithm is used to decompress the text image of the non-hit block, the hit block in the desktop image is restored according to the position information of the hit block and the cache position of the hit block, and finally the natural image and the text image of the hit block and the non-hit block are synthesized, filtered and color-coded, so as to restore the desktop image sent by the encoder.
with reference to fig. 7, an embodiment of a desktop image encoding apparatus according to an embodiment of the present invention includes:
A first obtaining unit 701, configured to obtain a desktop image to be transmitted;
a determining unit 702, configured to determine whether a portion of the desktop image hits in a cache;
A dividing unit 703, configured to divide the desktop image into a hit block and a non-hit block according to a determination result;
A graphics and text recognition unit 704, configured to perform graphics and text recognition on the non-hit block to determine a natural image and a text image in the non-hit block;
a lossy compression unit 705, configured to compress the natural image by using a lossy compression algorithm to obtain first data, where the lossy compression algorithm supports third-party encoding and decoding;
a packaging sending unit 706, configured to package the first data into a first code stream for sending.
preferably, the first data includes: compressed natural image data;
or the like, or, alternatively,
compressed natural image data and natural image data control information.
preferably, the apparatus further comprises:
A recording unit 707 for recording the position information of the hit block in the desktop image and the cache position of the hit block;
A lossless compression unit 708, configured to compress the text image by using a lossless compression algorithm to obtain text image data of lossless pixel coding;
A packaging compression unit 709, configured to respectively package and compress the control information of the natural image data, the text image data of the lossless pixel coding, the location information of the hit block in the desktop image, and the cache location of the hit block, so as to generate a second code stream;
a sending unit 710, configured to send the second code stream to the client.
in the embodiment of the invention, a desktop image to be transmitted is acquired through a first acquisition unit 701, whether the desktop image is partially hit in a cache is judged through a judgment unit 702, the desktop image is divided into a hit block and a non-hit block according to a judgment result, the non-hit block is subjected to image-text recognition through an image-text recognition unit 704 to determine a natural image and a character image in the non-hit block, the natural image in the non-hit block is compressed by adopting a lossy compression algorithm to obtain first data, the compression algorithm supports third-party encoding and decoding, and finally the first data is packaged into a first code stream to be transmitted, because the compression algorithm for processing the natural image in the non-hit block is the lossy compression algorithm and supports the third-party encoding and decoding, the compression ratio of the desktop image can be improved to a certain extent, the flow occupied by the desktop image in transmission is reduced, the lossy compression algorithm can be used for encoding and decoding through third-party hardware or an encoding library, so that the processing speed of the desktop image is further increased, the display speed of the desktop image is increased, and the use experience of a user is improved.
referring to fig. 8, an embodiment of a desktop image decoding apparatus according to the embodiment of the present invention includes:
a second obtaining unit 801, configured to obtain a final code stream to be decoded, where the final code stream includes a third code stream, and the third code stream includes: natural image data of non-hit blocks in the desktop image;
the first restoring unit 802 is configured to perform third-party decoding on the third code stream to restore a natural image of a non-hit block in the desktop image.
preferably, the final code stream further includes: the fourth code stream, the fourth code stream data include the compressed data of the data control information of the natural image;
the device also includes:
a decompressing unit 803, configured to perform a decompressing operation on the fourth code stream data to obtain decompressed fourth code stream data, where the decompressed fourth code stream data includes: natural image data control information;
a first reduction unit 802, comprising:
A third party decoding module 8021, configured to perform third party decoding on the third code stream to obtain third code stream data;
the restoring module 8022 is configured to restore a natural image of a non-hit block in the desktop image according to the third code stream data and the decompressed fourth code stream data.
Preferably, the fourth code stream data further includes: compressed data of non-hit block text and image data of lossless pixel coding, compressed data of position information of a hit block in a desktop image and compressed data of a cache position of the hit block;
The fourth decompressed code stream data further includes: non-hit block character image data of lossless pixel coding, position information of a hit block in a desktop image and a cache position of the hit block;
the device also includes:
The second restoring unit 804 is configured to decompress the non-hit block text image data of the lossless pixel coding by using a lossless decompression algorithm, and restore the non-hit block text image in the desktop image;
the third restoring unit 805 is configured to restore the hit block in the desktop image according to the location information of the hit block in the desktop image and the cache location of the hit block.
preferably, the device is characterized in that it further comprises:
And a synthesizing unit 806, configured to synthesize, filter, and color-code the natural image of the hit block, the non-hit block, and the text image of the non-hit block to restore the desktop image.
in this embodiment, the first restoring unit 802 decodes the natural image of the non-hit block by a third party, decompresses the text image of the non-hit block by a lossless decompression algorithm, restores the hit block in the desktop image according to the location information of the hit block and the cache location of the hit block, and finally restores the desktop image sent by the encoder end by synthesizing, filtering, and color-coding the natural image and the text image of the hit block and the non-hit block by the synthesizing unit 806.
the above describes the desktop image encoding apparatus and the decoding apparatus in the embodiment of the present invention from the perspective of the modular functional entity, and the following describes the computer apparatus in the embodiment of the present invention from the perspective of hardware processing:
the computer device is used for realizing the functions of the desktop image coding device, and one embodiment of the computer device in the embodiment of the invention comprises the following components:
a processor and a memory;
The memory is used for storing the computer program, and the processor is used for realizing the following steps when executing the computer program stored in the memory:
acquiring a desktop image to be transmitted;
Judging whether the desktop image is partially hit in the cache;
dividing the desktop image into a hit block and a non-hit block according to a judgment result;
carrying out image-text recognition on the non-hit block to determine a natural image and a character image in the non-hit block;
Compressing a natural image by adopting a lossy compression algorithm to obtain first data, wherein the lossy compression algorithm supports third-party encoding and decoding;
And packaging the first data into a first code stream for sending.
preferably, the first data includes: compressed natural image data;
or the like, or, alternatively,
Compressed natural image data and natural image data control information.
in some embodiments of the present invention, the processor may be further configured to:
Recording the position information of the hit block in the desktop image and the cache position of the hit block;
compressing the character image by adopting a lossless compression algorithm to obtain character image data of lossless pixel coding;
respectively packaging and compressing natural image data control information, character image data of lossless pixel coding, position information of a hit block in the desktop image and a cache position of the hit block to generate a second code stream;
and sending the second code stream to the client.
Preferably, the lossy compression algorithm comprises: h264 video compression algorithm;
In some embodiments of the present invention, the processor may be further configured to:
and compressing the natural image by adopting an H264 video compression algorithm.
in some embodiments of the present invention, the processor may be further configured to:
maintaining a desktop image at an encoder end;
marking a natural image area adopting an H264 video compression algorithm in a desktop image to generate a natural image mask table;
And compressing the natural image according to the desktop image and the natural image mask table.
the computer device is used for realizing the functions of the image decoding device, and another embodiment of the computer device in the embodiment of the invention comprises the following steps:
Acquiring a final code stream to be decoded, wherein the final code stream comprises a third code stream, and the third code stream data comprises: natural image data of non-hit blocks in the desktop image;
and performing third-party decoding on the third code stream to restore the natural image of the non-hit block in the desktop image.
preferably, the final code stream further includes: the fourth code stream, the fourth code stream data include the compressed data of the data control information of the natural image;
in some embodiments of the present invention, the processor may be further configured to:
And performing decompression operation on the fourth code stream data to obtain decompressed fourth code stream data, wherein the decompressed fourth code stream data comprises: natural image data control information;
in some embodiments of the present invention, the processor may be further configured to:
The third decoding module is used for performing third-party decoding on the third code stream to obtain third code stream data;
and restoring a natural image of a non-hit block in the desktop image according to the third code stream data and the decompressed fourth code stream data.
Preferably, the fourth code stream data further includes: compressed data of non-hit block text and image data of lossless pixel coding, compressed data of position information of a hit block in a desktop image and compressed data of a cache position of the hit block;
the fourth decompressed code stream data further includes: non-hit block character image data of lossless pixel coding, position information of a hit block in a desktop image and a cache position of the hit block;
In some embodiments of the present invention, the processor may be further configured to:
Decompressing the non-hit block text image data of the lossless pixel coding by using a lossless decompression algorithm to restore the non-hit block text image in the desktop image;
And restoring the hit block in the desktop image according to the position information of the hit block in the desktop image and the cache position of the hit block.
in some embodiments of the present invention, the processor may be further configured to:
and synthesizing, filtering and color coding the natural images of the hit blocks and the non-hit blocks and the character images of the non-hit blocks to restore the desktop image.
It is to be understood that, no matter the desktop image encoding apparatus or the desktop image decoding apparatus is, when the processor in the computer apparatus described above executes the computer program, the functions of the units in the corresponding apparatus embodiments may also be implemented, and thus, no further description is provided herein. Illustratively, the computer program may be partitioned into one or more modules/units that are stored in the memory and executed by the processor to implement the invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used for describing the execution process of the computer program in the desktop image encoding device/desktop image decoding device. For example, the computer program may be divided into units in the above-described desktop image encoding apparatus, and each unit may implement a specific function as described above in the corresponding desktop image encoding apparatus.
the computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing equipment. The computer device may include, but is not limited to, a processor, a memory. It will be appreciated by those skilled in the art that the processor, memory are merely examples of a computer apparatus and are not meant to be limiting, and that more or fewer components may be included, or certain components may be combined, or different components may be included, for example, the computer apparatus may also include input output devices, network access devices, buses, etc.
the Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable gate array (FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like which is the control center for the computer device and which connects the various parts of the overall computer device using various interfaces and lines.
The memory may be used to store the computer programs and/or modules, and the processor may implement various functions of the computer device by running or executing the computer programs and/or modules stored in the memory and invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the terminal, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
The present invention also provides a computer-readable storage medium for implementing the functions of a desktop image encoding apparatus, having a computer program stored thereon, which, when executed by a processor, the processor is operable to perform the steps of:
Acquiring a desktop image to be transmitted;
Judging whether the desktop image is partially hit in the cache;
Dividing the desktop image into a hit block and a non-hit block according to a judgment result;
Carrying out image-text recognition on the non-hit block to determine a natural image and a character image in the non-hit block;
compressing a natural image by adopting a lossy compression algorithm to obtain first data, wherein the lossy compression algorithm supports third-party encoding and decoding;
and packaging the first data into a first code stream for sending.
preferably, the first data includes: compressed natural image data;
or the like, or, alternatively,
compressed natural image data and natural image data control information.
in some embodiments of the invention, the computer program stored on the computer-readable storage medium, when executed by the processor, may be specifically configured to perform the steps of:
recording the position information of the hit block in the desktop image and the cache position of the hit block;
compressing the character image by adopting a lossless compression algorithm to obtain character image data of lossless pixel coding;
respectively packaging and compressing natural image data control information, character image data of lossless pixel coding, position information of a hit block in the desktop image and a cache position of the hit block to generate a second code stream;
And sending the second code stream to the client.
preferably, the lossy compression algorithm comprises: h264 video compression algorithm;
In some embodiments of the invention, the computer program stored on the computer-readable storage medium, when executed by the processor, may be specifically configured to perform the steps of:
and compressing the natural image by adopting an H264 video compression algorithm.
In some embodiments of the invention, the computer program stored on the computer-readable storage medium, when executed by the processor, may be specifically configured to perform the steps of:
maintaining a desktop image at an encoder end;
Marking a natural image area adopting an H264 video compression algorithm in a desktop image to generate a natural image mask table;
and compressing the natural image according to the desktop image and the natural image mask table.
the present invention also provides another computer-readable storage medium for implementing the functions of a desktop image decoding apparatus, having a computer program stored thereon, which, when executed by a processor, the processor is operable to perform the steps of:
acquiring a final code stream to be decoded, wherein the final code stream comprises a third code stream, and the third code stream data comprises: natural image data of non-hit blocks in the desktop image;
And performing third-party decoding on the third code stream to restore the natural image of the non-hit block in the desktop image.
preferably, the final code stream further includes: the fourth code stream, the fourth code stream data include the compressed data of the data control information of the natural image;
in some embodiments of the invention, the computer program stored on the computer-readable storage medium, when executed by the processor, may be specifically configured to perform the steps of:
and performing decompression operation on the fourth code stream data to obtain decompressed fourth code stream data, wherein the decompressed fourth code stream data comprises: natural image data control information;
in some embodiments of the invention, the computer program stored on the computer-readable storage medium, when executed by the processor, may be specifically configured to perform the steps of:
Performing third party decoding on the third code stream to obtain third code stream data;
And restoring a natural image of a non-hit block in the desktop image according to the third code stream data and the decompressed fourth code stream data.
preferably, the fourth code stream data further includes: compressed data of non-hit block text and image data of lossless pixel coding, compressed data of position information of a hit block in a desktop image and compressed data of a cache position of the hit block;
the fourth decompressed code stream data further includes: non-hit block character image data of lossless pixel coding, position information of a hit block in a desktop image and a cache position of the hit block;
in some embodiments of the invention, the computer program stored on the computer-readable storage medium, when executed by the processor, may be specifically configured to perform the steps of:
decompressing the non-hit block text image data of the lossless pixel coding by using a lossless decompression algorithm to restore the non-hit block text image in the desktop image;
And restoring the hit block in the desktop image according to the position information of the hit block in the desktop image and the cache position of the hit block.
In some embodiments of the invention, the computer program stored on the computer-readable storage medium, when executed by the processor, may be specifically configured to perform the steps of:
and synthesizing, filtering and color coding the natural images of the hit blocks and the non-hit blocks and the character images of the non-hit blocks to restore the desktop image.
It will be appreciated that the integrated units, if implemented as software functional units and sold or used as a stand-alone product, may be stored in a corresponding one of the computer readable storage media. Based on such understanding, all or part of the flow of the method according to the above embodiments may be implemented by a computer program, which may be stored in a computer-readable storage medium and used by a processor to implement the steps of the above embodiments of the method. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, etc. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
it is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
in the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
in addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
the above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (20)

1. a method for encoding a desktop image, comprising:
acquiring a desktop image to be transmitted;
Judging whether the desktop image is partially hit in a cache;
dividing the desktop image into a hit block and a non-hit block according to a judgment result;
Performing image-text recognition on the non-hit block to determine a natural image and a text image in the non-hit block;
compressing the natural image by adopting a lossy compression algorithm to obtain first data, wherein the lossy compression algorithm supports third-party encoding and decoding;
and packaging the first data into a first code stream to be sent.
2. The method of claim 1, wherein the first data comprises: compressed natural image data;
Or the like, or, alternatively,
compressed natural image data and natural image data control information.
3. The method of claim 2, further comprising: recording the position information of the hit block in the desktop image and the cache position of the hit block;
compressing the character image by adopting a lossless compression algorithm to obtain character image data of lossless pixel coding;
Respectively packaging and compressing the natural image data control information, the character image data of the lossless pixel coding, the position information of the hit block in the desktop image and the cache position of the hit block to generate a second code stream;
And sending the second code stream to a client.
4. The method of claim 1, wherein the lossy compression algorithm comprises: h264 video compression algorithm;
the compressing the natural image by adopting a lossy compression algorithm comprises the following steps:
And compressing the natural image by adopting an H264 video compression algorithm.
5. the method according to claim 4, wherein the compressing the natural image by using an H264 video compression algorithm comprises:
maintaining the desktop image at an encoder side;
Marking a natural image area adopting an H264 video compression algorithm in the desktop image to generate a natural image mask table;
And compressing the natural image according to the desktop image and the natural image mask table.
6. a method for decoding a desktop image, comprising:
acquiring a final code stream to be decoded, wherein the final code stream comprises a third code stream, and the third code stream data comprises: natural image data of non-hit blocks in the desktop image;
and performing third-party decoding on the third code stream to restore the natural image of the non-hit block in the desktop image.
7. The method of claim 6, wherein the final codestream further comprises: the fourth code stream, the fourth code stream data include the compressed data of the data control information of the natural image;
prior to performing third party decoding on the third code stream, the method further comprises:
performing decompression operation on the fourth code stream data to obtain decompressed fourth code stream data, wherein the decompressed fourth code stream data comprises: natural image data control information;
And performing third-party decoding on the third code stream to restore a natural image of a non-hit block in the desktop image, wherein the third-party decoding comprises the following steps:
performing third party decoding on the third code stream to obtain third code stream data;
and restoring a natural image of a non-hit block in the desktop image according to the third code stream data and the decompressed fourth code stream data.
8. the method of claim 7, wherein the fourth codestream data further comprises: compressed data of non-hit block text and image data of lossless pixel coding, compressed data of position information of a hit block in a desktop image and compressed data of a cache position of the hit block;
the decompressed fourth code stream data further includes: non-hit block character image data of lossless pixel coding, position information of a hit block in a desktop image and a cache position of the hit block;
The method further comprises the following steps:
Decompressing the non-hit block text image data of the lossless pixel coding by using a lossless decompression algorithm to restore the non-hit block text image in the desktop image;
and restoring the hit block in the desktop image according to the position information of the hit block in the desktop image and the cache position of the hit block.
9. the method of claim 8, further comprising:
And synthesizing, filtering and color coding the natural images of the hit blocks, the non-hit blocks and the character images of the non-hit blocks to restore the desktop image.
10. a desktop image encoding apparatus, comprising:
the device comprises a first acquisition unit, a second acquisition unit and a display unit, wherein the first acquisition unit is used for acquiring a desktop image to be transmitted;
the judging unit is used for judging whether the desktop image is partially hit in the cache;
the dividing unit is used for dividing the desktop image into a hit block and a non-hit block according to a judgment result;
the image-text recognition unit is used for performing image-text recognition on the non-hit block so as to determine a natural image and a character image in the non-hit block;
the lossy compression unit is used for compressing the natural image by adopting a lossy compression algorithm to obtain first data, and the lossy compression algorithm supports third-party encoding and decoding;
and the packaging sending unit is used for packaging the first data into a first code stream to be sent.
11. The apparatus of claim 10, wherein the first data comprises: compressed natural image data;
or the like, or, alternatively,
compressed natural image data and natural image data control information.
12. The apparatus of claim 11, further comprising:
the recording unit is used for recording the position information of the hit block in the desktop image and the cache position of the hit block;
the lossless compression unit is used for compressing the character image by adopting a lossless compression algorithm to obtain character image data of lossless pixel coding;
The encapsulation compression unit is used for respectively encapsulating and compressing the natural image data control information, the character image data of the lossless pixel coding, the position information of the hit block in the desktop image and the cache position of the hit block to generate a second code stream;
And the sending unit is used for sending the second code stream to a client.
13. A desktop image decoding apparatus, comprising:
A second obtaining unit, configured to obtain a final code stream to be decoded, where the final code stream includes a third code stream, and the third code stream includes: natural image data of non-hit blocks in the desktop image;
and the first restoring unit is used for executing third-party decoding on the third code stream and restoring the natural image of the non-hit block in the desktop image.
14. the apparatus of claim 13, wherein the final codestream further comprises: the fourth code stream, the fourth code stream data include the compressed data of the data control information of the natural image;
The device further comprises:
A decompression unit, configured to perform a decompression operation on the fourth code stream data to obtain decompressed fourth code stream data, where the decompressed fourth code stream data includes: natural image data control information;
the first reduction unit includes:
the third party decoding module is used for performing third party decoding on the third code stream to acquire third code stream data;
And the restoring module is used for restoring the natural image of the non-hit block in the desktop image according to the third code stream data and the decompressed fourth code stream data.
15. the apparatus of claim 14, wherein the fourth codestream data further comprises: compressed data of non-hit block text and image data of lossless pixel coding, compressed data of position information of a hit block in a desktop image and compressed data of a cache position of the hit block;
the decompressed fourth code stream data further includes: non-hit block character image data of lossless pixel coding, position information of a hit block in a desktop image and a cache position of the hit block;
the device further comprises:
The second restoring unit is used for decompressing the non-hit block character image data of the lossless pixel coding by using a lossless decompression algorithm to restore the non-hit block character image in the desktop image;
And the third restoring unit is used for restoring the hit block in the desktop image according to the position information of the hit block in the desktop image and the cache position of the hit block.
16. the apparatus of claim 15, further comprising:
and the synthesis unit is used for synthesizing, filtering and color coding the natural image of the hit block, the natural image of the non-hit block and the character image of the non-hit block so as to restore the desktop image.
17. a computer arrangement comprising a processor, characterized in that the processor, when processing a computer program stored on a memory, is adapted to carry out the method of encoding a desktop image according to any of claims 1 to 5.
18. a readable storage medium, on which a computer program is stored, which, when being executed by a processor, is adapted to carry out the method of encoding a desktop image according to any one of claims 1 to 5.
19. A computer arrangement comprising a processor, characterized in that the processor, when processing a computer program stored thereon, is adapted to carry out the method of decoding a desktop image according to any one of claims 6 to 9.
20. a readable storage medium having stored thereon a computer program for implementing a method for decoding a desktop image according to any one of claims 6 to 9 when the computer program is executed by a processor.
CN201810524485.2A 2018-05-28 2018-05-28 Desktop image encoding and decoding methods, related devices and storage medium Active CN110545446B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810524485.2A CN110545446B (en) 2018-05-28 2018-05-28 Desktop image encoding and decoding methods, related devices and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810524485.2A CN110545446B (en) 2018-05-28 2018-05-28 Desktop image encoding and decoding methods, related devices and storage medium

Publications (2)

Publication Number Publication Date
CN110545446A true CN110545446A (en) 2019-12-06
CN110545446B CN110545446B (en) 2022-01-18

Family

ID=68700801

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810524485.2A Active CN110545446B (en) 2018-05-28 2018-05-28 Desktop image encoding and decoding methods, related devices and storage medium

Country Status (1)

Country Link
CN (1) CN110545446B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113055540A (en) * 2019-12-26 2021-06-29 深信服科技股份有限公司 Image transmission method, server, system and computer readable storage medium
CN113365071A (en) * 2021-06-08 2021-09-07 北京数科网维技术有限责任公司 Image layered compression method and image layered compression device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217668A (en) * 2008-01-14 2008-07-09 浙江大学 A mixed image compression method based on block classification
CN102395029A (en) * 2011-11-05 2012-03-28 江苏物联网研究发展中心 Video encoding and decoding method and device supporting retractable video browse
US20140369421A1 (en) * 2013-06-12 2014-12-18 Microsoft Corporation Screen Map and Standards-Based Progressive Codec for Screen Content Coding
CN104410857A (en) * 2014-12-26 2015-03-11 广东威创视讯科技股份有限公司 Image display control method and related device
CN107145340A (en) * 2017-03-22 2017-09-08 深信服科技股份有限公司 Virtual desktop image transfer method and device
CN107846633A (en) * 2016-09-18 2018-03-27 腾讯科技(深圳)有限公司 A kind of live broadcasting method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217668A (en) * 2008-01-14 2008-07-09 浙江大学 A mixed image compression method based on block classification
CN102395029A (en) * 2011-11-05 2012-03-28 江苏物联网研究发展中心 Video encoding and decoding method and device supporting retractable video browse
US20140369421A1 (en) * 2013-06-12 2014-12-18 Microsoft Corporation Screen Map and Standards-Based Progressive Codec for Screen Content Coding
CN104410857A (en) * 2014-12-26 2015-03-11 广东威创视讯科技股份有限公司 Image display control method and related device
CN107846633A (en) * 2016-09-18 2018-03-27 腾讯科技(深圳)有限公司 A kind of live broadcasting method and system
CN107145340A (en) * 2017-03-22 2017-09-08 深信服科技股份有限公司 Virtual desktop image transfer method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113055540A (en) * 2019-12-26 2021-06-29 深信服科技股份有限公司 Image transmission method, server, system and computer readable storage medium
CN113365071A (en) * 2021-06-08 2021-09-07 北京数科网维技术有限责任公司 Image layered compression method and image layered compression device

Also Published As

Publication number Publication date
CN110545446B (en) 2022-01-18

Similar Documents

Publication Publication Date Title
US8874531B2 (en) Methods and systems for encoding/decoding files and transmissions thereof
GB2539241B (en) Video processing system
EP3806462A1 (en) Image encoding and decoding method , related device and storage medium
CN111131828B (en) Image compression method and device, electronic equipment and storage medium
US8620096B2 (en) Virtualization server for presentation virtualization and image data encoding method
JP2014027658A (en) Compression encoding and decoding method and apparatus
CN110545446B (en) Desktop image encoding and decoding methods, related devices and storage medium
CN111193928B (en) Method and apparatus for delivering region of interest information in video
CN116847087A (en) Video processing method and device, storage medium and electronic equipment
CN108668170B (en) Image information processing method and device, and storage medium
US20170201759A1 (en) Method and device for image encoding and image decoding
CN113573059B (en) Image display method, image display apparatus, storage medium, and electronic apparatus
WO2022127565A1 (en) Video processing method and apparatus, and device
JP2024517915A (en) Data processing method, device, computer device and computer program
KR20160082521A (en) Chroma down-conversion and up-conversion processing
CN108933945B (en) GIF picture compression method, device and storage medium
CN111491166A (en) Dynamic compression system and method based on content analysis
Petrinšak et al. Challenges in 4K UHD multimedia device testing
CN111405293A (en) Video transmission method and device
CN110868391A (en) Remote transmission method, system and equipment
US20230262210A1 (en) Visual lossless image/video fixed-rate compression
CN114339226B (en) Method, device and medium for improving smoothness of picture
CN110545435A (en) desktop pixel coding method and device based on probability model and storage medium
CN116389772B (en) Beidou network-based image transmission method and system
US20240171786A1 (en) Coding of displacements using skew flag for vertex mesh (v-mesh)

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant