CN114443882A - Image processing method and device - Google Patents

Image processing method and device Download PDF

Info

Publication number
CN114443882A
CN114443882A CN202111583556.4A CN202111583556A CN114443882A CN 114443882 A CN114443882 A CN 114443882A CN 202111583556 A CN202111583556 A CN 202111583556A CN 114443882 A CN114443882 A CN 114443882A
Authority
CN
China
Prior art keywords
cache
image data
hash
value
hash value
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.)
Pending
Application number
CN202111583556.4A
Other languages
Chinese (zh)
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.)
Tianyi Cloud Technology Co Ltd
Original Assignee
Tianyi Cloud Technology 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 Tianyi Cloud Technology Co Ltd filed Critical Tianyi Cloud Technology Co Ltd
Priority to CN202111583556.4A priority Critical patent/CN114443882A/en
Publication of CN114443882A publication Critical patent/CN114443882A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

According to the image processing method and device provided by the disclosure, if the corresponding Hash value exists and the characteristic value in the Hash value is matched with the characteristic value of the image data of the current image, the cache ID of the image data in the Hash value in the cache pool is directly sent to the client; if the corresponding Hash value exists but the characteristic value of the image data is not matched, or the corresponding Hash value does not exist, distributing a new Hash value in the Hash table, storing the characteristic value of the image data in the new Hash value, and applying a characteristic cache region from the cache pool to store the image data corresponding to the new Hash value to serve as a cache ID of the image data in the new entry in the cache pool; and sending the cache ID of the image data in the new Hash value in the characteristic cache region to the client, so that the storage volume is greatly reduced, and the aim of compressing the data is fulfilled.

Description

Image processing method and device
Technical Field
The present disclosure relates to the field of image compression technologies, and in particular, to an image processing method and apparatus.
Background
Because the data volume of the image is large, when the data of the image is transmitted, large pressure can be generated on the bandwidth, the pressure of the bandwidth can be greatly reduced through a cache mechanism, in the conventional cache mode, one cache table needs to be maintained at both a client side and a server side, the realization is complex, the cache ID is needed to traverse the whole cache table, and the storage efficiency is low.
Disclosure of Invention
The image processing method and device provided by the embodiment of the disclosure are used for improving the storage efficiency.
The embodiment of the disclosure provides an image processing method, which includes:
constructing a Hash table and a cache pool at a server side; the Hash table is provided with a plurality of Hash values, and each Hash value stores a characteristic value of the image data and a cache ID of the image data in the cache pool;
the server side calculates a characteristic value and a Hash value of image data of a current image to be sent to a client side through a Hash algorithm;
searching a corresponding Hash value from the Hash table according to the calculated Hash value of the current image;
if the corresponding Hash value exists and the characteristic value in the Hash value is matched with the characteristic value of the image data of the current image, directly sending a cache ID of the image data in the Hash value in the cache pool to a client, so that the client directly takes out the image data from the cache pool of the server end through the cache ID;
if the corresponding Hash value exists but the characteristic value of the image data is not matched, or the corresponding Hash value does not exist, allocating a new Hash value in the Hash table, storing the characteristic value of the image data in the new Hash value, and applying a characteristic cache region in the cache pool to store the image data corresponding to the new Hash value to be used as a cache ID of the image data in the new entry in the cache pool; and sending the cache ID of the image data in the new Hash value in the characteristic cache region to the client, so that the client can directly take out the image data from the characteristic cache region of the server through the cache ID.
In some examples, the computing the feature value of the current image by a hashing algorithm includes:
and calculating the characteristic value corresponding to each pixel of the current image line by line.
In some examples, the calculating the feature value corresponding to each pixel of the current image line by line includes:
respectively adopting a first Hash algorithm and a second Hash algorithm to calculate the characteristic value of each pixel of the current image corresponding to the first Hash algorithm and the characteristic value corresponding to the second Hash algorithm line by line;
if the corresponding Hash value exists and the characteristic value in the Hash value is matched with the characteristic value of the image data of the current image corresponding to the first Hash algorithm, directly sending a cache ID of the image data in the Hash value in the cache pool to a client, so that the client directly takes out the image data from the cache pool of the client through the cache ID;
if the corresponding Hash value exists but the feature value of the image data is not matched, or the corresponding Hash value does not exist, a new Hash value is allocated in the Hash table, the feature value of the image data corresponding to the second Hash algorithm and the cache ID of the image data in the new Hash value in the feature cache area are stored in the new Hash value, and the image data corresponding to the new Hash value is stored in the feature cache area.
In some examples, the first Hash algorithm comprises: DBJ2 hash algorithm.
In some examples, the second Hash algorithm comprises: and (4) AP hash algorithm.
In some examples, the feature values of the image data include a length, a width, and a format of the image data.
The embodiment of the present disclosure further provides an image processing method, including:
the client receives the cache ID of the image data in the Hash value directly sent by the server in the cache pool, and directly takes out the image data from the cache pool of the server through the received cache ID;
and the client receives the cache ID of the image data in the new Hash value sent by the server in the characteristic cache region, and directly extracts the image data from the characteristic cache region of the server through the received cache ID.
The embodiment of the present disclosure further provides a server, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the image processing method described above when executing the computer program.
An embodiment of the present disclosure further provides a client, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the image processing method described above when executing the computer program.
The embodiment of the disclosure also provides a readable storage medium, which stores computer-executable instructions for causing a computer to execute the image processing method.
The beneficial effects of the disclosed embodiment are as follows:
according to the image processing method and device provided by the embodiment of the disclosure, the unique part of each image different from other images is stored in the image cache pool, the storage volume is greatly reduced, more accurate and conflict-free indexes are established, the areas can be quickly found by the image characteristics of the subsequent images in the compression process, the reference expression is carried out, and the purpose of compressing data is achieved.
Drawings
FIG. 1 is a diagram illustrating an image processing method according to the prior art;
FIG. 2 is a diagram illustrating an original image according to the prior art;
FIG. 3 is a prior art compressed visual image of FIG. 2;
FIG. 4 is a flow chart of an image processing method in an embodiment of the present disclosure;
FIG. 5 is a diagram illustrating an original image according to an embodiment of the disclosure;
fig. 6 is a visual image obtained by compressing fig. 5 by using the image processing method in the embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings of the embodiments of the present disclosure. It is to be understood that the described embodiments are only a few embodiments of the present disclosure, and not all embodiments. And the embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict. All other embodiments, which can be derived by a person skilled in the art from the described embodiments of the disclosure without any inventive step, are within the scope of protection of the disclosure.
Unless otherwise defined, technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this disclosure belongs. The use of "first," "second," and similar terms in this disclosure is not intended to indicate any order, quantity, or importance, but rather is used to distinguish one element from another. The word "comprising" or "comprises", and the like, means that the element or item listed before the word covers the element or item listed after the word and its equivalents, but does not exclude other elements or items. The terms "connected" or "coupled" and the like are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect.
It should be noted that the sizes and shapes of the various figures in the drawings are not to scale, but are merely intended to illustrate the present disclosure. And the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout.
Under the current large background that 5G is gradually popularized, the application of cloud desktops is more and more extensive, and as cloud desktop products have penetrated into various industries in hundreds of cities throughout the country, the use scenes and the network conditions are different, and for many users (particularly government and enterprise users), the access bandwidth is a shared scarce resource. In this case, the smaller the bandwidth required by a single user, the more the number of users can support the product, the higher the effective cost ratio, and the stronger the product capability of the cloud desktop product. The image compression transmission technology and corresponding algorithm research play a vital role in improving the product strength of cloud desktop products, and are the core competitiveness of the products.
The role of the cloud desktop image compression and transmission algorithm can be summarized as follows: how to rapidly and compactly store, search, compare, represent and send images and reduce the sending data volume as much as possible. Currently, most of cloud desktop products adopt global caching of historical images, corresponding indexes are built, similar areas within a period of time are found, the indexes are sent to a client for decoding after matching is confirmed, and the data size required by image representation is reduced, so that the purpose of reducing bandwidth occupation is achieved.
This treatment is mainly divided into two parts:
1. and establishing an image cache and an index for quick searching and matching.
2. And searching and matching the representation, and determining the method and the format of the coded representation.
These two parts also determine that the algorithm has two outstanding problems in solving the practical engineering problem:
(1) the performance of the system is directly related to the size of a physical cache pool and is limited by the configuration of terminal hardware of a set client. If the space of the image cache pool is large, more historical images are cached, so that the probability of finding a match by the current image is improved, more pixels can be represented by indexes of the previous image, and a better compression effect is obtained. However, from the logic of encoding and decoding, it can be known that such a cache pool needs to be opened up at the client and the server at the same time, and needs to reside in a memory during the decoding process. Therefore, in practical application scenarios, the method is not well applicable to some terminals with poor performance. In addition, the memory of the terminal of the current cloud desktop product is usually about 2 GB-4 GB, and the size of the physical buffer pool required at present is generally set to be about 512MB in terms of a 1080p standard image 30fps rate, and even in this case, the buffer pool can only store 64 frames at most in terms of a full-size standard 1080p image with a volume of 8MB, and the duration is 2.13 s. Although the performance of the algorithm can be improved to a certain extent by a larger cache pool, the cache pool is greatly limited by a physical memory of the terminal, and is not friendly enough to support a low-performance terminal. Meanwhile, with the development of cloud desktop products, the demand of high-resolution desktops is increasing. The performance of the algorithm is further sharply reduced under the 2k (1440p, 14.75MB single) and 4k (2160p, 32MB single) resolutions, and the requirement of high-resolution products cannot be met.
(2) And the matching effect is poor by adopting a short hash table with conflict. The Hash lookup theory needs to maintain a huge Hash list which cannot be met in actual engineering, and a shorter Hash list is used for substitution. The substitution causes many-to-one mapping between pixel features and hash values, which not only can not accurately find the matching position of the RGB pixel features, but also greatly reduces the effect of increasing the volume of the buffer pool due to the fact that the RGB features of the image entering the buffer pool earlier cannot be indexed (limited by the volume of the hash table), and finally results in poor algorithm compression effect.
In view of the above problems, there have been proposed corresponding methods, such as "an image processing method, a cloud desktop server, and a client" (patent No. 201610301903.2), which attempt to cope with the above situation. The method actually hopes to divide the image into a plurality of blocks for storage, and takes the MD5 code as a characteristic index, so as to avoid the waste of cache space caused by extensive storage. But one significant problem with block storage is: in a practical use scenario where the position of a feature relative to a block is varied, two feature blocks may actually be almost identical, with only a slight relative offset, but for the search of MD5 code, the two blocks are two completely different blocks, resulting in a search failure.
Based on the above description, the prior art is generally achieved by: search->Matching->Coding->And performing compression coding in a mode of updating the index (as shown in fig. 1), and directly adding the current image into the cache pool after the compression coding is completed. Through analysis, the following results are found: at a coding speed of 20 frames per second to 30 frames per second, a large number of repeated parts exist in the buffer pool, and more importantly, a large number of redundancies cannot be found by reference. The typical search method is to calculate one by the values of several adjacent pixelsAnd the hash key value takes the key value as an index, stores the pixel position information in a hash lookup table for searching and matching in subsequent image compression, and achieves the purpose of compressing data volume by referring to the position of a historical frame. If the hash value is calculated exactly for each pixel and a one-to-one mapping is formed, then for a 24-bit true color image to be transmitted, the three-pixel feature requires a hash lookup table length of at least 272. Such a volume is not practical in practical applications. Therefore, a collision hash key value calculation method is actually used, that is, one hash may correspond to a plurality of pixels with different characteristics. Furthermore, the actual hash lookup table can only store several nearest pixel location information with the same hash. Therefore, when a large amount of redundant images are piled up in the cache pool, only a relatively small part of the redundant images are actually not repeated, only a smaller part of the redundant images in the part can be searched and referenced, and more effective indexes and table pages are squeezed out due to the cache pool and the hash table volume mailbox. This is particularly true in the presence of dynamic gif images of web pages.
By comprehensive analysis, the storage and search efficiency of the existing method in the cache pool is low. The technical scheme of the present disclosure is proposed based on this analysis. The method aims to improve the efficiency of the cache pool, improve the probability of the images in the cache pool being indexed and finish the compression representation of the images efficiently and quickly. The compression effect of a typical image is shown in fig. 2 and 3. Fig. 2 shows an original image, and fig. 3 shows a compressed visual image of fig. 2.
Based on fig. 2 and fig. 3, the public analyzes that in the prior art, the part mismatching the direct coding is mostly the image part in the web page. While the non-text portions of the image portions in the web page are not well represented. The reason is that a large amount of redundancy exists in the cache of the image part, the similar image part appearing last time cannot be accommodated on the time axis, and the redundancy extrudes effective information out of the cache pool in a very short time, so that mismatch occurs. Based on the observation, the new method aims to eliminate redundancy, store the unique part of each image different from other images in the image cache pool, greatly reduce the storage volume, establish more accurate and conflict-free indexes, and enable the subsequent images to quickly find the areas through image characteristics in the compression process for reference and expression, thereby achieving the purpose of compressing data.
The image processing method provided by the embodiment of the present disclosure, as shown in fig. 4, may include the following steps:
s110, a Hash table and a cache pool are constructed at the server side.
The Hash table is provided with a plurality of Hash values and used for detecting whether the image data is cached by the client; each Hash value stores a feature value of the image data and a cache ID of the image data in the cache pool.
And S120, calculating the characteristic value and the Hash value of the image data of the current image by the server side through a Hash algorithm for the current image to be sent to the client side. Illustratively, the feature values of the image data include a length, a width, and a format of the image data.
And S130, searching a corresponding Hash value from the Hash table according to the calculated Hash value of the current image.
And S140, if the corresponding Hash value exists and the characteristic value in the Hash value is matched with the characteristic value of the image data of the current image, directly sending the cache ID of the image data in the Hash value in the cache pool to the client, so that the client directly takes out the image data from the cache pool of the server end through the cache ID.
S150, if the corresponding Hash value exists but the characteristic values of the image data are not matched or the corresponding Hash value does not exist, distributing a new Hash value in the Hash table, storing the characteristic value of the image data in the new Hash value, and applying a characteristic cache region from the cache pool to store the image data corresponding to the new Hash value to serve as a cache ID of the image data in the new entry in the cache pool; and sending the cache ID of the image data in the new Hash value in the characteristic cache region to the client, so that the client can directly take out the image data from the characteristic cache region of the server through the cache ID.
In an embodiment of the present disclosure, the calculating a feature value of the current image through a hash algorithm may include: and calculating the characteristic value corresponding to each pixel of the current image line by line. For example, the calculating a feature value corresponding to each pixel of the current image line by line may include: and respectively adopting a first Hash algorithm and a second Hash algorithm to calculate the characteristic value of each pixel of the current image corresponding to the first Hash algorithm and the characteristic value corresponding to the second Hash algorithm line by line. For example, the first Hash algorithm may include: DBJ2 hash algorithm. The second Hash algorithm may include: and (4) AP hash algorithm. It should be noted that the specific implementation processes of the DBJ2 hash algorithm and the AP hash algorithm may be substantially the same as those in the prior art, and are not described herein again.
In practical applications, the first Hash algorithm and the second Hash algorithm may also use other types of Hash algorithms, which is not limited herein.
In the embodiment of the disclosure, when a first Hash algorithm and a second Hash algorithm are respectively adopted, and a feature value of the first Hash algorithm and a feature value of the second Hash algorithm corresponding to each pixel of the current image are calculated line by line, if the corresponding Hash value exists and the feature value in the Hash value is matched with the feature value of the first Hash algorithm corresponding to the image data of the current image, a cache ID of the image data in the Hash value in the cache pool is directly sent to a client, so that the client directly takes out the image data from the cache pool of the client through the cache ID;
in the embodiment of the disclosure, when a first Hash algorithm and a second Hash algorithm are respectively used, and a feature value of the first Hash algorithm and a feature value of the second Hash algorithm are calculated line by line for each pixel of the current image, if the corresponding Hash value exists but the feature values of the image data are not matched, or the corresponding Hash value does not exist, a new Hash value is allocated in the Hash table, the feature value of the image data corresponding to the second Hash algorithm and the cache ID of the image data in the new Hash value in the feature cache area are stored in the new Hash value, and the image data corresponding to the new Hash value is stored in the feature cache area.
According to the image processing method provided by the embodiment of the disclosure, the characteristic cache region is introduced into the cache pool, and only the image data information of the unmatched image part is stored, so that the cache efficiency is greatly improved. In order to avoid a large amount of redundant image information entering the buffer, the image data information of the image part which is directly encoded in the mismatch of each frame is stored only in the feature buffer area, and the image data information of the image part is indexed. Thus, the amount of information required to be stored in the buffer pool in each frame is greatly reduced. And applying for a feature buffer in the buffer pool, completely storing all image data information of the image part which cannot be found to match with the image part needing direct coding in the current image, establishing corresponding indexes, and sufficiently storing the difference between the images to provide reference for the subsequent images. The pixels which are matched and hit are excluded from the characteristic cache region because the same parts are found in the cache pool, and therefore the occupation of cache space is saved. It should be noted that in the actual storage process, the buffer organization of the characteristic pixels is performed row by row. For example, the whole current image is searched line by line, and whenever a pixel which cannot be matched and coded by the search adaptation is encountered, all pixels without matching are continuously pushed into the feature buffer area by starting with the pixel until the matched pixel is found next time. And a two-level hash index is established for the image data information of the mismatched image part, so that the reference is conveniently searched next time. Because the process of storing the features is carried out line by line, the method is not influenced by the positions and the shapes of the features, and the features of the image can be accurately and effectively stored no matter where the features of the image appear in the screen. Therefore, the original simple extensive storage mode of the whole disk is replaced, the volume is reduced to one dozen to one hundred times of the original volume (because the changed part of the image only occupies a smaller part of the full screen in daily use scenes, such as dynamic carousel scenes), the coverage range of the cache pool on a time axis is greatly expanded, and the storage efficiency is greatly improved. And after the current image coding is finished, the characteristic cache region is stored in the cache pool, and the corresponding index is updated, so that the characteristic position can be accurately positioned and the reference expression can be rapidly carried out when the characteristic position is found next time.
The image processing method provided by the embodiment of the disclosure adopts a double-hash re-hash searching method to remove invalid indexes caused by hash collision. It has been said above that for the description of pixel characteristics, if it is not practical to implement a one-to-one correspondence in engineering, the use of a smaller range hash variable to represent a larger range of pixel characteristic conflicts is unavoidable. A large number of collisions may result in a matching failure with direct coding or a short matching with more coding overhead. These collisions cause many similar but not identical features to be searched and applied in the encoding process, however, such features are determined to be unable to obtain a longer ideal match, and there is inevitably a fixed format overhead, and frequent short matches will generate more fixed overhead, affecting the overall effect of encoding. Therefore, in order to better distinguish conflicting pixel characteristics, the embodiment of the present disclosure introduces a double-hash re-hash discrimination method, that is, a variable with a higher dimension is used to judge the consistency between the two.
A simple example: assume that there are two feature pairs (a, b): (5,8),(4, 10). The hash calculation rule is a × b, and it can be found that both feature pairs are mapped to the hash value of 40, and cannot be well distinguished. If another hash rule can be formulated: a x b 2. This makes it easy to distinguish the two feature pairs. And a hash calculation rule is added to better restrict conflict generation, so that invalid reference generation is better avoided, and the lookup efficiency of the hash table is improved.
In the embodiment of the disclosure, the pixel characteristics are positioned by adopting a way that the hash value is calculated by the DBJ2 hash algorithm and the AP hash algorithm at the same time. Both are in fact an iterative linear mapping, differentiating between different pixel features by means of re-hashing. The two hash values are organized as a secondary index through a linked list. Moreover, most pixel features can be distinguished under the mapping of two linear functions (few pixel features still have the possibility of collision, but the collision probability is very low and is reduced by multiple orders of magnitude compared with the collision of a single hash function mapping). Whether the characteristics of the current pixel are consistent with the characteristics of the pixel corresponding to the hash in the cache pool or not is determined through twice calculation, short matching caused by mismatched or similar but different characteristics is effectively avoided, and the actual performance of the algorithm is improved.
Compared with the prior art, the embodiment of the application has the following advantages and effects:
according to the embodiment of the application, the compression effect of the image can be improved under the condition that the cache scale is greatly reduced, and better matching can be quickly found, so that more pixels can be represented by a certain part in the historical image, and a better compression effect can be obtained. Meanwhile, when the embodiment of the present application is applied to an actual compression process, in a web page scene, after a web page in a continuously scrolling web page has completely scrolled from top to bottom once, we consider that all difference parts have been completely stored in a cache pool, and a compression result obtained by scrolling the web page again is shown in fig. 5 and 6. Fig. 5 shows an original image, and fig. 6 shows a compressed visual image of fig. 5. From the matching situation, it is obvious that in the scene of daily scrolling, the difference information which can be stored in the cache pool can sufficiently cover the situation after scrolling for a period of time, and the webpage features, especially the features rich in color of the non-text area, are completely stored and are quoted by the subsequent images. As in fig. 6, the picture portion of the web page is mostly referred to as the representation. The overall compression effect of the images is obviously improved compared with the prior art, the compression conditions of a plurality of images within a period of time are counted through tests, the average compression volume of each image is reduced from the original 150 KB-250 KB to 50 KB-100 KB, and the compression performance is obviously improved.
The embodiment of the present disclosure further provides an image processing method, including:
the client receives the cache ID of the image data in the Hash value directly sent by the server in the cache pool, and directly takes out the image data from the cache pool of the server through the received cache ID;
and the client receives the cache ID of the image data in the new Hash value sent by the server in the characteristic cache region, and directly takes out the image data from the characteristic cache region of the server through the received cache ID.
The embodiment of the present disclosure further provides a server, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the above-mentioned image processing method when executing the computer program.
The embodiment of the present disclosure further provides a client, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the above image processing method when executing the computer program.
The embodiment of the disclosure also provides a readable storage medium, wherein the readable storage medium stores computer-executable instructions, and the computer-executable instructions are used for causing a computer to execute the image processing method.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.
It will be apparent to those skilled in the art that various changes and modifications can be made in the present disclosure without departing from the spirit and scope of the disclosure. Thus, if such modifications and variations of the present disclosure fall within the scope of the claims of the present disclosure and their equivalents, the present disclosure is intended to include such modifications and variations as well.

Claims (10)

1. An image processing method, comprising:
constructing a Hash table and a cache pool at a server side; the Hash table is provided with a plurality of Hash values, and each Hash value stores a characteristic value of the image data and a cache ID of the image data in the cache pool;
the server side calculates a characteristic value and a Hash value of image data of a current image to be sent to a client side through a Hash algorithm;
searching a corresponding Hash value from the Hash table according to the calculated Hash value of the current image;
if the corresponding Hash value exists and the characteristic value in the Hash value is matched with the characteristic value of the image data of the current image, directly sending a cache ID of the image data in the Hash value in the cache pool to a client, so that the client directly takes out the image data from the cache pool of the server end through the cache ID;
if the corresponding Hash value exists but the characteristic value of the image data is not matched, or the corresponding Hash value does not exist, allocating a new Hash value in the Hash table, storing the characteristic value of the image data in the new Hash value, and applying a characteristic cache region in the cache pool to store the image data corresponding to the new Hash value to be used as a cache ID of the image data in the new entry in the cache pool; and sending the cache ID of the image data in the new Hash value in the characteristic cache region to the client, so that the client can directly take out the image data from the characteristic cache region of the server through the cache ID.
2. The image processing method according to claim 1, wherein the calculating the feature value of the current image by the hashing algorithm includes:
and calculating the characteristic value corresponding to each pixel of the current image line by line.
3. The image processing method according to claim 2, wherein said calculating a feature value corresponding to each pixel of the current image line by line comprises:
respectively adopting a first Hash algorithm and a second Hash algorithm to calculate the characteristic value of each pixel of the current image corresponding to the first Hash algorithm and the characteristic value corresponding to the second Hash algorithm line by line;
if the corresponding Hash value exists and the characteristic value in the Hash value is matched with the characteristic value of the image data of the current image corresponding to the first Hash algorithm, directly sending a cache ID of the image data in the Hash value in the cache pool to a client, so that the client directly takes out the image data from the cache pool of the client through the cache ID;
if the corresponding Hash value exists but the feature value of the image data is not matched, or the corresponding Hash value does not exist, a new Hash value is allocated in the Hash table, the feature value of the image data corresponding to the second Hash algorithm and the cache ID of the image data in the new Hash value in the feature cache area are stored in the new Hash value, and the image data corresponding to the new Hash value is stored in the feature cache area.
4. The image processing method according to claim 3, wherein the first Hash algorithm comprises: DBJ2 hash algorithm.
5. The image processing method according to claim 3, wherein the second Hash algorithm comprises: and (4) AP hash algorithm.
6. The image processing method according to any one of claims 1 to 5, wherein the feature value of the image data includes a length, a width, and a format of the image data.
7. An image processing method, comprising:
the client receives the cache ID of the image data in the Hash value directly sent by the server in the cache pool, and directly takes out the image data from the cache pool of the server through the received cache ID;
and the client receives the cache ID of the image data in the new Hash value sent by the server in the characteristic cache region, and directly takes out the image data from the characteristic cache region of the server through the received cache ID.
8. A server side, comprising: memory, processor and computer program stored on the memory and executable on the processor, the processor implementing the image processing method according to any one of claims 1 to 6 when executing the computer program.
9. A client, comprising: memory, processor and computer program stored on the memory and executable on the processor, the processor implementing the image processing method as claimed in claim 7 when executing the computer program.
10. A readable storage medium storing computer-executable instructions for causing a computer to perform the image processing method according to any one of claims 1 to 7.
CN202111583556.4A 2021-12-22 2021-12-22 Image processing method and device Pending CN114443882A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111583556.4A CN114443882A (en) 2021-12-22 2021-12-22 Image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111583556.4A CN114443882A (en) 2021-12-22 2021-12-22 Image processing method and device

Publications (1)

Publication Number Publication Date
CN114443882A true CN114443882A (en) 2022-05-06

Family

ID=81363816

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111583556.4A Pending CN114443882A (en) 2021-12-22 2021-12-22 Image processing method and device

Country Status (1)

Country Link
CN (1) CN114443882A (en)

Similar Documents

Publication Publication Date Title
US10542276B2 (en) Data caching method and apparatus for video decoder
US10298970B2 (en) Image transmission method and apparatus
US6625319B1 (en) Image compression using content-based image similarity
WO2016082277A1 (en) Video authentication method and apparatus
CN110297680B (en) Method and device for transmitting virtual desktop image
CN115208414B (en) Data compression method, data compression device, computer device and storage medium
CN108377394A (en) Image data read method, computer installation and the computer readable storage medium of video encoder
CN105828081A (en) Encoding method and encoding device
CN110879967B (en) Video content repetition judgment method and device
US20230171410A1 (en) Method for coding a video based on a long-term reference frame, device, and storage medium
CN110868599B (en) Video compression method of remote desktop
CN114443882A (en) Image processing method and device
CN117014618A (en) Image compression-based blocking method and system and electronic equipment
US20170097981A1 (en) Apparatus and method for data compression
CN112565760B (en) Encoding method, apparatus and storage medium for string encoding technique
US11080859B2 (en) Image communication based on hit image block conditions
CN108712655A (en) A kind of group's image encoding method merged for similar image collection
WO2022116117A1 (en) Prediction method, encoder, decoder and computer storage medium
US11425368B1 (en) Lossless image compression using block based prediction and optimized context adaptive entropy coding
CN105488510B (en) The construction method and its system of the color histogram of static images
US20240080478A1 (en) Point cloud encoding and decoding method and apparatus, computer, and storage medium
WO2023023914A1 (en) Intra-frame prediction method and apparatus, encoding method and apparatus, decoding method and apparatus, and encoder, decoder, device and medium
US20240073424A1 (en) Motion estimation method and apparatus in coding process, device, storage medium
WO2023024842A1 (en) Point cloud encoding/decoding method, apparatus and device, and storage medium
Ramya laxmi et al. A Hybrid Approach of Wavelet Transform Using Lifting Scheme and Discrete Wavelet Transform Technique for Image Processing

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