Image adaptive compression system and method based on big data feature analysis

By constructing a big data feature mapping relation library and a local sensitive hash index, an adaptive compression configuration is generated, which solves the problem of dynamic adjustment of image compression in existing technologies, realizes efficient and interpretable image compression, adapts to diverse image content and terminal environment, and avoids visual distortion and abrupt changes in compression strategy.

CN121864987AInactive Publication Date: 2026-04-14CHANGZHOU COLLEGE OF INFORMATION TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-04
Publication Date
2026-04-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing image compression technologies struggle to dynamically adjust compression intensity based on image content semantics, user preferences, and terminal display environment, resulting in insufficient generalization performance, loss of detail, color shift, or block artifacts. Furthermore, they lack lightweight inference mechanisms for rapid retrieval and fusion, making it difficult to meet the high throughput and low latency requirements of internet content delivery networks.

Method used

A big data feature mapping relationship library is constructed. Image categories are generated and the optimal compression template is determined through clustering algorithms. By combining subjective evaluation and objective index optimization, an interpretable mapping relationship between visual features and compression parameters is established. Locality-sensitive hash index is used to perform approximate nearest neighbor search. Compression configurations of multiple templates are integrated to generate an adaptive compression configuration.

Benefits of technology

It achieves high-fidelity compression for diverse image content, adapts to different terminal display capabilities and network bandwidth, avoids visual distortion caused by fixed quantization tables, has smooth transition capabilities, adapts to diverse image semantic categories, and improves compression efficiency and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121864987A_ABST
    Figure CN121864987A_ABST
Patent Text Reader

Abstract

The invention discloses a picture adaptive compression system and method based on big data feature analysis, and relates to the technical field of image processing, and the method comprises the steps: constructing a big data feature template library, and determining an optimal compression method corresponding to each category through clustering image samples and jointly optimizing objective and subjective indexes; generating a real-time feature vector of a to-be-compressed image by using a feature extraction method, and executing approximate nearest neighbor search in a template library to obtain a matching template; according to the method, compression parameters of a plurality of matching templates are fused to generate adaptive configuration, and a standard encoder is driven to complete compression, so that the problem that the compression efficiency and the visual fidelity are difficult to consider in an existing image compression method is solved, high-efficiency and low-resource-consumption image adaptive compression is realized, the quality index of the image is remarkably improved under the same code rate, and the image compression efficiency is improved. And the blocking effect and semantic information loss are effectively inhibited.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, specifically to an adaptive image compression system and method based on big data feature analysis. Background Technology

[0002] With the widespread application of internet content delivery networks, images, as the core carrier of information dissemination, directly impact user experience and system resource consumption through their transmission efficiency and visual quality. Current mainstream image compression technologies are mostly based on standards such as JPEG and WebP, which rely on preset quantization tables and fixed encoding strategies, making it difficult to dynamically adjust compression intensity based on image content semantics, user preferences, and the terminal display environment.

[0003] Traditional rule-based or offline-trained compression strategies lack the ability to continuously learn from the distribution of real user data, resulting in insufficient generalization performance when faced with diverse image content. Compression results often suffer from details loss, color cast, or block artifacts. Furthermore, existing solutions generally fail to establish an interpretable mapping relationship between image visual features and compression parameters, and lack lightweight inference mechanisms that support rapid retrieval and fusion, making it difficult to meet the stringent requirements of high-throughput, low-latency image processing in internet content delivery networks. Therefore, an adaptive image compression method based on big data feature analysis is needed, which can improve image fidelity and strong generalization capabilities by constructing a scalable feature-compression mapping template library without relying on heavy-duty deep models. Summary of the Invention

[0004] The purpose of this invention is to provide an image adaptive compression system and method based on big data feature analysis to solve the problems raised in the prior art.

[0005] To achieve the above objectives, the present invention provides the following technical solution: an adaptive image compression method based on big data feature analysis. Step 1: Construct a big data feature mapping relationship library: Collect massive user image samples, extract the visual feature vector of each image, and generate several image categories through clustering algorithms; for each category, determine the optimal compression template corresponding to each category through joint optimization of subjective evaluation and objective indicators, and form a feature-compression template mapping template. Preferably, the visual feature vector in step 1 includes the color distribution entropy, edge density, texture complexity, salient region proportion, and spatial frequency energy distribution of the image. The color distribution entropy is obtained by calculating the histogram information entropy of each color channel of the image. The edge density is obtained by counting the number of edge pixels per unit area after detection by the Canny operator. The texture complexity is measured by the local binary mode variance. The salient region proportion is calculated based on the frequency domain residual model to determine the area ratio of the foreground region. The spatial frequency energy distribution is obtained by dividing the energy proportion by frequency band after performing a two-dimensional discrete cosine transform on the image.

[0006] Preferably, in step 1, the clustering algorithm adopts improved K-means clustering, the number of clusters N is automatically determined according to the principle of maximizing the silhouette coefficient, the number of clusters is within a preset range, and the clustering convergence condition is that the change of the sum of squares within each cluster is less than a preset threshold in several consecutive iterations.

[0007] Obtain the historical compression records of the image, and collect all the image parameter adjustment methods in the historical compression records into a compression template set. Each compression template in the compression template set includes one image parameter adjustment method or a combination of at least two image parameter adjustment methods. Collect images to evaluate the subjects' subjective ratings. For example, set a score range of [0,10], where 0 points indicate severe image distortion and 10 points indicate no image distortion. Finally, take the average score of the subjects for the same image and the same compressed template, and normalize the value in the range of [0,1] to obtain the normalized value Q of the average subjective rating. For each category of images, obtain the compression results using different compression templates, and collect evaluation records for each compression result; The joint optimization objective function is defined as F=α·SSIM+β·PSNR+γ·(1-PHD)+δ·Q, where SSIM, PSNR, PHD and Q represent the normalized values ​​of structural similarity index, peak signal-to-noise ratio, perceptual hash distance and average subjective score, respectively, and α, β, γ and δ are weight coefficients, satisfying α+β+γ+δ=1, and each weight coefficient is a preset value.

[0008] For each category of images, the compression template with the largest F-value is selected as the optimal compression template for that category. Finally, the central feature vector of each category of images is bound to the optimal compression template to form a feature-compression template mapping relationship, and all feature-compression template mapping templates are collected to build a template library.

[0009] Step 2: Extract the visual feature vector of the image to be compressed; Preferably, the image feature extraction method in step 2 uses a convolutional neural network, which includes several convolutional layers, has a predetermined input size of a predetermined resolution, outputs a feature vector of a predetermined dimension, has fewer model parameters than a preset upper limit, and the single-image inference time does not exceed a preset time threshold on a specific processor.

[0010] Step 3: Based on the real-time feature vector, perform an approximate nearest neighbor search in the big data feature mapping relationship library to obtain the template with the highest matching degree; Preferably, in step 3, the near nearest neighbor search adopts a locality-sensitive hash index structure, the hash function family is random hyperplane projection, the number of hash buckets is a preset value, each query returns M nearest neighbor templates, and the search time is controlled within a preset time threshold.

[0011] The search process employs a Locality Sensitive Hash (LSH) index structure. The hash function family uses random hyperplane projection, randomly generating g 5-dimensional standard normal distributed random vectors r, obtaining the real-time feature vector vr, and constructing the hash function h(v) = {sign(r1)}. T ·v),sign(r2 T ·v),sign(r3 T ·v),……,sign(r g T Let v be a visual feature vector, and r1, r2, r3, ..., rg be the 1st, 2nd, 3rd, ..., gth random vectors, respectively. L hash tables are constructed, each consisting of L independent hash functions, with each hash bucket having an L-bit binary key. Each template feature vector in the template library is hashed into the corresponding bucket of the L hash tables. During a query, the real-time feature vector of the image to be compressed is hashed into a hash table, the bucket position of the real-time feature vector in the L hash tables is calculated, and all candidate templates hitting the correct bucket are merged to form a candidate set. Subsequently, the Euclidean distance between the real-time feature vector and each template feature vector in the candidate set is calculated, and the M templates with the smallest distance are selected as the final result. Preferably, M is 5.

[0012] Step 4: Based on the matching weights of the M templates with the highest matching degree, merge the optimal compression templates corresponding to the M templates to generate the final adaptive compression configuration.

[0013] Specifically, step 4 includes: Obtain the Euclidean distance di between the i-th template and the real-time feature vector, and the Euclidean distance dj between the j-th template and the real-time feature vector. Calculate the matching weight wi of the i-th template. ε represents the protection factor to prevent division by zero; The fusion rules employ different strategies for different parameter types: For continuous parameters, such as quantization table scaling factor and sharpening filter intensity, a weighted average is taken; for discrete parameters, such as chroma subsampling ratio and Huffman coding strategy, the configuration corresponding to the largest weight is selected, i.e., if w3 has the largest weight, then the chroma subsampling ratio of the third template is used; if there are more than two discrete parameters and the high-weight template configurations conflict, then the configuration that appears more frequently in the template with the highest weight ranking is retained first.

[0014] Step 5: Input the adaptive compression configuration into the standard image encoder to complete the image compression.

[0015] Step 5 inputs the adaptive compression configuration into the standard image encoder to complete image compression. The image parameters adjusted in the adaptive compression configuration include any one or a combination of at least two of the following: quantization table scaling factor, chroma subsampling ratio, DCT coefficient threshold, Huffman coding optimization strategy, and sharpening filter intensity. After the adaptive compression configuration is completed, the image to be compressed is dynamically adjusted, and finally, the dynamically adjusted compressed output is completed.

[0016] The system includes: The module includes a feature mapping relationship library management module, an image feature extraction module, a nearest neighbor search module, an adaptive compression configuration fusion module, and an image encoding module. The system includes: a feature mapping relation library management module for building and maintaining a big data feature mapping relation library; an image feature extraction module for extracting visual features from the image to be compressed to generate a real-time feature vector; a nearest neighbor search module for performing an approximate nearest neighbor search in the big data feature mapping relation library based on the real-time feature vector to obtain M candidate templates; an adaptive compression configuration fusion module for calculating matching weights based on the Euclidean distance between the M candidate templates and the real-time feature vector and fusing them to generate an adaptive compression configuration; and a standard image encoding module for receiving the adaptive compression configuration and dynamically adjusting the encoder's internal parameters to complete image compression. The feature mapping relation library management module includes a visual feature extraction unit, a K-means clustering unit, and a compression template evaluation unit. The visual feature extraction unit is used to extract visual features of the image, including color distribution entropy, edge density, texture complexity, and spatial frequency energy distribution. The K-means clustering unit is used to cluster the image. The compression template evaluation unit is used to compress and encode the image while simultaneously executing multiple compression parameter combinations in parallel. The image feature extraction module includes an image preprocessing unit and an image feature management unit. The image preprocessing unit is used to preprocess the image, including unifying the image size and color space. The image feature management unit is used to extract image features, including structural similarity index, peak signal-to-noise ratio, perceptual hash distance, and average subjective score. The nearest neighbor search module includes a locality-sensitive hash index unit and a candidate set merging unit. The locality-sensitive hash index unit instantiates independent hash tables, each consisting of several standard normally distributed random vectors, and outputs binary bucket keys. The candidate set merging unit is used to calculate and arrange the Euclidean distance and return the nearest template. The adaptive compression configuration fusion module includes a weight calculation unit and a parameter fusion decision unit. The weight calculation unit is used to calculate the Euclidean distance between the candidate template and the real-time feature vector. The weight of the template is obtained by normalizing the Euclidean distance. The parameter fusion decision unit is used to fuse the continuous parameters and discrete parameters of the template respectively.

[0017] Compared with the prior art, the beneficial effects of the present invention are: 1. By constructing a big data feature mapping relationship library based on real user data, an interpretable mapping relationship between image visual features and optimal compression parameters was established. When faced with images that are rich in color, complex in texture, or have concentrated significant regions, the system can automatically select a compression strategy that preserves key information, avoiding detail loss, color cast, or block artifacts caused by a fixed quantization table. 2. It supports the combined optimization of various parameters such as quantization table scaling factor, chroma subsampling ratio, DCT coefficient threshold, Huffman coding strategy, and sharpening filter intensity, and generates continuously adjustable compression configurations through a weighted fusion mechanism. This allows the system to adapt to different terminal display capabilities, such as small mobile phone screens and large TV screens, and to dynamically adjust the compression intensity according to network bandwidth, achieving intelligent distribution of "one image, multiple compressions"; 3. By clustering to cover diverse image semantic categories, this method effectively overcomes the problem of insufficient generalization caused by training data bias in offline single models. By fusing compression configurations of multiple nearest neighbor templates, it has the ability to smoothly transition edge cases, such as textured or mixed scenes, avoiding visual distortion caused by abrupt changes in compression strategies. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating the adaptive image compression method based on big data feature analysis of the present invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] Example: Figure 1As shown, the present invention provides a technical solution: an adaptive image compression method based on big data feature analysis; Step 1 involves constructing a big data feature template library. The specific implementation process includes the following sub-operations: First, real image samples are collected from a distributed image storage system. All images undergo metadata cleaning and format standardization, are uniformly converted to RGB color space and uniform color depth, and are cropped or padded to a fixed resolution with uniform pixel size. Then, a visual feature vector extraction operation is performed on each image. This visual feature vector is a 5-dimensional real-valued vector, with each dimension corresponding to color distribution entropy, edge density, texture complexity, spatial frequency energy distribution, and the proportion of salient regions, respectively.

[0021] Color distribution entropy: Calculate the grayscale histograms for the R, G, and B color channels respectively, then calculate the entropy value of each channel according to the information entropy formula, and finally take the average of the three channel entropies as the color distribution entropy of the image.

[0022] Edge density: First, convert the image to grayscale and apply the Canny edge detection operator to obtain a binary edge map; then count the total number of non-zero pixels Ne in the binary map and divide it by the total area A of the image to obtain the number of edge pixels per unit area, i.e., edge density De = Ne / A.

[0023] Texture complexity: The Local Binary Pattern (LBP) operator is used to traverse the image with a circular neighborhood configuration of radius 3 and number of neighborhood points 8 to generate an LBP encoded map; the variance of the gray values ​​of the encoded map is calculated as a texture complexity index. The larger the variance, the more drastic the local texture changes.

[0024] Significant region proportion: The saliency map is calculated based on the frequency domain residual model. Specifically, the image is subjected to a fast Fourier transform, low-frequency components are preserved and the background image is reconstructed, and the difference between the original image and the background image is used to obtain the residual map; after Gaussian smoothing of the residual map, it is binarized by the Otsu thresholding method, the number of pixels in the foreground region Ns is counted, and the proportion Rs = Ns / A is calculated.

[0025] Spatial frequency energy distribution: Perform a two-dimensional discrete cosine transform on the image to divide the frequency domain into four concentric ring frequency bands (low frequency, mid-low frequency, mid-high frequency, and high frequency). Calculate the proportion of the sum of squares of the coefficients in each frequency band to the total energy. Take the sum of the energy proportions of low frequency and mid-low frequency as the component value, denoted as Ef.

[0026] The above five feature values ​​are normalized, for example, linearly scaled to the [0,1] interval, and then concatenated into a five-dimensional real vector v=[h,de,tc,rs,ef], which serves as the multi-dimensional visual feature vector of the image. Here, h,de,tc,rs andef represent the normalized values ​​of color distribution entropy, edge density, texture complexity, spatial frequency energy distribution and salient region proportion, respectively.

[0027] Next, a set of compression methods is constructed, derived from a database of image compression records accumulated during historical operations. Each record includes the original image ID, the identifier of the compression method used, the compression parameter configuration, and user feedback ratings. Compression methods include, but are not limited to: quantization scaling factor adjustment, chroma sampling mode (e.g., 4:4:4, 4:2:2, 4:2:0), deblocking filter intensity, WebP lossy / lossless mode switching, and JPEG progressive scan enabling. All independently used parameter adjustment strategies and their combinations, such as simultaneously using a 4:2:0 color sampling mode and a filter intensity of 3 in a single image compression process, are considered as a single compression method and aggregated to form the compression method set.

[0028] For each image category, images are randomly selected from its corresponding samples and compressed using each method in the compression method set to generate the corresponding compressed image. For each compression result, four evaluation metrics are collected: structural similarity index, peak signal-to-noise ratio, perceptual hash distance, and average subjective score. Structural Similarity Index (SSIM): The standard SSIM algorithm is used to calculate the similarity between the compressed image and the original image. The value ranges from [0,1]. The larger the value, the higher the structural fidelity. Peak Signal-to-Noise Ratio (PSNR): Measured in dB, the formula is as follows: , where MSE is the mean squared error; Perceptual Hash Distance (PHD): Calculate dHash (differential hash) for the original graph and the compressed graph respectively, obtain a 64-bit binary string, calculate the Hamming distance and divide by 64; Average evaluation score: Collect subjective ratings from real users for the compressed image (e.g., set to 1-10 points), remove outliers, and take the average. After normalizing the above evaluation indicators, they are used to calculate the function value of the joint optimization objective function.

[0029] Step 2: Use a lightweight feature extractor to generate a real-time feature vector for the image to be compressed.

[0030] Specifically, step 2 executes the following process: The image to be compressed is first received into the input buffer of the edge computing node. This image can be of any resolution and format, such as JPEG, PNG, or HEIC. It is automatically decoded into an RGB pixel matrix and scaled to the predetermined input size of a lightweight feature extractor. Subsequently, the image is fed into the image feature extractor.

[0031] The feature extraction method is a deep separable convolutional neural network, whose architecture contains 5 convolutional layers: the first layer is a regular convolution, and the second to fifth layers are all deep separable convolutional modules. The network ends with a global average pooling layer, and the output is a feature vector with a dimension of 5, which is strictly consistent with the dimension of the template feature vector constructed in step 1. The 5-dimensional vector output by the network is the real-time feature vector vr, which is directly used for subsequent template matching.

[0032] Step 3 involves performing an approximate nearest neighbor search in the big data feature template library based on real-time feature vectors to obtain the template with the highest matching degree.

[0033] Specifically, step 3 employs the Locality-Sensitive Hashing (LSH) algorithm for efficient retrieval. The LSH hash function family is constructed based on random hyperplane projection: g 5-dimensional standard normal distribution random vectors r1, r2, r3…r are pre-generated. g The hash function is constructed as h(v) = {sign(r1)}. T ·v),sign(r2 T ·v),sign(r3 T ·v),……,sign(r g T ·v)}, output the binary hash code. Construct 8 independent hash tables, each using a different set of random vectors. During the indexing phase, each template center feature vector is hashed into the corresponding bucket in the 8 tables.

[0034] During retrieval, the real-time feature vector (vr) is also hashed into 8 tables. , Merge all candidate templates in the hit bucket , A candidate set is formed. Then, the Euclidean distance between the real-time feature vector vr and the feature vector of each template in the candidate set is calculated, sorted in ascending order of distance, and the top 5 nearest neighbor templates and their distance values ​​{d1,d2,d3,d4,d5} are returned.

[0035] In the above method, step 4 combines the matching weight of the template with the highest matching degree with its corresponding optimal compression method to generate the final adaptive compression configuration.

[0036] Specifically, step 4 first calculates the matching weight of each matching template. The weight calculation formula is: ; Where d i Let be the Euclidean distance of the i-th template; This formula ensures that the smaller the distance, the greater the weight, and that the weight decays exponentially.

[0037] The optimal compression method for each matching template contains several quantifiable configuration items, including: Quantization scaling factor: Collects integers, ranging from [0.5, 2]; Chromaticity sampling mode: encoded as 0 (4:4:4), 1 (4:2:2), 2 (4:2:0); Deblocking filter strength: Integer, range [0,6]; DCT coefficient threshold t∈[0,15]; Huffman coding strategy ∈ {enabled, disabled}; Sharpening filter intensity s∈[0,1]; For numerical parameters, such as QF and filter strength, a weighted average is used; For discrete parameters (such as chroma sampling modes), a weighted voting mechanism is used: the weighted score of each mode is calculated and the mode with the highest score is selected as the final configuration.

[0038] The final output adaptive compression configuration is a structured parameter package containing fields such as QF, chroma sampling mode, and filter intensity, which can be used by standard image encoders.

[0039] In step 5, the standard image encoder is implemented using the open-source JPEG encoding library. After receiving the adaptive compression configuration, the encoder dynamically adjusts the internal quantization table, specifically by linearly scaling the standard quantization table using a scaling factor. The chroma subsampling mode is set to the selected discrete configuration. DCT coefficient thresholds are applied to truncate DCT coefficients with absolute values ​​less than the threshold. The adaptive Huffman table is then enabled based on the Huffman coding strategy. After compression, a sharpening filter is applied to the reconstructed image.

[0040] After the above architecture is built, the workflow for matching and compressing images to be compressed is as follows: When an image to be compressed is a 1920×1080 resolution photo, it is first processed by a lightweight feature extraction module. The image is then scaled down to 224×224 pixels and input into a depthwise separable convolutional network. After five layers of convolutional operations, the network outputs a 5-dimensional real vector vr=[0.85,0.62,0.71,0.45,0.38], which corresponds to color distribution entropy, edge density, texture complexity, salient region proportion, and spatial frequency energy distribution, such as the proportion of high-frequency subbands.

[0041] Next, the approximate nearest neighbor search module receives the real-time feature vector vr. The module first uses eight pre-defined random vectors r1 to r8 to calculate h(v) = {sign(r1...} T ·vr),sign(r2 T ·vr),sign(r3 T ·vr),……,sign(r8 T The hash function `vr` is used to retrieve the corresponding bucket from eight independent hash tables. Assume that 12 candidate templates are matched across these eight tables. The module then calculates the Euclidean distance between these 12 candidate templates and `vr`, and selects the M=5 templates with the smallest distance as the final candidate set.

[0042] Suppose that the central feature vectors of these 5 templates are c1 to c5, and the corresponding Euclidean distances d1 to d5 are 0.12, 0.15, 0.18, 0.21, and 0.25, respectively.

[0043] Subsequently, the adaptive compression configuration fusion module intervenes. First, it calculates the matching weight of each candidate template according to the formula; Where ε=0.001 is the protection coefficient to prevent division by zero.

[0044] Denominator = 1 / (0.12+0.001)+1 / (0.15+0.001)+1 / (0.18+0.001)+1 / (0.21+0.001)+1 / (0.25+0.001)≈8.26+6.62+5.52+4.74+3.98=29.12; w1=8.26 / 29.12≈0.284, w2=6.62 / 29.12≈0.227, w3=5.52 / 29.12≈0.19; w4=4.74 / 29.12≈0.163, w5=3.98 / 29.12≈0.136; The five templates that were hit were: T1: Quantization scaling q1: 0.7, Sharpening intensity s1: 0.3, Chroma sampling mode: 4:2:2, Huffman strategy: Enabled; T2: Quantization scaling q2: 0.8, Sharpening intensity s2: 0.4, Chroma sampling mode: 4:2:2, Huffman strategy: Enabled; T3: Quantization scaling q3: 0.9, Sharpening intensity s3: 0.2, Chroma sampling mode: 4:2:0, Huffman strategy: Disabled; T4: Quantization scaling q4:1, Sharpening intensity s4:0.1, Chroma sampling mode: 4:2:0, Huffman strategy: disabled; T5: Quantization scaling q5: 1.1, Sharpening intensity s5: 0, Chroma sampling mode: 4:4:4, Huffman strategy: Enabled.

[0045] For continuous parameters, a weighted average is used: q final =0.284×0.7+0.227×0.8+0.19×0.9+0.163×1+0.136×1.1≈0.85; s final =0.284×0.3+0.227×0.4+0.19×0.2+0.163×0.1+0.136×0≈0.24; For discrete parameters: Chromaticity subsampling: T1 and T2, 4:2:2, weighted sum of 0.511; T3 and T4, 4:2:0, weighted sum of 0.353; T5, 4:4:4, weighted sum of 0.136. The maximum weight configuration is 4:2:2.

[0046] Huffman policy "enabled": T1, T2, T5, weight sum is 0.647; T3, T4, Huffman policy "disabled", weight sum = 0.353; maximum weight configuration is "enabled".

[0047] Finally, the standard image encoding module receives this configuration. It first loads the JPEG standard luminance and chrominance quantization table, then multiplies each quantization table element by 0.85 to obtain a new quantization table; sets the horizontal and vertical sampling factors of the chrominance components to 2:1, corresponding to a chrominance sampling mode of 4:2:2; after the DCT transform, sets all coefficients with absolute values ​​less than the coefficient threshold to zero; enables adaptive Huffman coding; after compression, applies an unsharpened mask filter with an intensity of 0.24 to the reconstructed image, and finally outputs the compressed image.

[0048] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

Claims

1. An adaptive image compression method based on big data feature analysis, characterized in that: The methods include: Image compression templates are collected to build an image compression template library. Samples of images before and after compression are collected, and visual feature vectors of each image are extracted. After standardizing all visual feature vectors, a clustering algorithm is used to generate several image categories. For each image category, the image compression templates in the image compression template library are traversed, compression is performed and evaluation records are collected. The compression template with the largest evaluation value is selected as the optimal compression template for that category. The central feature vector of each category is bound to the corresponding optimal compressed template to form a feature-compressed template mapping relationship. All mapping relationships are collected to build a big data feature mapping relationship library. The image to be compressed is acquired, and its image features are extracted to form a real-time feature vector. Based on the real-time feature vector, an approximate nearest neighbor search is performed in the big data feature mapping relation library to obtain the template with the highest matching degree. According to the matching weight of the template with the highest matching degree, the corresponding optimal compression template is fused to generate the final adaptive compression configuration. The adaptive compression configuration is input into the standard image encoder to complete the image compression.

2. The image adaptive compression method based on big data feature analysis according to claim 1, characterized in that: Methods for extracting visual feature vectors from images include: Visual features of images are collected, including color distribution entropy, edge density, texture complexity, and spatial frequency energy distribution. The parameters of each visual feature are normalized and then concatenated to obtain the visual feature vector of each image.

3. The image adaptive compression method based on big data feature analysis according to claim 1, characterized in that: Methods for generating several image categories using clustering algorithms include: The clustering algorithm adopts an improved K-means clustering. The number of clusters is automatically determined within a preset range based on the principle of maximizing the silhouette coefficient. The clustering convergence condition is that the change in the sum of squares within a cluster is less than a preset threshold in several consecutive iterations. The central feature vector of each category is calculated from the arithmetic mean of the feature vectors of all samples in the image category.

4. The image adaptive compression method based on big data feature analysis according to claim 1, characterized in that: Methods for selecting the optimal compression template include: Normalized values ​​of image feature parameters are collected. The evaluation record includes: structural similarity index, peak signal-to-noise ratio, perceptual hash distance, and average subjective score. An evaluation value calculation function F is established, F = α·SSIM + β·PSNR + γ·(1 -PHD) + δ·Q, where α, β, γ, and δ are the weight coefficients of the corresponding indicators, and SSIM, PSNR, PHD, and Q represent the normalized values ​​of structural similarity index, peak signal-to-noise ratio, perceptual hash distance, and average subjective score, respectively. Based on the evaluation value calculation function, the compression template that maximizes the F value is selected as the optimal compression template for each image category.

5. The image adaptive compression method based on big data feature analysis according to claim 1, characterized in that: Methods for performing approximate nearest neighbor search include: The approximate nearest neighbor search employs a locality-sensitive hash index structure. It generates g standard normally distributed random vectors to form a single hash function, outputs a g-bit binary string as the hash bucket key, and constructs L independent hash tables. Each template feature vector in the template library is hashed into the corresponding bucket in each table. During the query, the same hash operation is performed on the real-time feature vector of the image to be compressed. All candidate templates in the hit buckets are merged to form a candidate set, and the M templates with the smallest Euclidean distance in the candidate set are selected as candidate templates.

6. The image adaptive compression method based on big data feature analysis according to claim 1, characterized in that: Methods for generating the final adaptive compression configuration include: The matching weight is calculated based on the reciprocal of the Euclidean distance, and the normalized weight of the candidate template is used as the matching weight. During fusion, a weighted average is used for continuous parameters, and the configuration corresponding to the one with the largest weight is selected for discrete parameters. If there are at least two templates and the configurations conflict, the configuration with the highest weight ranking or the highest frequency of occurrence is retained first.

7. The image adaptive compression method based on big data feature analysis according to claim 1, characterized in that: The image parameters adjusted in the adaptive compression configuration include: The image to be compressed is dynamically adjusted after the adaptive compression configuration is completed by any one or at least two of the following: quantization table scaling factor, chroma subsampling ratio, DCT coefficient threshold, Huffman coding optimization strategy, and sharpening filter intensity, and finally the dynamically adjusted compressed output is completed.

8. An image adaptive compression system based on big data feature analysis, used to execute the image adaptive compression method based on big data feature analysis as described in claim 1, characterized in that: The system includes: The module includes a feature mapping relationship library management module, an image feature extraction module, a nearest neighbor search module, an adaptive compression configuration fusion module, and an image encoding module. The feature mapping relationship library management module is used to build and maintain a big data feature mapping relationship library; The image feature extraction module is used to extract visual features from the image to be compressed to generate a real-time feature vector; the nearest neighbor search module is used to perform an approximate nearest neighbor search in the big data feature mapping relationship library based on the real-time feature vector to obtain M candidate templates; the adaptive compression configuration fusion module is used to calculate matching weights based on the Euclidean distance between the M candidate templates and the real-time feature vector and fuse them to generate an adaptive compression configuration. The image encoding module is used to receive the adaptive compression configuration and dynamically adjust the encoder's internal parameters to complete image compression.

9. The image adaptive compression system based on big data feature analysis according to claim 8, characterized in that: The system also includes: The nearest neighbor search module adopts a locality-sensitive hash index structure library. The adaptive compression configuration fusion module generates compression configurations based on the rules of continuous parameter weighted average, maximum weight selection of discrete parameters, and high frequency priority in case of conflict. The image encoding module is used to perform dynamic quantization table scaling, chroma subsampling mode switching, DCT coefficient threshold truncation, Huffman table strategy selection, and sharpening filter intensity control on the image to be compressed.