Image optimization compression and decompression method based on digital photo frame

CN122802680APending Publication Date: 2026-09-22深圳市钜弘技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610720945.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-25
Publication Date
2026-09-22

AI Technical Summary

Technical Problem

部分方法亦包括基于预设模板的亮度均衡处理及直方图匹配方式提升图像在数码相框中的视觉一致性,但整体仍依赖固定参数及统一处理流程,缺乏对多种图像来源、多种显示场景间的差异适配能力

Benefits of technology

本发明中,通过在压缩初始阶段提取各色彩通道的频率响应强度峰值并计算频段重叠率实现压缩路径分类,结合解码缓冲索引参数映射最小解码单元范围并执行区域压缩比估算与分区重构,配合历史播放日志中提取的调用密度与时间差构建播放热度因子并重排压缩数据块加载顺序,可提升压缩过程的自适应性与区域差异化处理能力,缓解固定压缩比例带来的细节损失问题,通过动态缓存控制与高热度数据块预加载可有效降低解码缓冲区瞬时压力,实现滚动解压输出过程中的缓存稳定与图像载入连续性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122802680A_ABST
    Figure CN122802680A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image compression, in particular to an image optimization compression and decompression method based on a digital photo frame, comprising the following steps: obtaining multi-source image data and extracting the peak frequency band and color frequency band overlap rate, marking the channel or judging the edge path according to the overlap rate to generate a compression pre-judgment result, combining the log to calculate the playback heat factor and rearrange the priority table to build a rolling decompression cache queue, loading the data block according to the queue to monitor the buffer capacity and control the decompression, and generating an image output result. The present application extracts the frequency response intensity peak value of each color channel in the initial compression stage and calculates the frequency band overlap rate to realize the compression path classification, builds the playback heat factor by combining the call density and time difference extracted from the historical playback log and rearranges the compression data block loading sequence, effectively reduces the instantaneous pressure of the decoding buffer area through dynamic cache control and high-heat data block preloading, realizes the cache stability and image loading continuity in the rolling decompression output process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image compression technology, and in particular to an image optimization compression and decompression method based on a digital photo frame. Background Technology

[0002] Image compression technology involves encoding and reconstructing image data to reduce the amount of data stored and transmitted while minimizing image information loss. This field includes, but is not limited to, lossy and lossless compression methods, predictive coding, transform coding, wavelet transform, discrete cosine transform, content-based adaptive compression, image region analysis and classification compression, and perceptual model-based compression methods. Image compression technology is widely used in multimedia terminals, remote communication, image sensors, medical image processing, and digital display devices. Its technological development trends towards improving compression efficiency, preserving image quality, and adapting to various hardware environments. In specific application scenarios, such as digital photo frames, the storage and decoding capabilities of terminal devices are constrained, thus driving the development of image compression technology in these scenarios, resulting in a class of dedicated compression methods with specific applications.

[0003] Traditional image optimization compression and decompression methods refer to compression and decompression techniques that adapt and optimize physical parameters such as image resolution, storage capacity, and decoding capabilities for display terminals like digital photo frames during image transmission or storage. These methods typically rely on the static characteristics of images and involve the following steps: acquiring the original image and then scaling it using a fixed resolution conversion to match the display resolution requirements of the digital photo frame; subsequently, performing static quantization and discrete cosine transform to extract frequency domain features, followed by encoding compression using a fixed compression ratio; after the compressed data is stored in the digital photo frame's built-in memory, decoding and restoration are performed during image playback using corresponding inverse transform and inverse quantization steps. Some methods also include brightness equalization processing based on preset templates and histogram matching to improve the visual consistency of the image within the digital photo frame, but overall, they still rely on fixed parameters and a unified processing flow, lacking the ability to adapt to differences between various image sources and display scenarios. Summary of the Invention

[0004] The purpose of this invention is to address the shortcomings of existing technologies by proposing an image optimization compression and decompression method based on digital photo frames.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: an image optimization compression and decompression method based on a digital photo frame, comprising the following steps: S1: Obtain multi-source image data of the digital photo frame to be processed, transform the multi-source image data to extract peak frequency band and color frequency band overlap rate. If the color frequency band overlap rate exceeds the preset ratio threshold, mark the standard channel; otherwise, determine the edge or detail path and generate compressed path prediction results. S2: Obtain historical image decoding buffer reference parameters, combine the compression path prediction result to map the width and height range, partition the multi-source image data according to the width and height range, if the compression ratio value is greater than the preset compression ratio threshold, adjust the partitioning points, and generate partitioned compressed data blocks and pixel row and column position indices. S3: Retrieve multi-source image data logs, extract playback timestamps and call counts, calculate density and time weights based on playback timestamps and call counts, normalize density and time weights, and generate playback popularity factors; S4: Reorder the priority table including the partitioned compressed data blocks and pixel row and column position indexes using the playback popularity factor, place the high popularity blocks at the front end, and generate a rolling decompression cache queue; S5: Start the streaming decoding process, load the partitioned compressed data blocks according to the rolling decompression buffer queue, monitor the buffer capacity, pause when the buffer capacity reaches the preset capacity threshold until the space is released, and generate the image data rolling decompression output result.

[0006] The present invention improves upon the following: the compression path prediction result includes a target compression channel type identifier, a frequency domain overlap rate quantization value, and a frequency band offset direction feature parameter; the pixel row and column position index includes a partition start coordinate vector, dynamic grid boundary parameters, and a region redistribution mapping table; the playback popularity factor includes a frame-level call density statistical value, a time difference weighted normalization coefficient, and a comprehensive popularity priority score; the rolling decompression cache queue includes a data block priority loading sequence, a cache address mapping pointer, and a queue dynamic update trigger bit; and the image data rolling decompression output result includes a reconstructed image pixel data stream, a buffer occupancy status feedback signal, and a decoding synchronization clock flag.

[0007] The present invention is improved in that the step of obtaining the compression path prediction result is specifically as follows: S111: Obtain the multi-source image data of the digital photo frame to be processed, extract the pixel value matrix of each independent color channel of red, green and blue in the multi-source image data, perform fast Fourier transform on the value matrix, map it to the frequency domain space, monitor the amplitude spectrum response intensity distribution in the frequency domain space, locate the continuous frequency range where the maximum response intensity is located, and generate the peak interval of the color channel frequency band. S112: Call the peak range of the color channel frequency band, calculate the length of the overlapping part of the frequency coverage range between the differentiated color channels through the interval intersection algorithm, obtain the total span value of each channel frequency band, perform a division operation between the overlapping part length and the total span value, quantify the spatial co-occurrence degree of the frequency domain feature distribution between multiple channels, and obtain the color dominant frequency band overlap rate; S113: Compare the overlap rate of the color-dominant frequency band with a preset ratio threshold. When the value exceeds the ratio threshold, establish a mapping mark pointing to the standard compression channel. When the value is lower than the ratio threshold, retrieve the offset direction of the frequency band peak relative to the center frequency. Match the offset state to the edge structure priority path or the detail preservation priority path according to the offset state to the high frequency band or the low frequency band, and generate a compression path prediction result.

[0008] The present invention improves upon this invention by setting the proportional threshold by selecting a set of reference images whose color entropy values ​​cover multiple preset intervals, calculating the overlap rate of the dominant color frequency bands for each image in the set, performing precoding tests on images with multiple overlap rate intervals, statistically analyzing the trend of peak signal-to-noise ratio changes in reconstructed images under unified quantization parameters, constructing a mapping curve between the overlap rate value and the image quality attenuation gradient, identifying the critical inflection point where the first derivative of the quality loss rate exceeds the preset threshold under standard compression mode, and defining the frequency band overlap rate value corresponding to the critical inflection point as the proportional threshold.

[0009] The present invention is improved in that the step of obtaining the pixel row and column position index is specifically as follows: S211: Obtain historical image decoding buffer reference parameters, calculate the maximum pixel capacity allowed for a single decoding operation in conjunction with the compression path prediction result, map it to the width and height range of the minimum decoding unit, establish a two-dimensional grid coordinate system on the pixel plane of the multi-source image data according to the width and height range of the minimum decoding unit, perform physical cutting processing on the image according to the coordinate system scale, extract the pixel matrix data in each grid, and generate gridded basic partition units. S212: Perform image texture complexity analysis on the gridded basic partition unit, combine the compression characteristics of the predetermined encoding format, calculate the compression ratio estimate of each partition unit, compare the compression ratio estimate with the preset compression threshold, filter high-frequency detailed dense areas with values ​​exceeding the preset compression threshold, extract the current boundary coordinates of the area and the associated adjacent unit position information, and generate a high-complexity area to be reassigned identifier. S213: Based on the high-complexity region identifier to be reassigned, the region reassignment logic is initiated. By moving the coordinates of the row and column division points, the spatial proportion of the high-complexity region is reduced and the coverage of the adjacent low-complexity region is expanded. The grid topology structure is reconstructed to balance the information entropy density of each region. The image data is cut according to the reconstructed topology boundary, and the dynamically adjusted partitioned compressed data blocks are output. The pixel row and column position index of each data block in the reconstructed topology is recorded simultaneously.

[0010] The present invention is improved in that the step of obtaining the playback popularity factor is specifically as follows: S311: Retrieve the historical playback logs of multi-source image data within a predetermined time window, retrieve the playback timestamp data of each decoding operation and count the total number of calls, extract the discrete time point sequence, and generate an image historical interaction statistics set including order distribution information; S312: Call the image history interaction statistics set, calculate the access frequency within a unit time window, obtain the call density value, generate a time difference weight based on the difference between the most recent playback time and the current clock, encapsulate the two into a time domain frequency feature vector, perform multi-dimensional popularity aggregation operation, and calculate and obtain the playback popularity factor.

[0011] The present invention is improved in that the formula for calculating and obtaining the playback popularity factor is specifically as follows: ; in, Represents the popularity factor of playback. This represents the call density value. Represents time difference weighting. Represents the number of times it is called. The normalized time coordinate value representing the current moment. Representing the The normalized time coordinate value of this record. Represents a non-zero correction factor. It represents the base of the natural logarithm.

[0012] The present invention is improved in that the step of obtaining the rolling decompression cache queue is specifically as follows: S411: Call the partitioned compressed data block and the corresponding pixel row and column position index, initialize the structured mapping container in the system memory, bind the entity content of each data block with its spatial coordinate index in the image plane using key-value pairs, aggregate the storage address information and spatial topology relationship of the full partition, and construct an initial frame-level mapping association table including the correspondence of basic data. S412: Introduce the playback popularity factor and map it as a sorting weight parameter to the data entries of the initial frame-level mapping association table. Perform size comparison and descending sort on the weight values ​​of all entries in the table. Dynamically adjust the linear index position of the data block according to the numerical difference. Replace the high value entries to the beginning segment of the sequence to generate a popularity weighted sorting sequence. S413: Parse the linear topological order determined by the heat-weighted sorting sequence, identify the high-heat data blocks at the front of the sequence and mark them as prefetch objects, pre-allocate continuous storage address space for them in the decoding buffer, construct a data pointer linked list structure that supports on-demand streaming reading, and generate a rolling decompression cache queue.

[0013] The present invention is improved in that the step of obtaining the image data rolling decompression output result is specifically as follows: S511: Invoke the rolling decompression cache queue, start the underlying streaming decoding process, parse the predetermined loading order and address pointer in the queue, extract the binary entity content of the partitioned compressed data blocks from the storage medium in sequence, establish a dedicated data transmission channel pointing to the decoder input port, encapsulate each compressed data block into a discrete decoding task unit with timing marks, maintain the operation state of continuously sending data to the decoding core, and generate a sequential loading instruction stream. S512: Execute the sequential loading instruction stream, continuously fill the decoding buffer, use the memory management unit to monitor the instantaneous occupied capacity of the decoding buffer in real time, compare the instantaneous occupied capacity with the preset safety warning threshold, if the capacity value reaches the safety warning threshold, immediately trigger the flow control interrupt logic, suspend the loading of subsequent data blocks, and continuously poll the memory status until the previous data block is decoded and the available physical storage space is released, and generate a buffer status feedback control signal; S513: In response to the storage state change indicated by the buffer state feedback control signal, dynamically switch the blocking and conducting modes of the data loading channel, restore input when the available space meets the requirements, synchronously receive the restored pixel data output by the decoder, fill the pixel matrix of each local region into the corresponding video memory address according to its spatial index coordinates, complete the seamless stitching of the image plane, and generate the image data rolling decompression output result.

[0014] Compared with the prior art, the advantages and positive effects of the present invention are as follows: In this invention, compression path classification is achieved by extracting the peak frequency response intensity of each color channel and calculating the frequency band overlap rate in the initial stage of compression. The minimum decoding unit range is mapped by combining the decoding buffer index parameter and performing regional compression ratio estimation and partition reconstruction. The playback popularity factor is constructed by combining the call density and time difference extracted from the historical playback log and rearranging the loading order of compressed data blocks. This can improve the adaptability and regional differentiation processing capability of the compression process, alleviate the detail loss problem caused by the fixed compression ratio, and effectively reduce the instantaneous pressure of the decoding buffer through dynamic cache control and preloading of high-popularity data blocks, so as to achieve cache stability and image loading continuity in the rolling decompression output process. Attached Figure Description

[0015] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a flowchart illustrating the process of obtaining the compression path prediction result according to the present invention; Figure 3 This is a flowchart illustrating how the pixel row and column position indices are obtained according to the present invention. Figure 4 This is a flowchart illustrating how the playback popularity factor is obtained in this invention. Figure 5 This is a flowchart illustrating the process of obtaining the rolling decompression cache queue in this invention; Figure 6 This is a flowchart illustrating the process of obtaining the image data rolling decompression output result according to the present invention. Detailed Implementation

[0016] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0017] In the description of this invention, it should be understood that the terms "length," "width," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, in the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0018] Please see Figure 1 This invention provides a technical solution: an image optimization compression and decompression method based on a digital photo frame, comprising the following steps: S1: Acquire multi-source image data of the digital photo frame to be processed, perform fast Fourier transform on each color channel of the multi-source image data, extract the frequency band interval where the frequency response intensity peak is located, calculate the color dominant frequency band overlap rate between each channel, compare the color dominant frequency band overlap rate with the preset ratio threshold, mark it as a standard compressed channel when it is greater than the ratio threshold, and determine it as an edge structure priority path or detail preservation priority path according to the frequency band offset direction, and generate compression path prediction results; S2: Obtain historical image decoding buffer reference parameters, map the minimum decoding unit width and height range based on the decoding buffer reference index parameters and compression path prediction results, perform gridding partitioning operation on multi-source image data according to the minimum decoding unit width and height range, calculate the compression ratio prediction value of each partition region, and perform region redistribution operation if the compression ratio prediction value exceeds the preset compression threshold. Generate partitioned compressed data blocks by adjusting the position of row and column division points, and record the pixel row and column position index corresponding to each data block. S3: Retrieve the historical playback logs of multi-source image data within a predetermined time window, extract playback timestamp data and call counts, calculate call density values ​​and time difference weights based on playback timestamp data and call counts, perform weighted normalization operations on call density values ​​and time difference weights, and generate playback popularity factors that characterize the frequency of image reuse. S4: Construct a frame-level mapping priority table, use the playback popularity factor as the sorting basis to rearrange the priority of the frame-level mapping priority table containing partitioned compressed data blocks and pixel row and column position indices, and place high-popularity data blocks at the front of the preloading sequence according to the rearranged order to generate a rolling decompression cache queue. S5: Start the streaming decoding process, load the partitioned compressed data blocks into the decoder in the order determined by the rolling decompression buffer queue, monitor the instantaneous occupied capacity of the decoding buffer in real time, and suspend the loading instructions of subsequent data blocks when the instantaneous occupied capacity reaches the safety warning line, until the previous data block is decoded and the storage space is released, and generate the image data rolling decompression output result.

[0019] The compression path prediction results include the target compression channel type identifier, frequency domain overlap rate quantization value, and frequency band offset direction feature parameters. The pixel row and column position index includes the partition start coordinate vector, dynamic grid boundary parameters, and region redistribution mapping table. The playback popularity factor includes frame-level call density statistics, time difference weighted normalization coefficient, and comprehensive popularity priority score. The rolling decompression cache queue includes the data block priority loading sequence, cache address mapping pointer, and queue dynamic update trigger bit. The image data rolling decompression output results include the reconstructed image pixel data stream, buffer occupancy status feedback signal, and decoding synchronization clock flag.

[0020] Please see Figure 2The specific steps for obtaining the compression path prediction result are as follows: S111: Obtain the multi-source image data of the digital photo frame to be processed, extract the pixel value matrix of each independent color channel of red, green and blue in the multi-source image data, perform fast Fourier transform on the value matrix, map it to the frequency domain space, monitor the amplitude spectrum response intensity distribution in the frequency domain space, locate the continuous frequency range where the maximum response intensity is located, and generate the peak interval of the color channel frequency band. The high-speed image processing unit interface of the digital photo frame is invoked, and the resolution is read in direct memory access mode. The original three-channel RGB image data was decomposed into matrix separation data with each channel having a dimension of 1. Red channel matrix Green Channel Matrix and blue channel matrix For each independent channel matrix, a radix-2 Fast Fourier Transform (FFT) operator is sequentially applied to convert the pixel grayscale distribution in the spatial domain into a complex matrix in the frequency domain. The magnitude of each frequency point in the complex matrix is ​​calculated to construct the amplitude spectrum. A sliding scanning window is set on the amplitude spectrum plane to traverse and identify high-energy regions where the amplitude response intensity exceeds 75% of the global maximum response value. After scanning, the normalized spatial frequency range of [value missing] is located in the red channel. A continuous high-response range (unit: period / image width) is located in the green channel. The high response frequency start and end points of each channel are recorded in the interval, generating the peak frequency range of the color channel band.

[0021] S112: Call the peak range of the color channel frequency band, calculate the length of the overlapping part of the frequency coverage between the differentiated color channels through the interval intersection algorithm, obtain the total span value of each channel frequency band, perform a division operation between the overlapping part length and the total span value, quantify the spatial co-occurrence degree of the frequency domain feature distribution between multiple channels, and obtain the color dominant frequency band overlap rate; Extracting the peak range of the red channel frequency band Peak range of green channel frequency band As the object of computation, the interval intersection operation is used to identify the overlapping part of two frequency bands on the number axis, that is... The overlapping frequency bands were calculated. The absolute length is At the same time, the total span of the red channel is calculated as follows: The total span of the green channel is calculated as follows: Divide the length of the overlapping portion, 25, by the total span of the red channel, 50, to obtain the overlap ratio. Divide by the total span of the green channel (80) to obtain the overlap ratio. Perform an arithmetic mean on these two ratios, that is... After rounding to two decimal places, we get This value quantifies the coupling tightness of different color components in the frequency domain structure, yielding the overlap rate of the dominant color frequency bands.

[0022] S113: Compare the overlap rate of the color-dominant frequency band with a preset ratio threshold. When the value exceeds the ratio threshold, establish a mapping mark pointing to the standard compression channel. When the value is lower than the ratio threshold, retrieve the offset direction of the frequency band peak relative to the center frequency. Based on the offset state to the high frequency band or the low frequency band, match it to the edge structure priority path or the detail preservation priority path respectively, and generate compression path prediction results. The specific method for setting the proportional threshold is as follows: select a set of reference images with color entropy values ​​covering multiple preset intervals, calculate the overlap rate of the dominant color frequency band for each image in the sample set, perform precoding tests on images with multiple overlap rate intervals, statistically analyze the trend of peak signal-to-noise ratio change of reconstructed images under unified quantization parameters, construct a mapping relationship curve between overlap rate value and image quality attenuation gradient, identify the critical inflection point where the first derivative of the quality loss rate under standard compression mode exceeds the preset threshold, and define the frequency band overlap rate value corresponding to the critical inflection point as the proportional threshold. A sample set of 100 benchmark images, including landscapes, portraits, and text, was selected. The overlap rate of the dominant color frequency bands for each image was calculated, and the results were distributed as follows: to Between. Perform uniform quantization parameters on this sample set. Precoding tests were performed, and a correlation curve between overlap rate and peak signal-to-noise ratio (PSNR) of the reconstructed image was plotted. It was observed that when the overlap rate exceeded [a certain value]... At that time, the rate of decrease in PSNR changed abruptly (due to...). dB / unit surged to dB / unit), therefore Set as a proportional threshold. Obtain the color dominant frequency band overlap rate value of the current image to be processed calculated in S112. ,Will and Perform numerical comparison to determine Below the proportional threshold. Then, the peak frequency of the retrieved band is compared to the center frequency (set to half the Nyquist frequency, i.e., the normalized frequency). The offset of the current peak value (such as the center frequency of the red channel) is detected. A significant shift towards lower frequencies indicates that the image is dominated by smooth regions. Based on this, the detail-preserving priority path is activated, and the quantization matrix is ​​configured to preserve low-frequency textures, generating compressed path prediction results.

[0023] Please see Figure 3The specific steps for obtaining the pixel row and column position index are as follows: S211: Obtain historical image decoding buffer reference parameters, calculate the maximum pixel capacity allowed for a single decoding operation in conjunction with the compression path prediction results, map it to the width and height range of the minimum decoding unit, establish a two-dimensional grid coordinate system on the pixel plane of the multi-source image data based on the width and height range of the minimum decoding unit, perform physical cutting processing on the image according to the coordinate system scale, extract the pixel matrix data in each grid, and generate gridded basic partition units. The maximum buffer throughput allowed for a single decoding operation is obtained as follows: MB, combined with the estimated memory usage of the detail-preserving priority path (4 bytes of storage space per pixel, including the alpha channel), the optimal number of pixels for a single decoding operation is calculated to be... Pixels. Based on this, the width of the minimum decoding unit is planned to be... pixels, height Pixel (i.e.) (pixels). In A two-dimensional grid is constructed on the image pixel plane, and the grid coordinate range of the first row and first column is defined as follows: to (As an example partition). The original image data is physically cut along the grid coordinates using the cropping command of the image processing engine, and the RGB pixel matrix within the rectangular block is extracted to generate the gridded basic partition unit.

[0024] S212: Perform image texture complexity analysis on the gridded basic partition unit, and combine the compression characteristics of the given encoding format with the following formula: ; Calculate the estimated compression ratio for each partition unit, compare the estimated compression ratio with a preset compression threshold, filter out high-frequency, densely detailed regions whose values ​​exceed the preset compression threshold, extract the current boundary coordinates of the region and the location information of the associated adjacent units, and generate a high-complexity region identifier to be reassigned. in, For the estimated compression ratio, This is the normalized value of the regional information entropy. It involves statistically analyzing the grayscale value distribution probability of all pixels within the current partition, calculating the base entropy value using the Shannon entropy algorithm, and then dividing this base entropy value by the maximum theoretical entropy value determined by the image bit depth to obtain the dimensionless normalized value. This parameter reflects the degree of randomness in the pixel distribution within the region. The average texture gradient normalization coefficient is obtained by performing a convolution operation on the pixel matrix within the current partition using an edge detection operator (such as the Sobel operator), extracting the gradient magnitude of each pixel, and calculating the average value for the region. This average value is then divided by the maximum allowable gradient magnitude in the pixel value range to obtain the dimensionless normalization coefficient. This parameter is used to quantify the high-frequency detail complexity of the image. The quantization parameter normalization factor is obtained by extracting the quantization step size setting from the current pre-encoding configuration parameter set, dividing it by a preset standard benchmark quantization reference value, and thus obtaining a dimensionless ratio factor. This parameter reflects the degree to which data precision is discarded during the encoding and quantization process. This is a dimensionless correction constant obtained from a pre-defined format efficiency lookup table, based on the currently selected image compression standard type (e.g., JPEG, HEIF). This parameter is used to balance the differences in the basic compression efficiency of different encoding algorithms. and is the weighting adjustment coefficient, a preset dimensionless weighting constant. Used to adjust the overall numerical magnitude of the formula to match the threshold range. The preset compression threshold is used to adjust the weight ratio of texture features relative to information entropy features in complexity evaluation. The preset compression threshold is set by reading the hardware specifications of the decoding terminal device to obtain the total capacity of the decoding frame buffer, and setting a safety redundancy coefficient (a dimensionless value between 0 and 1) to prevent buffer overflow. The total capacity of the decoding frame buffer is multiplied by the safety redundancy coefficient to obtain the effective safety buffer amount. Next, the pixel width, pixel height, and color bit depth of the currently processed grid partition unit are obtained, and these three parameters are multiplied to calculate the theoretical total amount of original data for that partition in its uncompressed state. Finally, the effective safety buffer amount is divided by the theoretical total amount of original data to calculate the preset compression threshold representing the maximum allowable unit data density for the current partition. For resolution of The grid partitioning units are analyzed, the pixel grayscale distribution is statistically analyzed, and the normalized information entropy is calculated using the Shannon formula. for The gradient magnitude of each pixel is extracted using the Sobel operator, and the average gradient is calculated and normalized to obtain the result. for Read the quantization step size configured for the current encoder and divide it by the reference quantization value to calculate the normalization factor. for JPEG format correction factor for Set weighting coefficients. for Adjust the magnitude of the values ​​and set the weighting coefficients. for To enhance the texture effect. Substitute the above parameters into the formula. Perform the calculation: ; The result This is a compression ratio estimate (actually a complexity score; a higher value indicates greater compression difficulty). Simultaneously, the total capacity of the decoding frame buffer on the decoding terminal device is read. MB, set the security redundancy factor to Calculate the effective safe cache size as follows: MB. Get the pixel width of the currently processed grid partition cell. Pixel height and color depth Bytes (24 bits), calculate the theoretical total amount of original data in the uncompressed state of this partition. byte MB. Effective safe cache size. MB divided by the theoretical total amount of original data MB, the preset compression threshold is calculated to be The calculated numerical values With preset compression threshold Perform comparison and judgment Greater than The region was identified as a high-frequency, detail-dense area. Its boundary coordinates were extracted to generate a high-complexity region identifier to be reassigned.

[0025] S213: Based on the high-complexity region identifier, the region redistribution logic is initiated. By moving the coordinates of the row and column division points, the spatial proportion of the high-complexity region is reduced and the coverage of the adjacent low-complexity region is expanded. The grid topology structure is reconstructed to balance the information entropy density of each region. The image data is cut according to the reconstructed topology boundary, and the dynamically adjusted partitioned compressed data blocks are output. The pixel row and column position index of each data block in the reconstructed topology is recorded simultaneously. Execute the mesh topology adjustment algorithm to adjust the current high-complexity region (original width). The right boundary of ) is shifted to the left. Each pixel unit, making its width from Pixels reduced to Pixels are used to reduce the data load per processing cycle. Simultaneously, the left boundary of adjacent low-complexity regions is extended to the left in a synchronized manner. The coverage area is expanded by one pixel. The information entropy density of each region is recalculated after adjustment until the entropy density deviation between adjacent regions is less than 1. Based on the updated mesh vertex coordinates to Perform image cropping again, outputting compressed data blocks with normalized dimensions, and synchronously update their indices in the row and column matrices. This generates dynamically adjusted partitioned compressed data blocks.

[0026] Please see Figure 4 The specific steps for obtaining the popularity factor are as follows: S311: Retrieve the historical playback logs of multi-source image data within a predetermined time window, retrieve the playback timestamp data of each decoding operation and count the total number of calls, extract the discrete time point sequence, and generate an image historical interaction statistics set including order distribution information; Access the log database and retrieve all decoding request records for the image within a defined time window (the past 72 hours). Extract three discrete playback timestamps, respectively. (24 hours from now) (2 hours from now) (1 hour from now), the total number of calls is 3. This set of time data and frequency data is stored in a structured manner to generate a historical image interaction statistics set including order distribution information, as shown in Table 1.

[0027] Table 1. Historical Image Interaction Statistics S312: Call the historical interaction statistics set of the image, calculate the access frequency within a unit time window to obtain the call density value, generate a time difference weight based on the difference between the most recent playback time and the current clock, encapsulate the two into a time-domain frequency feature vector, and perform multi-dimensional popularity aggregation calculation using the formula: ; Calculate and obtain the playback popularity factor; in, Represents the popularity factor of playback. The call density value is a dimensionless floating-point number calculated and normalized based on the access frequency. The time difference weight is a dimensionless floating-point data calculated and normalized based on the time interval. The number of calls is an integer extracted directly from the logs. The normalized time coordinate value representing the current moment is a floating-point data that maps the current system clock onto a dimensionless time axis. Representing the The normalized time coordinate value of this record is a floating-point data that maps historical timestamps to a dimensionless time axis. This represents a non-zero correction coefficient, which is a preset dimensionless floating-point constant. Represents the base of the natural logarithm; Based on the data in Table 1, the access frequency within a unit time window (72 hours) is calculated to obtain the call density value. Calculate and normalize the difference between the most recent playback time (1 hour) and the current time (based on 1 hour) to obtain the time difference weight. Set a non-zero correction factor. The base of the natural logarithm Number of calls Normalized coordinates at the current moment Historical time points They are respectively , , Substitute into the formula Perform the calculation: Calculate the basic heat term: ; Calculate the denominator for time decay: ; Calculate the frequency logarithmic term: ; Calculate the complete factor: ; Calculate and obtain playback popularity factor .

[0028] Please see Figure 5 The specific steps for obtaining the rolling decompression cache queue are as follows: S411: Call the partitioned compressed data block and the corresponding pixel row and column position index, initialize the structured mapping container in the system memory, bind the entity content of each data block with its spatial coordinate index in the image plane using key-value pairs, aggregate the storage address information and spatial topology relationship of the full partition, and construct an initial frame-level mapping association table including the correspondence of basic data. Initialize a structured mapping container (such as a HashMap) in memory and call the partition compression data block. Read the physical memory address of each data block (e.g., "0x3F00A1") and its spatial coordinate index in the image plane (e.g., "Row: 1, Col: 1"), and perform key-value binding. Aggregate the storage address information and spatial topology relationship of all partitions to construct an initial frame-level mapping association table including the correspondence of basic data.

[0029] S412: Introduce a playback popularity factor, which is used as a sorting weight parameter and mapped to the data entries in the initial frame-level mapping association table. Perform size comparison and descending sort on the weight values ​​of all entries in the table. Dynamically adjust the linear index position of the data block according to the numerical difference, and replace the high value entries to the beginning segment of the sequence to generate a popularity-weighted sorting sequence. Introducing the calculated playback popularity factor This is used as a sorting weight parameter and mapped item by item to the data entries in the initial frame-level mapping association table. It is assumed that another image to be processed exists simultaneously in the system, with a heat factor of [value missing]. Perform a comparison and descending sort on the weight values ​​of all entries in the table. Since... The linear index position of the image's data blocks is boosted. The loading priority of the data blocks is dynamically adjusted, and high-value entries are replaced with those at the beginning of the sequence, generating a heat-weighted sorted sequence.

[0030] S413: Parse the linear topological order determined by the heat-weighted sorting sequence, identify the high-heat data blocks at the front of the sequence and mark them as prefetch objects, pre-allocate contiguous storage address space for them in the decoding buffer, construct a data pointer linked list structure that supports on-demand streaming reading, and generate a rolling decompression cache queue; The linear topological order determined by the popularity-weighted sorting sequence is analyzed, and the high-popularity data blocks at the beginning of the sequence are identified and marked as prefetch objects. A contiguous storage address space is pre-allocated for these blocks within the decoding buffer (e.g., address range 0xA0000000-0xA0FFFFFF). A linked list structure of data pointers supporting on-demand streaming is constructed, and data block addresses are sequentially filled into the linked list nodes to generate a rolling decompression cache queue.

[0031] Please see Figure 6 The specific steps for obtaining the output results of image data rolling decompression are as follows: S511: Call the rolling decompression buffer queue, start the underlying streaming decoding process, parse the predetermined loading order and address pointer in the queue, extract the binary entity content of the partitioned compressed data blocks from the storage medium in sequence, establish a dedicated data transmission channel pointing to the decoder input port, encapsulate each compressed data block into a discrete decoding task unit with timing mark, maintain the operation state of continuously sending data to the decoding core, and generate a sequential loading instruction stream. The pre-defined loading order and address pointers in the parsing queue are used to sequentially extract the binary entity content of the partitioned compressed data blocks from the Flash storage medium. A dedicated data transmission channel pointing to the decoder input port (InputFIFO) is established, and each compressed data block is encapsulated as a discrete decoding task unit with a time stamp (TimestampID), maintaining communication with the decoding core. The job status continuously transmits data at a rate of Mbps, generating a sequential loading instruction stream.

[0032] S512: Executes sequential loading instruction stream, continuously fills the decoding buffer, uses the memory management unit to monitor the instantaneous occupied capacity of the decoding buffer in real time, compares the instantaneous occupied capacity with the preset safety warning threshold, and if the capacity value reaches the safety warning threshold, immediately triggers the flow control interrupt logic, suspends the loading of subsequent data blocks, and continuously polls the memory status until the previous data block is decoded and the available physical storage space is released, generating a buffer status feedback control signal; The specific process of setting the security warning threshold is as follows: obtain the maximum storage space value allocated to the decoding buffer, traverse the attribute information of all data blocks in the queue to be decoded, filter the largest single data block occupancy, calculate the remaining value obtained by subtracting the largest single data block occupancy from the maximum storage space value, and set the remaining value as the security warning threshold. The instantaneous occupancy of the decode buffer is monitored in real time using the Memory Management Unit (MMU). The maximum storage space allocated to the decode buffer is obtained. MB, iterate through the attribute information of all data blocks in the queue to be decoded, and filter for the largest single data block size. MB. The remaining value is calculated by subtracting the largest single data block size from the maximum storage space value: MB, and will MB is set as a safety warning threshold. When the MMU detects that the current instantaneous occupied capacity reaches... MB (more than) When the memory access time reaches (MB), the flow control interrupt logic is immediately triggered, pausing the loading of subsequent data blocks and continuously polling the memory status until the preceding data block is decoded and at least [amount missing] MB is released. MB of physical storage space generates buffer status feedback control signals.

[0033] S513: Responds to the storage state change indicated by the buffer state feedback control signal, dynamically switches the blocking and conducting modes of the data loading channel, restores input when the available space meets the requirements, synchronously receives the restored pixel data output by the decoder, fills the pixel matrix of each local region into the corresponding video memory address according to its spatial index coordinates, completes the seamless stitching of the image plane, and generates the image data rolling decompression output result. In response to a change in storage state indicated by a buffer status feedback control signal (i.e., available space has been restored), the data loading channel is dynamically switched from blocked mode to open mode to restore input. The system synchronously receives the restored pixel data output from the decoder, based on its spatial index coordinates. The pixel matrix of the local area is filled into the corresponding video memory address. Seamless stitching of image planes is completed through hardware bit-block transfer (BitBlt), generating a rolling decompressed output of image data.

[0034] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A method for optimized image compression and decompression based on a digital photo frame, characterized in that, Includes the following steps: S1: Obtain multi-source image data of the digital photo frame to be processed, transform the multi-source image data to extract peak frequency band and color frequency band overlap rate. If the color frequency band overlap rate exceeds the preset ratio threshold, mark the standard channel; otherwise, determine the edge or detail path and generate compressed path prediction results. S2: Obtain historical image decoding buffer reference parameters, combine the compression path prediction result to map the width and height range, partition the multi-source image data according to the width and height range, if the compression ratio value is greater than the preset compression ratio threshold, adjust the partitioning points, and generate partitioned compressed data blocks and pixel row and column position indices. S3: Retrieve multi-source image data logs, extract playback timestamps and call counts, calculate density and time weights based on playback timestamps and call counts, normalize density and time weights, and generate playback popularity factors; S4: Reorder the priority table including the partitioned compressed data blocks and pixel row and column position indexes using the playback popularity factor, place the high popularity blocks at the front end, and generate a rolling decompression cache queue; S5: Start the streaming decoding process, load the partitioned compressed data blocks according to the rolling decompression buffer queue, monitor the buffer capacity, pause when the buffer capacity reaches the preset capacity threshold until the space is released, and generate the image data rolling decompression output result.

2. The image optimization compression and decompression method based on a digital photo frame according to claim 1, characterized in that, The compression path prediction result includes the target compression channel type identifier, frequency domain overlap rate quantization value, and frequency band offset direction feature parameter. The pixel row and column position index includes the partition start coordinate vector, dynamic grid boundary parameters, and region redistribution mapping relationship table. The playback popularity factor includes frame-level call density statistics, time difference weighted normalization coefficient, and comprehensive popularity priority score. The rolling decompression cache queue includes the data block priority loading sequence, cache address mapping pointer, and queue dynamic update trigger bit. The image data rolling decompression output result includes the reconstructed image pixel data stream, buffer occupancy status feedback signal, and decoding synchronization clock flag.

3. The image optimization compression and decompression method based on a digital photo frame according to claim 2, characterized in that, The specific steps for obtaining the compression path prediction result are as follows: S111: Obtain the multi-source image data of the digital photo frame to be processed, extract the pixel value matrix of each independent color channel of red, green and blue in the multi-source image data, perform fast Fourier transform on the value matrix, map it to the frequency domain space, monitor the amplitude spectrum response intensity distribution in the frequency domain space, locate the continuous frequency range where the maximum response intensity is located, and generate the peak interval of the color channel frequency band. S112: Call the peak range of the color channel frequency band, calculate the length of the overlapping part of the frequency coverage range between the differentiated color channels through the interval intersection algorithm, obtain the total span value of each channel frequency band, perform a division operation between the overlapping part length and the total span value, quantify the spatial co-occurrence degree of the frequency domain feature distribution between multiple channels, and obtain the color dominant frequency band overlap rate; S113: Compare the overlap rate of the color-dominant frequency band with a preset ratio threshold. When the value exceeds the ratio threshold, establish a mapping mark pointing to the standard compression channel. When the value is lower than the ratio threshold, retrieve the offset direction of the frequency band peak relative to the center frequency. Match the offset state to the edge structure priority path or the detail preservation priority path according to the offset state to the high frequency band or the low frequency band, and generate a compression path prediction result.

4. The image optimization compression and decompression method based on a digital photo frame according to claim 3, characterized in that, The specific method for setting the proportional threshold is as follows: a set of reference images with color entropy values ​​covering multiple preset intervals is selected, the overlap rate of the dominant color frequency bands of each image in the set is calculated, and precoding tests are performed on images with multiple overlap rate intervals. The trend of peak signal-to-noise ratio change of reconstructed images under unified quantization parameters is statistically analyzed. By constructing a mapping relationship curve between the overlap rate value and the image quality attenuation gradient, the critical inflection point where the first derivative of the quality loss rate under the standard compression mode exceeds the preset threshold is identified, and the frequency band overlap rate value corresponding to the critical inflection point is defined as the proportional threshold.

5. The image optimization compression and decompression method based on a digital photo frame according to claim 4, characterized in that, The steps for obtaining the pixel row and column position index are as follows: S211: Obtain historical image decoding buffer reference parameters, calculate the maximum pixel capacity allowed for a single decoding operation in conjunction with the compression path prediction result, map it to the width and height range of the minimum decoding unit, establish a two-dimensional grid coordinate system on the pixel plane of the multi-source image data according to the width and height range of the minimum decoding unit, perform physical cutting processing on the image according to the coordinate system scale, extract the pixel matrix data in each grid, and generate gridded basic partition units. S212: Perform image texture complexity analysis on the gridded basic partition unit, combine the compression characteristics of the predetermined encoding format, calculate the compression ratio estimate of each partition unit, compare the compression ratio estimate with the preset compression threshold, filter high-frequency detailed dense areas with values ​​exceeding the preset compression threshold, extract the current boundary coordinates of the area and the associated adjacent unit position information, and generate a high-complexity area to be reassigned identifier. S213: Based on the high-complexity region identifier to be reassigned, the region reassignment logic is initiated. By moving the coordinates of the row and column division points, the spatial proportion of the high-complexity region is reduced and the coverage of the adjacent low-complexity region is expanded. The grid topology structure is reconstructed to balance the information entropy density of each region. The image data is cut according to the reconstructed topology boundary, and the dynamically adjusted partitioned compressed data blocks are output. The pixel row and column position index of each data block in the reconstructed topology is recorded simultaneously.

6. The image optimization compression and decompression method based on a digital photo frame according to claim 5, characterized in that, The specific steps for obtaining the playback popularity factor are as follows: S311: Retrieve the historical playback logs of multi-source image data within a predetermined time window, retrieve the playback timestamp data of each decoding operation and count the total number of calls, extract the discrete time point sequence, and generate an image historical interaction statistics set including order distribution information; S312: Call the image history interaction statistics set, calculate the access frequency within a unit time window, obtain the call density value, generate a time difference weight based on the difference between the most recent playback time and the current clock, encapsulate the two into a time domain frequency feature vector, perform multi-dimensional popularity aggregation operation, and calculate and obtain the playback popularity factor.

7. The image optimization compression and decompression method based on a digital photo frame according to claim 6, characterized in that, The specific formula for obtaining the playback popularity factor is as follows: ; in, Represents the popularity factor of playback. This represents the call density value. Represents time difference weighting. Represents the number of times it is called. The normalized time coordinate value representing the current moment. Representing the The normalized time coordinate value of this record. Represents a non-zero correction factor. It represents the base of the natural logarithm.

8. The image optimization compression and decompression method based on a digital photo frame according to claim 7, characterized in that, The specific steps for obtaining the rolling decompression cache queue are as follows: S411: Call the partitioned compressed data block and the corresponding pixel row and column position index, initialize the structured mapping container in the system memory, bind the entity content of each data block with its spatial coordinate index in the image plane using key-value pairs, aggregate the storage address information and spatial topology relationship of the full partition, and construct an initial frame-level mapping association table including the correspondence of basic data. S412: Introduce the playback popularity factor and map it as a sorting weight parameter to the data entries of the initial frame-level mapping association table. Perform size comparison and descending sort on the weight values ​​of all entries in the table. Dynamically adjust the linear index position of the data block according to the numerical difference. Replace the high value entries to the beginning segment of the sequence to generate a popularity weighted sorting sequence. S413: Parse the linear topological order determined by the heat-weighted sorting sequence, identify the high-heat data blocks at the front of the sequence and mark them as prefetch objects, pre-allocate continuous storage address space for them in the decoding buffer, construct a data pointer linked list structure that supports on-demand streaming reading, and generate a rolling decompression cache queue.

9. The image optimization compression and decompression method based on a digital photo frame according to claim 8, characterized in that, The specific steps for obtaining the image data rolling decompression output result are as follows: S511: Invoke the rolling decompression cache queue, start the underlying streaming decoding process, parse the predetermined loading order and address pointer in the queue, extract the binary entity content of the partitioned compressed data blocks from the storage medium in sequence, establish a dedicated data transmission channel pointing to the decoder input port, encapsulate each compressed data block into a discrete decoding task unit with timing marks, maintain the operation state of continuously sending data to the decoding core, and generate a sequential loading instruction stream. S512: Execute the sequential loading instruction stream, continuously fill the decoding buffer, use the memory management unit to monitor the instantaneous occupied capacity of the decoding buffer in real time, compare the instantaneous occupied capacity with the preset safety warning threshold, if the capacity value reaches the safety warning threshold, immediately trigger the flow control interrupt logic, suspend the loading of subsequent data blocks, and continuously poll the memory status until the previous data block is decoded and the available physical storage space is released, and generate a buffer status feedback control signal; S513: In response to the storage state change indicated by the buffer state feedback control signal, dynamically switch the blocking and conducting modes of the data loading channel, restore input when the available space meets the requirements, synchronously receive the restored pixel data output by the decoder, fill the pixel matrix of each local region into the corresponding video memory address according to its spatial index coordinates, complete the seamless stitching of the image plane, and generate the image data rolling decompression output result.