Image compression method and related equipment

By leveraging the correlation between different images of the same object, the image data is divided into multiple groups and the information in each group is compressed, the problem of high storage cost of image sets in the prior art is solved, and more efficient image data compression is achieved.

CN120238657APending Publication Date: 2025-07-01HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311874013.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-31
Publication Date
2025-07-01

AI Technical Summary

Technical Problem

The prior art is difficult to effectively compress huge amounts of image collections, resulting in high storage costs.

Method used

By leveraging the correlation between different images of the same object, the image data is divided into multiple groups and the information in each group is compressed. The specific steps include acquiring image data, determining the correlation between images, grouping, and compressing.

Benefits of technology

The compression rate of image data is improved, and the amount of data of the final compressed information is reduced, thereby reducing storage costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120238657A_ABST
    Figure CN120238657A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an image compression method which can be applied to a scene in which image data of at least two images of the same object are compressed, and the method comprises the following steps: obtaining first information corresponding to the at least two images of the same object; second information is determined on the basis of the first incidence relation between the at least two images, the first information comprises information of each tile image in the at least two images, and the second information indicates that the information of the multiple tile images included in the first information is divided into at least two groups; each group comprises information of a first tile image and information of a second tile image, and the first tile image and the second tile image belong to different images of the object; and compressing the information in each of the at least two groups to obtain compressed information of the at least two images. In the process of compressing the at least two images of the same object, the relevance between different images is utilized, and the compression rate of the image data can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of image processing technologies, and in particular, to an image compression method and related devices. Background Art

[0002] Image sets generated in many application fields are characterized by a huge amount of data. For example, in the field of remote sensing images, the image set includes image data of multiple images of the same object under different spectra; and for another example, in the field of digital pathology, the image set includes image data of multiple images of the same object under different resolutions, etc. To facilitate the storage of the foregoing image sets, usually each image of the same object is cut into small images, which are called tile images.

[0003] Due to the huge amount of data of the above image sets and the need for long-term storage, the storage cost of the above image sets is very high. Therefore, a compression algorithm for the above image sets is urgently needed. Summary of the Invention

[0004] The present application provides an image compression method and related devices, which utilize the correlation between different images during the compression process of at least two images of the same object, which is beneficial to improving the compression ratio of image data, that is, beneficial to reducing the data volume of the compression information of the at least two finally obtained images.

[0005] In a first aspect of the present application, an image compression method is provided. In this method, a first device obtains first information corresponding to at least two images (hereinafter referred to as "first images" for convenience of description) of the same object (hereinafter referred to as "first object" for convenience of description). The first information includes the image data of each of the at least two first images of the first object. There is a first correlation relationship between different first images among the at least two first images. Each of the at least two first images of the first object is divided into at least one tile image, and the first information includes the information of each tile image in the at least two first images; "tile image" can also be called "image block", "sub-image" or other names, etc.

[0006] The first device may determine second information based on a first association relationship. The second information indicates that the information of multiple tile images included in the first information is divided into at least two groups, and each of the at least two groups includes the information of at least two tile images. Then, the information in each of the at least two groups is compressed to obtain the second compressed information corresponding to the information of each tile image in each group, so as to obtain the compressed information of at least two first images of the first object. The compressed information of at least two first images of the first object includes the second compressed information corresponding to the information of each tile image. "Compression" in this application may also be referred to as "encoding".

[0007] Among them, each of the at least two groups includes the information of a first tile image and the information of a second tile image. The first tile image and the second tile image belong to different images of the object, that is, the second information indicates that the information of tile images from different first images is divided into the same group. Optionally, there may be a second association relationship between the first tile image and the second tile image, and the second association relationship is related to the first association relationship. For example, the first tile image comes from Image 1, the second tile image comes from Image 2, and the resolution of Image 1 is twice that of Image 2, then the resolution of the first tile image may also be twice that of the second tile image. Another example is that the first tile image comes from Image 1, the second tile image comes from Image 2, and the difference between Image 1 and Image 2 is the spectrum, then the difference between the first tile image and the second tile image may also be the spectrum, etc.

[0008] In this implementation, since there is a strong association relationship between at least two images of the same object, in this solution, the first association relationship between different images in at least two images of the same object is used to determine the second information. The second information divides the first information into at least two groups, and each of the at least two groups includes the information of at least two tile images. Each group includes the information of a first tile image and the information of a second tile image. The first tile image and the second tile image belong to different images of the object, that is, based on the first association relationship, the information of tile images in different images is organized into the same group. Then, the information in each of the at least two groups is compressed, that is, the association between different images is utilized in the process of compressing at least two images of the same object, which is beneficial to improving the compression ratio of image data, that is, beneficial to reducing the data volume of the compressed information of at least two images finally obtained.

[0009] In a possible implementation, the information of the tile image in the first information includes the original tile image, or the information of the tile image in the first information includes the first compression information after compressing the tile image. The "original tile image" in this application can be understood as the tile image that has not been compressed. In this implementation, it is clear what information the information of each tile image in the first information can specifically include, reducing the implementation difficulty of this solution; in addition, two types of information that the information of each tile image specifically includes are provided, expanding the application scenarios of this solution.

[0010] In a possible implementation, when the information of the tile image in the first information includes the first compression information after compressing the tile image, the method may further include: the first device decompresses the information of all the tile images included in each group to obtain the decompression information of each group, the decompression information of each group includes the decompression information of each tile image, and the decompression information of each tile image includes the decompression information of the first tile image and the decompression information of the second tile image.

[0011] The first device compressing the information in each of at least two groups may include: the first device inputs the decompression information of the first tile image into the first model, predicts the decompression information of the second tile image through the first model to obtain the first prediction information; determines the residual between the first prediction information and the decompression information of the second tile image; compresses the residual to obtain the second compression information of the second tile image, and compresses the decompression information of the first tile image to obtain the second compression information of the first tile image, where the second compression information of the second tile image and the second compression information of the first tile image are both included in the compression information of at least two images.

[0012] Optionally, the first model may be a deep learning model. For example, the first model may be a convolutional neural network, a fully connected neural network, a neural network based on an attention mechanism, or other types of neural networks, etc., which are not limited in the embodiments of this application.

[0013] In this implementation, since there is a strong correlation between the first tile image and the second tile image in the same group, the accuracy of predicting the decompression information of the second tile image using the decompression information of the first tile image is relatively high, that is, the entropy of the above-mentioned first residual is relatively small. Therefore, the data volume of the second compressed information of the second tile image obtained after compressing the first residual is small. Adopting the method of prediction, calculating the residual, and compressing the residual is beneficial to obtaining the second compressed information with a smaller data volume, which is conducive to reducing the data volume of the finally obtained compressed information. In addition, since the first information may be generated in multiple scenarios, the prediction rules for predicting the decompression information of the second tile image based on the decompression information of the first tile image are not unified. To solve this diversity problem, in this solution, a first model is used to complete the prediction operation of the decompression information of the second tile image according to the decompression information of the first tile image. The first model selects a deep learning model, which is beneficial to learning diverse prediction rules through the deep learning model, facilitating more accurate prediction of the decompression information of the second tile image using the decompression information of the first tile image, thereby further reducing the data volume of the residual, and then reducing the data volume of the finally obtained compressed information.

[0014] In a possible implementation, the method further includes: the first device performs a clustering operation based on the information in each of at least two groups to obtain first category information, and the first category information indicates the category of each of the at least two groups. Among them, the first category information includes a first category and a second category, the first category and the second category are different, the first category corresponds to a first compression algorithm, the second category corresponds to a second compression algorithm, the first compression algorithm and the second compression algorithm are different, and both the first compression algorithm and the second compression algorithm are used in the process of compressing the information in each of the at least two groups. For example, the clustering algorithm used when performing the foregoing clustering operation may include the K-means clustering algorithm, the hierarchical clustering algorithm, or other clustering algorithms, etc., which are not enumerated here.

[0015] Optionally, the larger the data volume of the information of all tile images included in each of the at least two groups, the more complex the compression algorithm used; the smaller the data volume of the information of all tile images included in each of the at least two groups, the simpler the compression algorithm used, which is beneficial to further improving the compression performance on the premise of achieving a relatively high compression rate for the entire first information.

[0016] In this implementation manner, since the first information includes the image data of at least two first images, and the image content in the at least two first images is the same, there may be both regions with rich content and regions with simple content in the at least two first images. And each of the at least two groups organizes the information of the tile images with an associated relationship in different first images into the same group. Then, the information included in the same group among the at least two groups may all be the information of tile images with rich content, or the information included in the same group among the at least two groups may all be the information of tile images with simple content. That is, the information of tile images with the same content complexity is included in the same group. And since it is often relatively simple to compress the information of tile images with simple content, a relatively simple compression algorithm can be used to obtain a high compression rate; it is often more difficult to compress the information of tile images with complex content. Therefore, performing a clustering operation based on the information in each of the at least two groups to obtain the category of each of the at least two groups, and then determining the compression algorithm to be used for compressing the information in each group based on the category of each of the at least two groups is beneficial to implementing more appropriate compression algorithms for each group, which is beneficial to improving the overall compression performance on the basis of ensuring a high compression rate of the overall file.

[0017] In a possible implementation manner, when the information of the tile images in the first information includes the first compression information after compressing the tile images, the method may further include: the first device decompresses the information in each group to obtain the decompressed information of each group, and the decompressed information of each group includes the decompressed information of the first tile image.

[0018] The first device obtains the first category information by performing a clustering operation based on the information in each of the at least two groups, including: performing a clustering operation according to the decompressed information of the first tile image included in each of the at least two groups to obtain the first category information, where the category of the decompressed information of the first tile image included in each group represents the category of each group. Exemplarily, the first device regards the decompressed information of all the first tile images included in each group as a whole, and uses a clustering algorithm to cluster the decompressed information of the first tile images included in multiple groups to obtain the category of the decompressed information of all the first tile images included in each group. Since the category of the decompressed information of the first tile image included in each group represents the category of each group, the first category information is thus obtained.

[0019] In this implementation, since the information of tile images with the same content complexity is included in the same group, clustering operations are performed using the decompression information of all the first tile images in each group to obtain the categories of the decompression information of the first tile images included in each group. Then, the decompression information of the first tile images included in each group is determined as the category representing each group. This implementation is feasible, and only using the decompression information of all the first tile images in each group to perform clustering operations helps to reduce the difficulty of performing clustering operations.

[0020] In a possible implementation, the information of each tile image in the first information further includes the metadata of the tile image. Each of at least two groups includes first metadata and second metadata, and the first metadata and the second metadata are different metadata. The first device compresses the information in each of at least two groups, including: when the first metadata and the second metadata meet the similarity condition, the first device deletes the second metadata; compressing the first metadata to obtain the second compression information of the first metadata, and the second compression information of the first metadata is included in the compression information of at least two images. Exemplarily, the first metadata may be the first metadata among the metadata of multiple tile images included in each group, or the first metadata may be any one of the metadata of multiple tile images included in each group. The "second metadata" may be any one of the multiple metadata included in each group other than the first metadata.

[0021] Exemplarily, "the first metadata and the second metadata meet the similarity condition" can be understood as "the first metadata and the second metadata are exactly the same", and "the first metadata and the second metadata do not meet the similarity condition" can be understood as there being any difference between the first metadata and the second metadata.

[0022] In this implementation, since each group includes the information of multiple tile images, and the information of each tile image includes the metadata of each tile image, during the process of compressing the information in each group, it will be compared whether the different metadata in each group meet the similarity condition. If they meet, the metadata that meet the similarity condition will be deduplicated, thereby further reducing the data volume of the compressed information. In addition, since the metadata of all tile images in the digital pathology imaging scenario are basically the same, there is almost no difference between the first metadata and each subsequent second metadata, and all other metadata except the first metadata can be deleted, thereby greatly reducing the data volume of the compressed information. And in this solution, the comparison between the metadata of two tile images is used to perform the deduplication operation, and the time consumption of the foregoing comparison operation is very small and has almost no impact on the performance of the algorithm, that is, it avoids the reduction of performance caused by introducing the comparison operation.

[0023] In a possible implementation, the first device compresses the information in each of at least two groups, and further includes: when the first metadata and the second metadata do not meet the similarity condition, the first device determines the difference information between the first metadata and the second metadata, and then compresses the difference information to obtain the second compression information of the second metadata. The second compression information of the second metadata is included in the compression information of at least two images. In this implementation, when there is a difference between the first metadata and the second metadata, the difference information is compressed, further reducing the data volume of the compressed information. Taking the metadata of the tile image in JPEG format included in the first information as an example, it has been experimentally verified that the average data volume of the metadata of the tile image corresponding to each JPEG format image can be reduced from 623 bytes to 1 byte.

[0024] In a possible implementation, it is characterized in that the first association relationship indicates that at least two images include images of an object at at least two different resolutions, or the first association relationship indicates that at least two images include images of an object under different spectra. In this implementation, it is clear what specific association relationships can exist between different first images among at least two first images of the first object, reducing the implementation difficulty of this solution; in addition, two different association relationships are provided, expanding the application scenarios of this solution and improving the implementation flexibility of this solution.

[0025] In a second aspect, an embodiment of the present application provides an image compression device. The image compression device may include: an acquisition module, configured to acquire first information, where the first information corresponds to at least two images of the same object, there is a first association relationship between different images among the at least two images, each image in the at least two images is divided into at least one tile image, and the first information includes the information of each tile image in the at least two images; a determination module, configured to determine second information based on the first association relationship, where the second information indicates that the first information is divided into at least two groups, and each group in the at least two groups includes the information of at least two tile images, each group includes the information of a first tile image and the information of a second tile image, and the first tile image and the second tile image belong to different images of the object; a compression module, configured to compress the information in each of the at least two groups to obtain the compression information of the at least two images.

[0026] In a possible implementation, the information of the tile image in the first information includes the original tile image, or the information of the tile image in the first information includes the first compression information obtained by compressing the tile image.

[0027] In a possible implementation, when the information of the tile image in the first information includes the first compression information after compressing the tile image, the image compression device further includes: a decompression module, configured to decompress the information in each group to obtain the decompressed information of each group, and the decompressed information of each group includes the decompressed information of the first tile image and the decompressed information of the second tile image; a compression module, specifically configured to: input the decompressed information of the first tile image into a first model, and use the first model to predict the decompressed information of the second tile image to obtain first prediction information; determine the residual between the first prediction information and the decompressed information of the second tile image; compress the residual to obtain the second compression information of the second tile image, and compress the decompressed information of the first tile image to obtain the second compression information of the first tile image, where the second compression information of the second tile image and the second compression information of the first tile image are both included in the compression information of at least two images.

[0028] In a possible implementation, the image compression device further includes: a clustering module, configured to perform a clustering operation based on the information in each of at least two groups to obtain first category information, where the first category information indicates the category of each of the at least two groups, and the first category information includes a first category and a second category, the first category and the second category are different, the first category corresponds to a first compression algorithm, the second category corresponds to a second compression algorithm, the first compression algorithm and the second compression algorithm are different, and both the first compression algorithm and the second compression algorithm are used in the process of compressing the information in each of the at least two groups.

[0029] In a possible implementation, when the information of the tile image in the first information includes the first compression information after compressing the tile image, the image compression device further includes: a decompression module, configured to decompress the information in each group to obtain the decompressed information of each group, and the decompressed information of each group includes the decompressed information of the first tile image; a clustering module, specifically configured to perform a clustering operation according to the decompressed information of the first tile image included in each of at least two groups to obtain first category information, where the category of the decompressed information of the first tile image included in each group represents the category of each group.

[0030] In a possible implementation, the information of the tile image in the first information further includes the metadata of the tile image, the information in each group includes first metadata and second metadata, the first metadata and the second metadata are different metadata, and the compression module is specifically configured to: delete the second metadata when the first metadata and the second metadata meet the similarity condition; compress the first metadata to obtain the second compression information of the first metadata, and the second compression information of the first metadata is included in the compression information of at least two images.

[0031] In a possible implementation, the compression module is further specifically configured to: determine the difference information between the first metadata and the second metadata when the first metadata and the second metadata do not meet the similarity condition; compress the difference information to obtain the second compression information of the second metadata, and the second compression information of the second metadata is included in the compression information of at least two images.

[0032] In a possible implementation, the first association relationship indicates that at least two images include images of an object at at least two different resolutions, or the first association relationship indicates that at least two images include images of an object under different spectra.

[0033] For the specific implementation manners of the steps, the meanings of the terms, and the beneficial effects brought about in the second aspect of the present application, reference may be made to the first aspect, which will not be elaborated herein.

[0034] In a third aspect, an embodiment of the present application provides a device, including a processor and a memory. The processor is coupled to the memory. The memory is used to store a program. The processor is used to execute the program in the memory, so that the device executes the training method of the model described in the first aspect above.

[0035] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program runs on a computer, the computer is enabled to execute the method described in the first aspect above.

[0036] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a program. When the program runs on a computer, the computer is enabled to execute the method described in the first aspect above.

[0037] In a sixth aspect, the present application provides a chip system, which includes a processor for supporting the implementation of the functions involved in the above aspects. For example, the processor is used to send or process the data and / or information involved in the above method. In a possible design, the chip system further includes a memory, and the memory is used to store necessary program instructions and data of a terminal device or a communication device. The chip system may be composed of chips or may include chips and other discrete devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 FIG. is a schematic diagram of the relationship between an image of an object and a tile image provided by an embodiment of the present application;

[0039] Figure 2 FIG. is a flowchart of a method for compressing an image provided by an embodiment of the present application;

[0040] Figure 3A schematic diagram of information on tile images included in a group provided by an embodiment of the present application;

[0041] Figure 4 A schematic flowchart of an image compression method provided by an embodiment of the present application;

[0042] Figure 5 A schematic diagram of the correspondence between the category of each group and the compression algorithm provided by an embodiment of the present application;

[0043] Figure 6 A schematic diagram showing that there are regions with rich content and regions with simple content in the first image provided by an embodiment of the present application;

[0044] Figure 7 A schematic diagram of deduplication of metadata provided by an embodiment of the present application;

[0045] Figure 8 A schematic structural diagram of an image compression device provided by an embodiment of the present application;

[0046] Figure 9 A schematic structural diagram of a device provided by an embodiment of the present application. Detailed implementation manners

[0047] In order to make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application will be described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Those of ordinary skill in the art can understand that with the emergence of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0048] The terms "first", "second", etc. in the specification, claims and above-mentioned drawings of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that such use of descriptions can be interchanged under appropriate circumstances, so that the embodiments can be implemented in an order other than that shown or described in the present application. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or modules does not necessarily have to be limited to those steps or modules clearly listed, but may include other steps or modules not clearly listed or inherent to these processes, methods, products or devices. In the present application, the naming or numbering of steps does not mean that the steps in the method flow must be executed in the time / logical order indicated by the naming or numbering. The named or numbered process steps can be changed in the execution order according to the technical objectives to be achieved, as long as the same or similar technical effects can be achieved.

[0049] The image compression method provided by this application can be used to compress the image data of at least two images of the same object; Exemplarily, the image data of at least two images of the aforementioned same object includes the image data of each image of the object, each of the at least two images is divided into at least one tile image, the image data of each image includes the information of each tile image, and the "tile image" in this application can also be referred to as an "image block". For a more intuitive understanding of the relationship between the "image of the object" and the "tile image", please refer to Figure 1 , Figure 1 which is a schematic diagram of the relationship between the image of the object and the tile image provided by an embodiment of this application. As Figure 1 shown, the image of the object is an image with a size of 1920×1080. According to a size of 16×16, 120×68 tile images in the image can be obtained, and the size of each tile image is 16×16. Among them, the size of the tile image can be determined according to the actual situation, and this embodiment does not make specific limitations on this. In addition, the sizes of different tile images obtained by dividing the same image can also be different, that is, the multiple tile images obtained by division are not evenly distributed in the image. For example, for the multiple tile images obtained by division, the size of some tile images can be 16×16, and the size of another part of the tile images can be 8×8. The size of the tile image can be specifically determined according to the actual situation.

[0050] Exemplarily, the scenarios to which the image compression method provided by this application is applied include but are not limited to: the medical field, the smart city field, and the remote sensing field. For example, in the medical field, the image data of the same slice at multiple different scanning magnifications can be obtained. For another example, in the smart city field, the image data of the same urban area at multiple different spectra can be obtained. For another example, in the remote sensing field, the image data of the same map area at multiple different spectra can be obtained, and so on.

[0051] It should be noted that the method provided by this application can also be applied to other application scenarios. The above examples of various application scenarios of this application are only for facilitating the understanding of this solution and are not used to limit this solution.

[0052] Combined with the above description, the image compression method provided by this application is introduced below. Please refer to Figure 2 , Figure 2 which is a schematic flowchart of the image compression method provided by an embodiment of this application. The image compression method provided by this application may include:

[0053] 201. Obtain first information, where the first information corresponds to at least two images of the same object. There is a first association relationship between different images among the at least two images. Each of the at least two images is divided into at least one tile image, and the first information includes information of each tile image in the at least two images.

[0054] In the embodiments of this application, the first device may obtain first information, where the first information corresponds to at least two images (hereinafter referred to as "first images" for convenience of description) of the same object (hereinafter referred to as "first object" for convenience of description). The first information includes the image data of each of the at least two first images of the first object, and there is a first association relationship between different first images among the at least two first images.

[0055] Exemplarily, the first object refers to the object being photographed. For example, the first object may be a slice, the knee part of a human body, the waist of a human body, a certain area on a map, a street view, or other objects, etc. The examples here are only for facilitating the understanding of this solution. What the first object specifically represents needs to be determined in combination with the actual application scenario and is not limited in the embodiments of this application.

[0056] Among them, each of the at least two first images of the above-mentioned first object is divided into at least one tile image. The "tile image" can also be called "image block", "sub-image" or other names, etc. The relationship between the "image of the first object" and the "tile image" has been explained in the above description and will not be elaborated here. The image data of each of the at least two first images of the first object may include: the information of each tile image included in each of the above-mentioned first images. Then, the "first information" can also be called "multi-frame multi-tile impact file", "multi-frame multi-tile image data" or other names, etc., which is not limited in the embodiments of this application.

[0057] Exemplarily, the information of each tile image in the first information may include the original tile image. Then, the original tile images included in each first image of the first object are compressed by using the method provided in this application. Alternatively, the information of each tile image in the first information may include the first compression information after compressing the tile image. In subsequent steps, after decompressing each first compression information included in the first information by using the method provided in this application to obtain the decompression information of each tile image, the decompression information of each tile image may be compressed. Alternatively, each first compression information included in the first information may be compressed again by using the method provided in this application, that is, the tile images included in each first image of the first object are secondarily compressed by using the method provided in this application. The "original tile image" in this application may be understood as a tile image that has not been compressed. In the embodiments of this application, it is clarified what information the information of each tile image in the first information may specifically include, reducing the implementation difficulty of this solution. In addition, two types of information specifically included in the information of each tile image are provided, expanding the application scenarios of this solution.

[0058] Exemplarily, the first association relationship between different first images includes that different first images among at least two first images of the first object contain the same content. Optionally, the foregoing first association relationship further includes that at least two images of the first object include images of the first object at at least two different resolutions; or, the foregoing first association relationship further includes that at least two images of the first object include images of the first object under different spectra; or, the first association relationship may be manifested as other association relationships, etc., which are not exhaustively listed in the embodiments of this application.

[0059] To further understand this solution, an example is given in combination with an actual application scenario here. For example, in the medical field, the first information may specifically be manifested as pathological image data, the first object may specifically be manifested as a slice, the first information includes the image data of the foregoing slice at N different scanning magnifications, the image data at each magnification includes the information of at least one tile image, the information of each tile image may include the first compression information after compressing the tile image, and N is a positive integer greater than or equal to 2. For example, the value of N may be 3, 4, 5, 6, 7 or other values, etc. Among the image data at the foregoing N different scanning magnifications, the image data at the highest magnification is generated by scanning the slice with a scanner, and the remaining N - 1 low-magnification image data are obtained by downsampling the image data at the highest magnification. Then, the first association relationship may include that the image contents corresponding to the image data at N different scanning magnifications are completely the same, and the difference is that the resolutions corresponding to different image data are different.

[0060] For another example, in the field of remote sensing images, the first information may specifically be remote sensing image data, the first object may specifically be a certain position area on a map, the first information includes image data of the foregoing position area under multiple different spectra, the image data under each spectrum includes information of at least one tile image, and the information of each tile image may include the original tile image (which may also be referred to as the "untouched tile image"). The first association relationship may include: the image contents corresponding to the image data under multiple different spectra are completely the same, and the difference lies in that the spectra corresponding to different image data are different. It should be noted that the examples here are only for facilitating the understanding of this solution and are not used to limit this solution.

[0061] In the embodiments of the present application, it is clarified what kind of association relationship the first association relationship between different first images among at least two first images of the first object can specifically be, reducing the implementation difficulty of this solution; in addition, two different association relationships are provided, expanding the application scenarios of this solution and improving the implementation flexibility of this solution.

[0062] Exemplarily, the first information may further include metadata corresponding to at least two first images of the first object (for the convenience of distinction, it may be referred to as "third metadata" hereinafter). Exemplarily, the third metadata corresponding to at least two first images of the first object may be used to indicate the foregoing first association relationship; for example, if the first association relationship indicates that at least two first images of the first object include images of the first object at at least two different resolutions, and the first information includes the image data of each of the at least two first images of the first object, the third metadata may include the resolution of the image data of each of the foregoing first images, and / or include the relationship between the resolutions corresponding to the image data of different first images.

[0063] For example, the first information includes the image data of Image 1, the image data of Image 2, the image data of Image 3, and the image data of Image 4, and the third metadata may include: the image data of Image 2 is obtained by downsampling the image data of Image 1 by a factor of 2, the image data of Image 3 is obtained by downsampling the image data of Image 1 by a factor of 4, and the image data of Image 4 is obtained by downsampling the image data of Image 1 by a factor of 8, so that the relationship between the resolutions corresponding to different image data among the image data of Image 1, the image data of Image 2, the image data of Image 3, and the image data of Image 4 can be known. It should be understood that the examples here are only for facilitating the understanding of this solution and are not used to limit this solution.

[0064] 202. Determine the second information based on the first association relationship, where the second information indicates that the first information is divided into at least two groups, and each group in the at least two groups includes information of at least two tile images. Each group includes information of a first tile image and information of a second tile image, and the first tile image and the second tile image belong to different images of the object.

[0065] In an embodiment of the present application, the first device may determine the second information based on the first association relationship between different first images; for example, since the third metadata included in the first information may indicate the first association relationship between different first images, the first device may determine the second information according to the third metadata.

[0066] Among them, since the first information includes the image data of each of at least two first images of the first object, and the image data of each first image includes the information of the tile images in each first image, the second information may indicate that the information of all the tile images included in the first information is divided into at least two groups, and each group in the at least two groups includes information of at least two tile images. Then the second information may also be referred to as "grouping information", which is used to indicate how to group the information of all the tile images included in the first information.

[0067] For example, each group in the at least two groups may include information of at least one first tile image and information of at least one second tile image, and the first tile image and the second tile image belong to different first images of the first object. There may be a second association relationship between the first tile image and the second tile image, and the second association relationship is related to the first association relationship. For example, the first tile image comes from Image 1, the second tile image comes from Image 2, and the resolution of Image 1 is twice that of Image 2, then the resolution of the first tile image may also be twice that of the second tile image. Another example is that the first tile image comes from Image 1, the second tile image comes from Image 2, and the difference between Image 1 and Image 2 is the spectrum, then the difference between the first tile image and the second tile image may also be the spectrum. The examples here are only for facilitating the understanding of this solution and are not used to limit this solution.

[0068] Optionally, each of the at least two groups may further include information of at least one third tile image. The first tile image, the second tile image, and the third tile image belong to different first images of the first object. There may be a second association relationship between the first tile image and the second tile image, and a second association relationship between the second tile image and the third tile image, etc. That is, the tile images corresponding to each of the at least two groups may come from M different first images, where M is an integer greater than or equal to 2. For example, the value of M may be 2, 3, 4, 5, or other values. Optionally, M may be a preset value, and the specific value of M may be determined in combination with the actual application scenario and is not limited herein.

[0069] It should be noted that in the case where the first association relationship indicates that different first images are images of different resolutions, the "information of the first tile image" in this application refers to the image data from the first image with the highest resolution. In the case where the first association relationship indicates that different first images are images under different spectra, the "information of the first tile image" in this application may come from the image data of any one of the first images, or the "information of the first tile image" may also come from the image data of the first image under a preset spectrum.

[0070] For a more intuitive understanding of this solution, please refer to Figure 3 , Figure 3 is a schematic diagram of the information of the tile images included in a group provided by an embodiment of this application. As Figure 3 shown, the first information includes the image data of the first image 1 and the image data of the first image 2 of the same slice. The image data of the first image 2 is obtained by performing 2-fold downsampling on the image data of the first image 1. Figure 3 Shown in Figure 3 are the first image 1 and the first image 2. The tile images included in a group may include: 4 tile images in the upper left corner of image 1 and 1 tile image in the upper left corner of image 2. Then, the information of the tile images included in a group may include: the information of the 4 tile images in the upper left corner of image 1 and the information of the 1 tile image in the upper left corner of image 2. It can be seen from Figure 3 that the image contents of the 4 tile images in the upper left corner of image 1 and the 1 tile image in the upper left corner of image 2 are the same. It should be understood that

[0071] It should be noted that what is processed in this application is the "image data of each first image of the first object". The concept of "the first image of the first object" is introduced for the convenience of understanding the "first association relationship".

[0072] 203. Compress the information in each of the at least two groups to obtain compressed information of at least two images.

[0073] In the embodiments of the present application, after the first device determines the second information, it may divide the information of multiple tile images included in the first information into at least two groups according to the second information, and then compress the information of the tile images included in each of the at least two groups to obtain the second compressed information corresponding to the information of each tile image in each group, so as to obtain the compressed information of at least two first images of the first object. The compressed information of at least two first images of the first object includes the second compressed information corresponding to the information of each tile image. "Compression" in the present application may also be referred to as "encoding".

[0074] In the embodiments of the present application, since there is a strong correlation between at least two images of the same object, in this solution, the first correlation relationship between different images among at least two images of the same object is used to determine the second information. The second information divides the first information into at least two groups, and each of the at least two groups includes the information of at least two tile images. Each group includes the information of the first tile image and the information of the second tile image. The first tile image and the second tile image belong to different images of the object, that is, based on the first correlation relationship, the information of the tile images in different images is organized into the same group, and then the information in each of the at least two groups is compressed, that is, the correlation between different images is utilized in the process of compressing at least two images of the same object, which is beneficial to improving the compression ratio of the image data, that is, beneficial to reducing the data volume of the compressed information of the at least two images finally obtained.

[0075] In the above Figure 2 On the basis of the corresponding embodiments, please refer to Figure 4 , Figure 4 which is a schematic flowchart of a method for compressing an image provided by an embodiment of the present application. The method for compressing an image provided by the present application may include:

[0076] 401. Obtain first information, where the first information corresponds to at least two images of the same object, there is a first correlation relationship between different images among the at least two images, each of the at least two images is divided into at least one tile image, and the first information includes the information of each tile image in the at least two images.

[0077] 402. Determine second information based on the first correlation relationship, where the second information indicates that the first information is divided into at least two groups, each of the at least two groups includes the information of at least two tile images, each group includes the information of the first tile image and the information of the second tile image, and the first tile image and the second tile image belong to different images of the object.

[0078] In the embodiments of the present application, the specific implementation manners of steps 401 and 402 may refer to the above Figure 2Descriptions corresponding to the embodiments are not elaborated here. Optionally, the information of each tile image in the first information may further include the metadata of each tile image. Exemplarily, the metadata of each tile image may include the resolution of the tile image, the sampling rate, or other information of the tile image, etc.; optionally, when the information of each tile image included in the first information is the first compression information after compressing the tile image, the metadata of each tile image may further include the Huffman coding table, quantization table, or other information used to reflect the compression process of the tile image when compressing the tile image, etc. What specific information the "metadata of each tile image" may include can be determined in combination with the actual application scenario, and is not limited in the embodiments of this application.

[0079] 403. Decompress the information in each group to obtain the decompressed information of each group, where the decompressed information of each group includes the decompressed information of the first tile image and the decompressed information of the second tile image.

[0080] In the embodiments of this application, step 403 is an optional step. The first information includes the information of each tile image in each first image. When the information of each tile image in the first information is the first compression information after compressing the tile image, after the first device divides the information of multiple tile images included in the first information into at least two groups according to the second information, it may further decompress the information of each tile image included in each of the at least two groups to obtain the decompressed information of each group; "decompression" in this application may also be referred to as "decoding". Optionally, the first device may perform lossless decoding on the information of the tile image included in the first information to obtain the decompressed information of the tile image; for example, the algorithm used for lossless decoding may be Huffman decoding, arithmetic decoding, or other algorithms, etc., which are not enumerated here.

[0081] Among them, the decompressed information of each group includes the decompressed information of the tile image corresponding to the information of the tile image in each group. The "decompressed information of the tile image" may specifically be manifested as the discrete cosine transform (DCT) coefficients of the tile image, the pixels of the tile image, or other forms, etc., which are not limited here.

[0082] Exemplarily, the decompressed information of each group includes the decompressed information of the first tile image and the decompressed information of the second tile image. Optionally, when each group includes the information of the third tile image, the decompressed information of each group further includes the decompressed information of the third tile image, etc.

[0083] 404. Perform a clustering operation based on the information in each of at least two groups to obtain first category information, where the first category information indicates the category of each of the at least two groups. Among them, the first category information includes a first category and a second category, the first category and the second category are different, the first category corresponds to a first compression algorithm, the second category corresponds to a second compression algorithm, the first compression algorithm and the second compression algorithm are different, and both the first compression algorithm and the second compression algorithm are used in the process of compressing the information in each of the at least two groups.

[0084] In the embodiments of the present application, step 404 is an optional step. After the first device divides the information of multiple tile images included in the first information into at least two groups according to the second information, it can also perform a clustering operation based on the information of the tile images included in each of the at least two groups to obtain first category information, where the first category information indicates the category of each of the at least two groups. For example, the clustering algorithm used when performing the foregoing clustering operation may include the K-means clustering algorithm, the hierarchical clustering algorithm, or other clustering algorithms, etc., which will not be enumerated here.

[0085] Among them, the first category information indicates that the at least two groups are divided into at least two categories, each of the at least two categories includes at least one group, and the compression algorithms corresponding to different categories among the at least two categories are different. The foregoing compression algorithm is used in the process of compressing the information in each group; the "compression algorithm" in the present application may also be referred to as an "encoding algorithm". Exemplarily, for ease of description, any one of the at least two groups is referred to as a "target group", and the category of the target group determined in step 404 can be used to determine what compression algorithm to use to compress the information of the tile images included in the target group in subsequent steps. Optionally, the larger the data volume of the information of all the tile images included in the target group, the more complex the compression algorithm used by the target group; the smaller the data volume of the information of all the tile images included in the target group, the simpler the compression algorithm used by the target group, which is beneficial to further improving the compression performance on the premise of improving the compression ratio of the entire first information.

[0086] Exemplarily, the first category information includes the first category of the first group and the second category of the second group. The first category and the second category are different. The first group and the second group are different groups among the at least two groups. The first category corresponds to a first compression algorithm, the second category corresponds to a second compression algorithm, the first compression algorithm and the second compression algorithm are different, and both the first compression algorithm and the second compression algorithm are used in the process of compressing the information in each of the at least two groups.

[0087] To understand the present solution more intuitively, please refer to Figure 5 , Figure 5 which is a schematic diagram of the correspondence between the category of each group provided in the embodiments of the present application and the compression algorithm. Figure 5A circle in it represents the information within a group. Figure 5 Taking the example that 8 groups are determined based on the first information, after performing a clustering operation based on the information in the 8 groups, two categories are obtained, that is Figure 5 Category 1 and Category 2 in it, as Figure 5 shown, the groups of Category 1 adopt compression algorithm A, and the groups of Category 2 adopt compression algorithm B. It should be understood that Figure 5 the example in it is only for facilitating the understanding of this solution and is not used to limit this solution.

[0088] Exemplarily, in one implementation manner, after the first device divides the information of multiple tile images included in the first information into at least two groups according to the second information, it needs to first execute step 403. Step 404 may include: the first device performs a clustering operation according to the decompression information of at least one first tile image included in each of the at least two groups to obtain first category information, where the category of the decompression information of the first tile images included in each group represents the category of each group.

[0089] Exemplarily, through step 403, the first device can obtain the decompression information (that is, the decompression information of the tile images) included in each of the at least two groups, and then obtain the decompression information of all the first tile images in each group. Then, regarding the decompression information of all the first tile images included in each group as a whole, a clustering algorithm is used to cluster the decompression information of the first tile images included in multiple groups to obtain the category of the decompression information of all the first tile images included in each group. Since the category of the decompression information of the first tile images included in each group represents the category of each group, the first category information is thus obtained.

[0090] In another implementation manner, after the first device obtains the decompression information (that is, the decompression information of the tile images) included in each of the at least two groups through step 403, it can also regard the decompression information included in each group as a whole, and use a clustering algorithm to cluster the decompression information included in multiple groups to obtain the category of each group.

[0091] It should be understood that the first device can also perform a clustering operation based on other information. For example, in the case where the first association relationship indicates that different first images are images with different resolutions, the first device can also perform a clustering operation based on the information of the tile images with the lowest magnification included in each group, etc. This application does not list them exhaustively.

[0092] In the embodiments of this application, since the first information includes the image data of at least two first images, and the image contents in the at least two first images are the same, there may be both regions with rich content and regions with simple content in the at least two first images. For a more intuitive understanding of this solution, please refer to Figure 6, Figure 6 It is a schematic diagram of an area with rich content and an area with simple content in the first image provided by an embodiment of the present application. Figure 6 It shows two images, a left sub-schematic diagram of a remote sensing image ( Figure 6 ) and a right sub-schematic diagram of a pathological image ( Figure 6 ). As shown in Figure 6 , both of these two images can be divided into different regions (background region and foreground region). The background region is almost all white, that is, the image content of the background region is simple, and the foreground region has relatively rich details, that is, the image content of the foreground region is complex. It should be understood that Figure 6 The examples in

[0093] are only for facilitating the understanding of this solution and are not used to limit this solution.

[0094] If the information of tile images with an associated relationship in different first images is organized into the same group in at least two groups, then the information included in the same group in at least two groups can all be the information of tile images with rich content, or the information included in the same group in at least two groups can all be the information of tile images with simple content, that is, the information of tile images with the same content complexity is included in the same group. And since it is often relatively simple to compress the information of tile images with simple content, a relatively simple compression algorithm can be used to obtain a high compression ratio; it is often more difficult to compress the information of tile images with complex content.

[0095] Therefore, when performing a clustering operation based on the information in each of the at least two groups to obtain the categories of each of the at least two groups, and then determining the compression algorithm to be used for compressing the information in each group based on the categories of each of the at least two groups, it is beneficial to implement compression for each group using a more suitable compression algorithm, and it is beneficial to improve the overall compression performance on the basis of ensuring a high compression ratio for the overall file.

[0096] 405. Compress the information in each of the at least two groups to obtain the compressed information of at least two images.

[0097] In the embodiment of the present application, the specific implementation manner of step 405 can refer to the description in step 203 above and will not be elaborated here.

[0098] Step 403 is an optional step. In one implementation, when the information of each tile image in the first information is the first compression information after compressing the tile image, if step 403 is executed, step 405 may include: after the first device obtains all the decompression information included in the target group (that is, any one of the at least two groups) in at least two groups, the first device may input the decompression information of the first tile image included in the target group into the trained first model, and use the trained first model to predict the decompression information of the second tile image included in the target group to obtain the first prediction information; determine the first residual between the first prediction information and the decompression information of the second tile image included in the target group; compress the first residual to obtain the second compression information of the second tile image, and compress the decompression information of the first tile image to obtain the second compression information of the first tile image, where the second compression information of the second tile image and the second compression information of the first tile image are both included in the compression information of the target group; the compression information of the target group is included in the compression information of at least two images.

[0099] Optionally, the first model may be a deep learning model. For example, the first model may be a convolutional neural network, a fully connected neural network, a neural network based on an attention mechanism, or other types of neural networks, which are not limited in the embodiments of the present application.

[0100] Optionally, when all the decompression information included in the target group further includes the decompression information of a third tile image, the first device may further input the decompression information of the second tile image included in the target group into the trained first model, and use the trained first model to predict the decompression information of the third tile image included in the target group to obtain the second prediction information; determine the second residual between the second prediction information and the decompression information of the third tile image included in the target group; compress the second residual to obtain the second compression information of the third tile image, and the second compression information of the third tile image is also included in the compression information of the target group.

[0101] It should be noted that the compression information of the target group includes the second compression information of the first tile image obtained by compressing the decompression information of the first tile image, the second compression information of the second tile image obtained by compressing the first residual, the second compression information of the third tile image obtained by compressing the second residual, and so on. If the information of the target group further includes the information of the tile image from other first images, the residual can also be obtained based on the above steps, and then the residual is compressed to obtain the second compression information of other tile images, and the second compression information of other tile images is included in the compression information of the target group.

[0102] Optionally, if step 404 is executed, after the first device obtains all the decompression information included in the target group (i.e., any one of the at least two groups) among the at least two groups, it will also determine the target compression algorithm used in the process of generating the compression information of the target group according to the category of the target group determined in step 404. If step 404 is not executed, the same compression algorithm may be used in the process of generating the compression information of different groups.

[0103] The first device repeats the above operation at least twice, so as to obtain the compression information of each group among the at least two groups, that is, the compression information of at least two images is obtained. The compression information of at least two images includes the compression information of each group among the at least two groups.

[0104] In the embodiment of the present application, since there is a strong correlation between the first tile image and the second tile image in the same group, the accuracy of predicting the decompression information of the second tile image using the decompression information of the first tile image is relatively high, that is, the entropy of the above first residual is relatively small. Therefore, the data volume of the second compressed information of the second tile image obtained after compressing the first residual is relatively small. The method of prediction, calculating the residual, and compressing the residual is beneficial to obtaining the second compressed information with a smaller data volume, thereby facilitating reducing the data volume of the finally obtained compression information.

[0105] In addition, since the first information may be generated in multiple scenarios, the prediction rules for predicting the decompression information of the second tile image based on the decompression information of the first tile image are not unified. To solve this diversity problem, in this solution, the first model is used to complete the prediction operation of the decompression information of the second tile image according to the decompression information of the first tile image. The first model selects a deep learning model, which is beneficial to learning diverse prediction rules through the deep learning model, facilitating more accurate prediction of the decompression information of the second tile image using the decompression information of the first tile image, thereby further reducing the data volume of the residual, and further reducing the data volume of the finally obtained compression information.

[0106] In another implementation, if step 403 is not executed, and / or, when the information of each tile image in the first information includes the original tile image, step 405 may include: after the first device obtains the information of all tile images included in the target group (that is, any one of the at least two groups) in at least two groups, the first device may input the information of the first tile image included in the target group into the trained first model, and use the trained first model to predict the information of the second tile image included in the target group to obtain the first prediction information; determine the third residual between the first prediction information and the information of the second tile image included in the target group; compress the third residual to obtain the second compressed information of the second tile image, and compress the information of the first tile image to obtain the second compressed information of the first tile image, where the second compressed information of the second tile image and the second compressed information of the first tile image are both included in the compressed information of the target group; the compressed information of the target group is included in the compressed information of at least two images.

[0107] Optionally, when the information of all tile images included in the target group further includes the information of the third tile image, the first device may further input the information of the second tile image included in the target group into the trained first model, and use the trained first model to predict the information of the third tile image included in the target group to obtain the second prediction information; determine the fourth residual between the second prediction information and the information of the third tile image included in the target group; compress the fourth residual to obtain the second compressed information of the third tile image, and the second compressed information of the third tile image is also included in the compressed information of the target group.

[0108] And so on. If the information of the target group further includes the information of the tile images from other first images, the residual can also be obtained based on the above steps, and then the residual is compressed to obtain the second compressed information of other tile images, and the second compressed information of other tile images is included in the compressed information of the target group.

[0109] Optionally, if step 404 is executed, after the first device obtains the information of all tile images included in the target group (that is, any one of the at least two groups) in at least two groups, the first device will also determine the target compression algorithm used in the process of generating the compressed information of the target group according to the category of the target group determined in step 404. If step 404 is not executed, the same compression algorithm may be used in the process of generating the compressed information of different groups.

[0110] The first device repeats the above operations at least twice, so as to obtain the compressed information of each group in at least two groups, that is, the compressed information of at least two images is obtained, and the compressed information of at least two images includes the compressed information of each group in at least two groups.

[0111] Optionally, before the first device performs a prediction operation using the trained first model, if step 404 is executed, at least two groups of decompression information included in each group can be obtained through step 404. Furthermore, multiple decompression information in some of the groups can be selected to retrain the first model, so as to update the parameters of the first model and obtain the retrained first model. Thus, the retrained first model is used in the subsequent process of using the first model.

[0112] If step 404 is not executed, information of multiple tile images included in each group included in the first information can be obtained. Furthermore, information of multiple tile images in some of the groups can be selected to retrain the first model, so as to update the parameters of the first model and obtain the retrained first model. Thus, the retrained first model is used in the subsequent process of using the first model.

[0113] Optionally, when the information of the tile images in the first information further includes metadata of the tile images, step 405 may further include: compressing the metadata of multiple tile images in each group. Among them, the metadata of multiple tile images in each group may include first metadata and second metadata, and the first metadata and the second metadata are different metadata in the metadata of multiple tile images included in the same group.

[0114] Exemplarily, when the first metadata and the second metadata meet the similarity condition, the first device deletes the second metadata; compresses the first metadata to obtain second compression information of the first metadata, and the second compression information of the first metadata is included in the compression information of at least two images. When the first metadata and the second metadata do not meet the similarity condition, in one implementation, the first device may determine the difference information between the first metadata and the second metadata; compress the difference information to obtain second compression information of the second metadata, and the second compression information of the second metadata is included in the compression information of at least two images. In another implementation, the first device may compress the second metadata to obtain second compression information of the second metadata.

[0115] Exemplarily, the first metadata may be the first metadata in the metadata of multiple tile images included in each group, or the first metadata may be any one of the metadata of multiple tile images included in each group. The "second metadata" may be any one of the metadata other than the first metadata in the multiple metadata included in each group.

[0116] Exemplarily, "the first metadata and the second metadata meet the similarity condition" may be understood as "the first metadata and the second metadata are exactly the same", and "the first metadata and the second metadata do not meet the similarity condition" may be understood as that there are any differences between the first metadata and the second metadata.

[0117] To understand this solution more intuitively, please refer to Figure 7 , Figure 7 which is a schematic diagram for deduplication of metadata provided by an embodiment of this application. As Figure 7 shown, after the first device obtains multiple metadata included in the target group, for any piece of metadata, it can determine whether the metadata is the first piece of metadata. If the determination result is yes, the metadata can be determined as the first metadata; if the determination result is no, the metadata can be determined as the second metadata. The first device can then determine whether the second metadata is the same as the first metadata. If the determination result is yes, the second metadata can be deleted; if the determination result is no, the difference information between the second metadata and the first metadata can be recorded. The first device can also determine whether the metadata is the last piece of metadata in the target group. If the determination result is yes, the first metadata and the at least one obtained difference information are compressed; if the determination result is no, the next piece of metadata in the target group is continuously obtained. It should be understood that Figure 7 the examples in

[0118] are only for facilitating the understanding of this solution and do not limit this solution. In an embodiment of this application, since each group includes information of multiple tile images, and the information of each tile image includes the metadata of each tile image, during the compression of the information in each group, it will be compared whether different metadata in each group meet the similarity condition. If they meet, the metadata that meet the similarity condition are deduplicated, thereby further reducing the data volume of the compressed information.

[0119] In addition, since the metadata of all tile images in the digital pathology imaging scenario are basically the same, there is almost no difference between the first metadata and each subsequent second metadata. All other metadata except the first metadata can be deleted, thereby greatly reducing the data volume of the compressed information. And in this solution, the comparison is made between the metadata of two tile images for performing the deduplication operation, and the time consumption of the foregoing comparison operation is very small, which has almost no impact on the performance of the algorithm, that is, the reduction of performance caused by introducing the comparison operation is avoided.

[0120] In the case where there is a difference between the first metadata and the second metadata, the difference information is compressed, further reducing the data volume of the compressed information. Taking the metadata of tile images in JPEG format included in the first information as an example, through experimental verification, the average data volume of the metadata of tile images corresponding to each JPEG format image can be reduced from 623 bytes to 1 byte.

[0121] The above mainly introduces the solution provided by the embodiments of the present application from the perspective of methods. It can be understood that in order for an electronic device to implement the above functions, it includes the corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should easily realize that, in combination with the modules and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0122] The embodiments of the present application can divide the functional modules of the electronic device according to the above method examples. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of a software functional module. It should be noted that the division of modules in the embodiments of the present application is illustrative, only a logical functional division, and there may be other division methods in actual implementation.

[0123] The device for executing the above method in the embodiments of the present application will be described in detail below.

[0124] In Figures 1 to 7 On the basis of the corresponding embodiments, please refer to Figure 8 , Figure 8 FIG.

[0125] Optionally, the information of the tile image in the first information includes the original tile image, or the information of the tile image in the first information includes the first compressed information after compressing the tile image.

[0126] Optionally, when the information of the tile image in the first information includes the first compression information after compressing the tile image, the image compression device 800 further includes: a decompression module 804, configured to decompress the information in each group to obtain the decompressed information of each group, where the decompressed information of each group includes the decompressed information of the first tile image and the decompressed information of the second tile image; a compression module 803, specifically configured to: input the decompressed information of the first tile image into a first model, and predict the decompressed information of the second tile image through the first model to obtain first prediction information; determine the residual between the first prediction information and the decompressed information of the second tile image; compress the residual to obtain the second compression information of the second tile image, and compress the decompressed information of the first tile image to obtain the second compression information of the first tile image, where the second compression information of the second tile image and the second compression information of the first tile image are both included in the compression information of at least two images.

[0127] Optionally, the image compression device 800 further includes: a clustering module 805, configured to perform a clustering operation based on the information in each of at least two groups to obtain first category information, where the first category information indicates the category of each of the at least two groups, and the first category information includes a first category and a second category, the first category and the second category are different, the first category corresponds to a first compression algorithm, the second category corresponds to a second compression algorithm, the first compression algorithm and the second compression algorithm are different, and both the first compression algorithm and the second compression algorithm are used in the process of compressing the information in each of the at least two groups.

[0128] Optionally, when the information of the tile image in the first information includes the first compression information after compressing the tile image, the image compression device 800 further includes: a decompression module 804, configured to decompress the information in each group to obtain the decompressed information of each group, where the decompressed information of each group includes the decompressed information of the first tile image; a clustering module 805, specifically configured to perform a clustering operation according to the decompressed information of the first tile image included in each of the at least two groups to obtain first category information, where the category of the decompressed information of the first tile image included in each group represents the category of each group.

[0129] Optionally, the information of the tile image in the first information further includes the metadata of the tile image, the information in each group includes first metadata and second metadata, the first metadata and the second metadata are different metadata, and the compression module 803 is specifically configured to: delete the second metadata when the first metadata and the second metadata meet the similarity condition; compress the first metadata to obtain the second compression information of the first metadata, and the second compression information of the first metadata is included in the compression information of at least two images.

[0130] Optionally, the compression module 803 is further configured to: determine the difference information between the first metadata and the second metadata when the first metadata and the second metadata do not meet the similarity condition; compress the difference information to obtain the second compression information of the second metadata, and the second compression information of the second metadata is included in the compression information of at least two images.

[0131] Optionally, the first association relationship indicates that the at least two images include images of the object at at least two different resolutions, or the first association relationship indicates that the at least two images include images of the object under different spectra.

[0132] It should be noted that the information interaction, execution process, etc. between the modules / units in the image compression device 800 are based on the same concept as the corresponding method embodiments in this application. For specific content, reference can be made to the descriptions in the method embodiments shown above in this application, which will not be elaborated here. Figures 1 to 7 Corresponding to the respective method embodiments based on the same concept, the specific content can be seen in the descriptions in the method embodiments shown above in this application, which will not be elaborated here.

[0133] Next, an apparatus provided in an embodiment of the present application will be introduced. Please refer to Figure 9 , Figure 9 which is a schematic structural diagram of the apparatus provided in the embodiment of the present application. Specifically, the apparatus 900 includes: a receiver 901, a transmitter 902, a processor 903, and a memory 904 (where the number of processors 903 in the apparatus 900 can be one or more. Figure 9 Here, one processor is taken as an example), where the processor 903 may include an application processor 9031 and a communication processor 9032. In some embodiments of the present application, the receiver 901, the transmitter 902, the processor 903, and the memory 904 may be connected through a bus or other means.

[0134] The memory 904 may include a read-only memory and a random access memory, and provide instructions and data to the processor 903. A part of the memory 904 may further include a non-volatile random access memory (NVRAM). The memory 904 stores operation instructions, executable modules, or data structures of the processor, or subsets thereof, or extended sets thereof, where the operation instructions may include various operation instructions for implementing various operations.

[0135] The processor 903 controls the operation of the apparatus. In a specific application, the various components of the apparatus are coupled together through a bus system, where the bus system may include a power bus, a control bus, a status signal bus, etc. in addition to a data bus. However, for the sake of clear illustration, all buses are referred to as a bus system in the figure.

[0136] The method disclosed in the embodiments of the present application can be applied to or implemented by the processor 903. The processor 903 can be an integrated circuit chip with signal processing capabilities. During implementation, the steps of the above method can be completed through the integrated logic circuit of the hardware in the processor 903 or instructions in the form of software. The above-mentioned processor 903 can be a general-purpose processor, a digital signal processor (DSP), a microprocessor or a microcontroller, and may further include an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The processor 903 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed and completed by the hardware decoding processor, or executed and completed by a combination of the hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory 904, and the processor 903 reads the information in the memory 904 and combines its hardware to complete the steps of the above method.

[0137] The receiver 901 can be used to receive input digital or character information, and generate signal inputs related to the relevant settings and function controls of the device. The transmitter 902 can be used to output digital or character information through the first interface; the transmitter 902 can also be used to send instructions to the disk group through the first interface to modify the data in the disk group; the transmitter 902 can also include a display device such as a display screen.

[0138] In the embodiments of the present application, the processor 903 is used to execute Figures 1 to 7 the image compression method executed by the first device in the corresponding embodiment. It should be noted that the specific manner in which the application processor 9031 in the processor 903 executes the foregoing steps is based on the same concept as the corresponding method embodiments in the present application Figures 1 to 7 and the technical effects brought by it are the same as those of the corresponding method embodiments in the present application Figures 1 to 7 For the specific content, reference can be made to the description in the foregoing method embodiments shown in the present application, and details will not be repeated here.

[0139] In an embodiment of the present application, a computer-readable storage medium is further provided. A program is stored in the computer-readable storage medium. When it runs on a computer, it causes the computer to execute the steps performed by the first device in the method described in the foregoing Figures 1 to 7 embodiment shown.

[0140] In an embodiment of the present application, a computer program product is further provided. The computer program product includes a program. When the program runs on a computer, it causes the computer to execute the steps performed by the first device in the method described in the foregoing Figures 1 to 7 embodiment shown.

[0141] The first device and the image compression device provided in the embodiment of the present application may specifically be a chip. The chip includes a processing unit and a communication unit. The processing unit may be, for example, a processor, and the communication unit may be, for example, an input / output interface, a pin, or a circuit. The processing unit may execute the computer execution instructions stored in the storage unit to cause the chip to execute the foregoing Figures 1 to 7 method described in the embodiment shown. Optionally, the storage unit is a storage unit inside the chip, such as a register, a cache, etc. The storage unit may also be a storage unit outside the chip and located inside the radio access device, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.

[0142] Among them, the processor mentioned anywhere above may be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the program of the method in the first aspect above.

[0143] In addition, it should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the drawings of the device embodiments provided in the present application, the connection relationship between the modules indicates that they have a communication connection, which may specifically be implemented as one or more communication buses or signal lines.

[0144] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware. Of course, it can also be implemented by dedicated hardware including application-specific integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. Generally, functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structures for implementing the same function can also be various, such as analog circuits, digital circuits or dedicated circuits, etc. However, for the present application, in more cases, software program implementation is a better implementation method. Based on such an understanding, the technical solution of the present application, in essence, or the part that makes a contribution to the prior art, can be embodied in the form of a software product. The computer software product is stored in a readable storage medium, such as a floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk or optical disc of a computer, etc., and includes several instructions to enable a computer device (which can be a personal computer, training device, or network device, etc.) to execute the methods described in various embodiments of the present application.

[0145] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product.

[0146] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general computer, a dedicated computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, training device or data center to another website, computer, training device or data center in a wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.

Claims

1. A method for compressing an image, characterized in that, The method includes: Obtaining first information, where the first information corresponds to at least two images of the same object, there is a first association relationship between different images among the at least two images, each image among the at least two images is divided into at least one tile image, and the first information includes information of each tile image among the at least two images; Determining second information based on the first association relationship, where the second information indicates dividing the first information into at least two groups, each group among the at least two groups includes information of at least two tile images, each group includes information of a first tile image and information of a second tile image, and the first tile image and the second tile image belong to different images of the object; Compressing the information in each of the at least two groups to obtain compressed information of the at least two images.

2. The method according to claim 1, characterized in that, The information of the tile image in the first information includes the original tile image, or the information of the tile image in the first information includes first compressed information obtained by compressing the tile image.

3. The method according to claim 2, wherein When the information of the tile image in the first information includes first compressed information obtained by compressing the tile image, the method further includes: Decompressing the information in each group to obtain decompressed information of each group, where the decompressed information of each group includes decompressed information of the first tile image and decompressed information of the second tile image; The compressing the information in each of the at least two groups includes: Inputting the decompressed information of the first tile image into a first model, and predicting the decompressed information of the second tile image through the first model to obtain first prediction information; Determining a residual between the first prediction information and the decompressed information of the second tile image; Compressing the residual to obtain second compressed information of the second tile image, and compressing the decompressed information of the first tile image to obtain second compressed information of the first tile image, where the second compressed information of the second tile image and the second compressed information of the first tile image are both included in the compressed information of the at least two images.

4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Performing a clustering operation based on the information in each of the at least two groups to obtain first category information, where the first category information indicates the category of each of the at least two groups, where the first category information includes a first category and a second category, the first category and the second category are different, the first category corresponds to a first compression algorithm, the second category corresponds to a second compression algorithm, the first compression algorithm and the second compression algorithm are different, and both the first compression algorithm and the second compression algorithm are used in the process of compressing the information in each of the at least two groups.

5. The method according to claim 4, wherein When the information of the tile image in the first information includes first compressed information obtained by compressing the tile image, the method further includes: Decompress the information in each of the groups to obtain decompressed information for each of the groups, where the decompressed information for each of the groups includes decompressed information for the first tile image; The performing a clustering operation based on the information in each of the at least two groups to obtain first category information includes: Performing a clustering operation according to the decompressed information for the first tile image included in each of the at least two groups to obtain the first category information, where the category of the decompressed information for the first tile image included in each group represents the category of each group.

6. The method according to any one of claims 1 to 3, characterized in that, The information of the tile image in the first information further includes metadata of the tile image, the information in each group includes first metadata and second metadata, the first metadata and the second metadata are different metadata, and the compressing the information in each of the at least two groups includes: When the first metadata and the second metadata meet the similarity condition, delete the second metadata; Compress the first metadata to obtain second compressed information of the first metadata, and the second compressed information of the first metadata is included in the compressed information of the at least two images.

7. The method according to claim 6, characterized in that, The compressing the information in each of the at least two groups further includes: When the first metadata and the second metadata do not meet the similarity condition, determine the difference information between the first metadata and the second metadata; Compress the difference information to obtain second compressed information of the second metadata, and the second compressed information of the second metadata is included in the compressed information of the at least two images.

8. The method according to any one of claims 1 to 3, characterized in that The first association relationship indicates that the at least two images include images of the object at at least two different resolutions, or the first association relationship indicates that the at least two images include images of the object under different spectra.

9. An image compression device, characterized in that, The device includes: An acquisition module, configured to acquire first information, where the first information corresponds to at least two images of the same object, there is a first association relationship between different images among the at least two images, each image among the at least two images is divided into at least one tile image, and the first information includes information of each tile image in the at least two images; A determination module, configured to determine second information based on the first association relationship, where the second information indicates that the first information is divided into at least two groups, each of the at least two groups includes information of at least two tile images, each group includes information of a first tile image and information of a second tile image, and the first tile image and the second tile image belong to different images of the object; A compression module, configured to compress the information in each of the at least two groups to obtain compressed information of the at least two images.

10. A device, characterized in that, Includes a processor and a memory, the processor is coupled to the memory, The memory is used to store programs; The processor is configured to execute the programs in the memory, so that the training device executes the method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, A program is stored in the computer-readable storage medium, and when the program runs on a computer, the computer is caused to execute the method according to any one of claims 1 to 8.

12. A computer program product, characterized in that, The computer program product includes a program, and when the program runs on a computer, the computer is caused to execute the method according to any one of claims 1 to 8.