Image storage and display method, system and device and control circuit and medium thereof

By splitting animation sequence data into image data and performing pixel-group differential compression, the problem of excessive memory usage of animated images on a microcontroller is solved, achieving the effect of low memory requirements and efficient transmission and display.

CN120997029APending Publication Date: 2025-11-21SHENZHEN GREEN CONNECTION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510996467.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-17
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Animated image compression consumes too much memory, especially when microcontroller resources are limited. The existing LZW algorithm requires a large amount of RAM to be continuously used, exceeding the microcontroller's resource limit.

Method used

The animation sequence data is split into image data. By dividing the same pixel data into pixel groups and obtaining pixel information groups, the target information group is selected for differential compression. Only the difference data is stored, eliminating the memory requirements of the dictionary structure.

Benefits of technology

It achieves efficient compression with low memory requirements on a microcontroller, reduces storage space requirements, and improves the transmission efficiency and display smoothness of animation sequence data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120997029A_ABST
    Figure CN120997029A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, in particular to an image storage and display method, system and device, a control circuit of the image storage and display device and a medium. The image storage and display method comprises the following steps: acquiring animation sequence data, and splitting the animation sequence data into at least one piece of image data according to a time sequence; pixel data of each piece of image data is acquired, and continuous same pixel data in the pixel data is divided into pixel groups; pixel information of each pixel group is obtained, the pixel information comprises the pixel value and the number of the pixel data of the corresponding pixel group, and the pixel information corresponding to the same image data serves as a pixel information group; selecting one pixel information group from the at least one pixel information group as a target information group, and acquiring difference information of the rest pixel information groups and the target information group; and storing the target information group and the differential information as storage information of the animation sequence data. According to the method, the requirement for a memory is extremely low, and the method can be smoothly operated on the single-chip microcomputer while the excellent compression efficiency is kept.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, in particular to an image storage and display method, system, device, control circuit and medium. BACKGROUND

[0002] An animation generally contains multiple frames of images, resulting in a large file size and occupying a large amount of storage space. Compressing the animation can significantly reduce the file size, thereby saving storage resources, which is particularly important in the case of limited storage device capacity.

[0003] LZW (Lempel-Ziv-Welch) is a lossless data compression algorithm based on dictionary encoding, the core idea of which is to replace repeated patterns in input data by constructing a dynamic dictionary, thereby achieving compression. However, the dynamic dictionary needs to continuously occupy several KB to several tens of KB of RAM (for example, 4 KB for a 12-bit encoding dictionary), which is much higher than the upper limit of the resources of a single-chip microcomputer (such as STM32F103 with only 20 KB of RAM). SUMMARY

[0004] The embodiments of the present application provide an image storage and display method, system, device, control circuit and medium to solve the problem of excessive memory occupation in animation compression.

[0005] The present application discloses an image storage and display method, comprising: Obtaining animation sequence data, and splitting the animation sequence data into at least one image data according to time sequence; For each image data, obtaining its pixel data, dividing the continuous same pixel data in the pixel data into a pixel group, obtaining the pixel information of each pixel group, the pixel information including the pixel value and quantity of the pixel data corresponding to the pixel group, and taking the pixel information corresponding to the same image data as a pixel information group; Selecting one from at least one pixel information group as a target information group, and obtaining the difference information between the remaining pixel information groups and the target information group; Storing the target information group and the difference information as storage information of the animation sequence data.

[0006] Optionally, the step of dividing the continuous same pixel data in the pixel data into a pixel group and obtaining the pixel information of each pixel group comprises: Polling all pixel data in the image data, and judging whether the pixel value of the current pixel data is the same as that of the previous pixel data; If yes, the current pixel data is included in the pixel group in which the previous pixel data is located; If not, a new pixel group is created, and the current pixel data is classified into the new pixel group.

[0007] Optionally, the step of creating a new pixel group comprises: A counter corresponding to the new pixel group is created, and the initial value of the counter is 1. The step of classifying the current pixel data into the pixel group in which the previous pixel data is located comprises: The count value of the counter corresponding to the pixel group in which the previous pixel data is located is increased by 1.

[0008] Optionally, the step of storing the target information group and the differential information as storage information of the animation sequence data comprises: The storage information is stored at the end of an executable file in a built-in flash memory or an external flash memory. The file length of the storage information is recorded.

[0009] Optionally, the image storage and display method further comprises: The storage information is read to obtain the target information group and the differential information, and all pixel information groups are obtained based on the target information group and the differential information. For each pixel information group, a pixel value sequence corresponding to each pixel information in the pixel information group is obtained. Pixel value sequences corresponding to the same image data are taken as sequence group data, and the sequence group data is transmitted to a screen display communication interface in sequence for display.

[0010] Optionally, the step of transmitting the image data to the screen display communication interface in sequence for display comprises: Two transmission buffers are divided in the memory, and the two transmission buffers are alternately used for data transmission, when one transmission buffer is full, the sequence group data is sent to the screen through a memory access controller, and the sequence group data is filled into another transmission buffer in sequence.

[0011] The application further discloses an image storage and display system, comprising: An acquisition module is configured to acquire animation sequence data, and split the animation sequence data into at least one image data in time sequence. A pixel module is configured to acquire pixel data of each image data, divide continuous same pixel data in the pixel data into a pixel group, acquire pixel information of each pixel group, and take pixel information corresponding to the same image data as a pixel information group, wherein the pixel information comprises pixel values and quantity of pixel data corresponding to the pixel group. A difference module is configured to select one of the image data as target data, group pixel information corresponding to the target data as a target information group, and obtain difference information between the target information group and pixel information groups corresponding to the remaining image data; A storage module is configured to store the target information group and the difference information as storage information of the animation sequence data.

[0012] The application further discloses a control circuit of an energy storage device, which comprises: An input / output interface is configured to charge or discharge the energy storage device; A battery pack is configured to store electric quantity; A battery management module is connected to the input / output interface and the battery pack and is configured to control charging and discharging current and / or voltage of the battery pack; A FLASH chip is configured to store animation sequence data to be displayed; A control chip is connected to the battery management module and the FLASH chip and is configured to execute steps of the method; A display circuit is connected to the control chip and is configured to display an operation result of the control chip.

[0013] The application further discloses a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to make the processor execute steps of the method.

[0014] The application further discloses an energy storage device, which comprises a memory and a processor, and the memory stores a computer program, and the computer program is executed by the processor to make the processor execute steps of the method.

[0015] The image storage and display method, system, device, control circuit and medium provided by the application have the following advantages: Animation sequence data is split into at least one image data in time sequence, continuous same pixel data in the image data is compressed into pixel information of 'value+counter', any dictionary structure does not need to be maintained, space redundancy is eliminated, a target information group is selected from multiple pixel information groups, and subsequent pixel information groups are differentiated from the target information group, only difference information representing difference data of the pixel information groups and the target information group is stored, time redundancy is eliminated, and double compression effect is achieved. The greedy demand of a dictionary algorithm on memory is fundamentally avoided, only two variables of pixel value and a counter of a pixel group need to be stored during compression, the demand on memory is extremely low, excellent compression efficiency can be maintained, and smooth operation on a single-chip microcomputer can be realized. BRIEF DESCRIPTION OF DRAWINGS

[0016] The technical solutions of the present application will be further described in detail below with reference to the accompanying drawings and embodiments. In the drawings: Figure 1 is a flowchart of an embodiment of the image storage and display method provided by the present application; Figure 2 is a schematic diagram of an embodiment of the image data provided by the present application; Figure 3 is a schematic diagram of a file in which the image data provided by the present application is stored after being compressed into a pixel information group; Figure 4 is a schematic diagram of the stored information in an embodiment provided by the present application; Figure 5 is a flowchart of another embodiment of the image storage and display method provided by the present application; Figure 6 is a structural schematic diagram of an embodiment of the image storage and display system provided by the present application; Figure 7 is a structural schematic diagram of an embodiment of the control circuit of the energy storage device provided by the present application; Figure 8 is a circuit of an embodiment of the control chip and the FLASH chip provided by the present application; Figure 9 is a circuit schematic diagram of an embodiment of the display circuit provided by the present application; Figure 10 is a structural schematic diagram of an embodiment of the energy storage device provided by the present application; Figure 11 is a structural schematic diagram of an embodiment of the computer readable storage medium provided by the present application.

[0017] The various reference signs in the drawings are: 10, image storage and display system; 11, acquisition module; 12, pixel module; 13, difference module; 14, storage module; 20, control circuit of the energy storage device; 21, input and output interface; 22, battery pack; 23, battery management module; 24, control chip; 25, display circuit; 26, FLASH chip; 30, energy storage device; 31, processor; 32, memory; 40, computer readable storage medium; 41, computer program. DETAILED DESCRIPTION

[0018] It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict. The preferred embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0019] Please refer to Figure 1, Figure 1 is a flowchart of an embodiment of the image storage and display method provided by the present application. Figure 2 is a schematic diagram of an embodiment of the image data provided by the present application. The image storage and display method provided by the present application comprises the following steps: S101: Obtain animation sequence data, and split the animation sequence data into at least one image data in time sequence.

[0020] In a specific implementation scenario, obtain animation sequence data to be stored and displayed, such as GIF, APNG, WebP, etc. The animation sequence data (such as GIF, APNG, WebP, etc.) is essentially composed of multiple static image frames in time sequence, and each frame has its display time (frame delay). Each frame after decoding can be saved as image data independently by using a decoder, so as to split the animation sequence data into at least one image data in time sequence of display. The image data is in RGB 565 format, each pixel occupies 2 bytes (16 bits), R (red) occupies 5 bit, G (green) occupies 6 bit, and B (blue) occupies 5 bit, totaling 16 bits (i.e. 2 bytes). Compared with the standard RGB 888 (24 bits, 3 bytes / pixel), RGB 565 sacrifices some color accuracy, but saves storage space.

[0021] S102: Obtain pixel data of each image data, and divide continuous same pixel data in the pixel data into pixel groups. Obtain pixel information of each pixel group, the pixel information includes pixel values and quantity of the pixel data corresponding to the pixel group, and the pixel information corresponding to the same image data is taken as a pixel information group.

[0022] In a specific implementation scenario, for each image data, obtain its pixel data, which can be the pixel value of each pixel point of the image data. A row-first raster scan strategy can be used to convert a two-dimensional image matrix into a one-dimensional data stream. For example, for a WxH resolution image, a pixel sequence in the order of P(0, 0)→P(0, 1)→...→P(0, W-1)→P(1, 0)→...→P(H-1, W-1) is generated, which ensures optimal alignment of display timing and memory access mode.

[0023] Continuous pixel data with the same pixel value in the pixel sequence is taken as a group of pixel groups, so that one pixel sequence corresponding to one image data is divided into multiple groups of pixel groups, and pixel information of each group of pixel groups is obtained, the pixel information including the quantity of pixel data included in the group and the pixel values corresponding to the pixel data.

[0024] In one embodiment, all pixel data in the polling image data is polled, for example, each pixel data in the pixel sequence can be traversed, the pixel value of the current pixel data currently polled is compared with the pixel value of the previous pixel data, if the pixel values of the two are the same, the current pixel data is classified into the pixel group in which the previous pixel data is located, if the pixel values of the two are not the same, a new pixel group is created, and the current pixel data is classified into the new pixel group.

[0025] Further, the counter corresponding to the pixel group is created while the pixel group is created, the initial value of the counter is 1, and the count value of the counter is increased by 1 each time a pixel data is added to the pixel group.

[0026] For example, in a pixel sequence, the pixel value x1 of the first pixel data is obtained, a pixel group y1 is created, the pixel value x1 is taken as the reference value val1 of the pixel group y1, and the counter counter1 of the pixel group y1 is created, initially counter1=1, and the pixel group y1 includes the first pixel data.

[0027] The pixel value x2 of the second pixel data is obtained, x2=x1=val1, so the second pixel data is classified into the pixel group y1, and the counter counter1 is increased by 1, counter1=2.

[0028] The pixel value x3 of the third pixel data is obtained, x3≠val1, so a new pixel group y2 is created, the pixel value x3 is taken as the reference value val2 of the pixel group y2, and the counter counter2 of the pixel group y2 is created, initially counter2=1, and the pixel group y2 includes the third pixel data.

[0029] The pixel value x4 of the fourth pixel data is obtained, x4=x3=val2, so the fourth pixel data is classified into the pixel group y2, and the counter counter2 is increased by 1, counter2=2.

[0030] By analogy, the pixel value xn of the nth pixel data is obtained, and the reference value valm of the pixel group ym corresponding to the (n-1)th pixel data is obtained, it is judged whether the pixel value xn and the reference value valm are equal, if the two are equal, the nth pixel data is classified into the pixel group ym, and the counter counterm is increased by 1, if not, a new pixel group ym+1 is created, the pixel value xn is taken as the reference value valm+1 of the pixel group ym+1, and the counter counterm+1 of the pixel group ym+1 is created, initially counterm+1=1, and the pixel group ym+1 includes the nth pixel data.

[0031] Thus, a plurality of pixel groups can be generated from one image data, and reference values and counter data of each pixel group can be obtained, so that pixel information of each pixel group can be obtained, wherein the reference value reflects pixel values of pixel data included in the pixel group, and the counter is the number of pixel data included in the pixel group. The pixel information corresponding to the same image data is taken as a pixel information group. The compression algorithm for the image data is simple, and does not need complex calculation or dictionary, and is suitable for a single-chip microcomputer environment.

[0032] Please refer to Figure 3 , Figure 3 Fig. 0002.png is a picture in png format, which includes file header information, picture data format and picture data. 0002_upress.bin is pixel data decompressed from the 0002.png file. 0002.bin is pixel information group data compressed from the 0002_upress.bin by the method provided in the present application. After the method provided in the present application is used, the storage space is changed from 25K to 1.41K.

[0033] Thus, the animation sequence data corresponds to at least one pixel information group arranged in time sequence.

[0034] S103: Select one from the at least one pixel information group as a target information group, and obtain difference information of the remaining pixel information groups and the target information group.

[0035] In a specific implementation scenario, the animation sequence data is continuous pictures, and the similarity of two adjacent image data is high. Based on the similarity, the at least one pixel information group can be further compressed. One is selected from the at least one pixel information group as a target information group, and difference operation is performed between the remaining pixel information groups and the target information group to obtain difference information.

[0036] For example, each frame of image data (such as 1.png, 2.png,... N.png) of the animation sequence data has generated a corresponding pixel information group binary file (such as 1.bin, 2.bin,... N.bin) through the above steps, and the single-frame image data has been preliminarily compressed. The pixel information group 1.bin corresponding to the first frame of image data can be taken as the target information group, and in other implementation scenarios, other pixel information groups can also be taken as the target information group, which will not be described here.

[0037] The subsequent pixel information groups 2.bin, 3.bin...N.bin are compared with the target information group 1.bin one by one in binary differential comparison to generate incremental packages (for example, named 2_patch.bin, 3_patch.bin...N_patch.bin) containing only the difference data of the current pixel information group and the target information group. The principle of differential comparison is that if the data of the current pixel information group is the same as that of the target information group, the data is skipped; only the changed (different) part (such as a new pixel block, a counter change, etc.) is recorded.

[0038] The adjacent frames of the animation sequence data are usually highly similar (such as a static background, local element changes), and only minor changes need to be stored after differential comparison. Finally, 1 complete target information group + (N-1) differential packages are stored instead of N complete frames. In this way, the compression rate of continuous animation sequence data is extremely high, and the baseline frame data needs to be cached during decompression (a small amount of RAM overhead), but it is much lower than full-frame decompression. If the original 1.41KB per frame of 10-frame animation, the traditional storage requires 14.1KB; after differential, only the first frame 1.41KB + 9x0.7KB≈7.71KB, saving 45% of space. Please refer to Figure 4 , Figure 4 is a schematic diagram of storing information in an embodiment provided by the present application, as shown in Figure 4 the storage information is 713 bytes, less than half of the original size.

[0039] S104: Store the target information group and the differential information as storage information of the animation sequence data.

[0040] In a specific implementation scenario, the target information group and the differential information are stored as storage information of the animation sequence data. If the data amount of the storage information is small, it can be directly embedded in the program storage area (FLASH) of the single-chip microcomputer, fixed at the end of the executable file through a link script, and the file length of the storage information is recorded. The system directly accesses these data through a pre-defined address and file length information, without the need of an additional storage chip. The advantage is that the hardware cost is zero, the reading speed is fast (the CPU can directly access), but the capacity is limited by the remaining FLASH space of the MCU, and the picture needs to be reprogrammed when updating, which is suitable for scenes with few pictures and low update frequency (such as simple instrument panel UI).

[0041] If the data amount of the storage information is large, an external serial FLASH chip (such as W25Q series) is connected through an SPI / QSPI interface to store the storage information independently, and the file length of the storage information is recorded. The storage information is read on demand during running. The advantage is that the capacity can be expanded (supporting MB-level storage), and the pictures can be updated independently (without the need of reprogramming), but additional hardware cost is needed, and the reading speed is limited by the SPI bus.

[0042] As can be known from the above description, in the embodiment, the animation sequence data is split into at least one image data in time sequence, the same pixel data in the image data is compressed into pixel information of "value+count", without maintaining any dictionary structure, the spatial redundancy is eliminated, further, a target information group is selected from a plurality of pixel information groups, a subsequent pixel information group is differentially processed with the target information group, only differential information representing the difference between the pixel information group and the target information group is stored, the time redundancy is eliminated, and a double compression effect is achieved. The greedy demand of the dictionary algorithm on the memory is fundamentally avoided, only two variables of pixel value and counter of the pixel group need to be stored during compression, the demand on the memory is extremely low, and excellent compression efficiency can be maintained while smoothly running on a single-chip microcomputer.

[0043] Please refer to Figure 5 , Figure 5 is a flowchart of another embodiment of the image storage and display method provided by the application. The image storage and display method provided by the application comprises the following steps: S201: reading storage information, obtaining a target information group and differential information, and obtaining all pixel information groups based on the target information group and the differential information.

[0044] In a specific implementation scenario, the storage information is read from the end of an executable file in an external flash memory or a built-in flash memory, the storage information comprises the target information group and the differential information, reverse operation is performed based on the target information group and the differential information, and the differential information is applied to modify the target information group to obtain the pixel information group. Therefore, all pixel information groups are obtained, and lossless restoration is achieved.

[0045] S202: for each pixel information group, a pixel value sequence corresponding to each pixel information in the pixel information group is obtained.

[0046] In a specific implementation scenario, each pixel information group comprises a plurality of pixel information, and each pixel information is a data pair representing the pixel value and the number of the pixel group. Therefore, it can be understood that after the all pixel information groups are arranged in sequence, the plurality of pixel information arranged in sequence, i.e., the plurality of data pairs, are obtained.

[0047] The pixel information group is decompressed in the format of the data pair, 2 bytes are read as the pixel value of the current pixel group, 2 bytes are read as the number of the current pixel group, and the corresponding pixel value sequence is generated according to the pixel value and the number. For example, the pixel value is x, and the number is n, and the pixel value sequence is n x.

[0048] S203: the pixel value sequences corresponding to the same image data are taken as sequence groups, and the sequence groups are sequentially transmitted to a screen display communication interface for display.

[0049] In a specific implementation scenario, the pixel value sequence obtained after decompression is transmitted to the screen display communication interface in sequence for display. When storing, a preset frame index table is recorded in time sequence, and the physical address and compression length of the target information group or the differential information corresponding to each frame of image data are recorded, for example, frame 1: starting address 0x1000, length 1.2 KB, frame 2: starting address 0x1480, length 0.8 KB…, so that after decompression, the plurality of pixel groups corresponding to each frame of image data (the pixel groups are stored in sequence when storing) can be decompressed into a plurality of pixel value sequences according to the frame index table in sequence, the pixel value sequences corresponding to the same image data are taken as sequence group data, and the sequence group data is transmitted to the screen display communication interface in time sequence for display.

[0050] In an implementation scenario, two transmission buffers are divided in the memory, and the two transmission buffers are alternately used for data transmission. When one transmission buffer is full, the image data is transmitted to the screen through the memory access controller, and the image data is sequentially filled into the other transmission buffer.

[0051] For example, transmission buffer A and transmission buffer B are divided, and the sequence group data is first transmitted to transmission buffer A. When the transmission buffer A is full and the data is transmitted to the screen through DMA, if the image data of the current frame has been transmitted, the storage address corresponding to the image data of the next frame is obtained from the index table immediately, the pixel group information corresponding to the differential information stored in the storage address is obtained, a plurality of pixel value sequences are obtained according to the pixel group information, and the pixel value sequences are transmitted to transmission buffer B. When the data transmission of transmission buffer A is completed, the DMA data source is switched to transmission buffer B and the transmission is started; at the same time, transmission buffer A is reused to fill the next batch of data. Transmission buffer A and transmission buffer B are alternately used in this way until all the sequence group data is transmitted.

[0052] In other implementation scenarios, a third partition is also preset, which is independently allocated to other modules of the system (global variables / stacks, etc.), to ensure that the transmission process does not interfere with the normal operation of the program.

[0053] As described above, in the decompression of the stored information, all pixel information groups are obtained based on the target information group and the differential information, the pixel value sequence corresponding to each pixel information in the pixel information group is obtained, the pixel value sequence is transmitted to the screen display communication interface for display, and the pre-decompression to the RAM is not required, and the direct streaming to the screen is suitable for the low-memory single-chip microcomputer. The hardware is friendly, the transmission efficiency is improved by using the batch transmission characteristics of the communication interface, the DMA hardware acceleration transmission and the double buffering are used to eliminate the CPU waiting, the efficient and stable screen refresh is realized, and the single-chip microcomputer system with limited resources is especially suitable.

[0054] The UI icons (such as battery icons, lightning symbols, and power percentage) of power banks are mostly single-color or double-color (for example, pure white / blue / green background + black text), so there are continuous large areas of the same color. Animations are mostly local gradients (such as power filling and digital page turning), and more than 90% of the area between adjacent frames is static, with only a small number of pixels changing (such as the number "50%" jumping to "51%"). The high similarity between adjacent frames allows differential compression to achieve the best results. Limited by the screen size of power banks (commonly 0.96-1.3 inches), the image resolution is low (typically 128x64 pixels), and the amount of original data for a single frame is small. Therefore, the image storage and display method provided by the present application precisely matches the core needs of power banks for low power consumption, small storage, and smooth animations.

[0055] Please refer to Figure 6 , Figure 6 is a structural schematic diagram of an embodiment of the image storage and display system provided by the present application. The image storage and display system 10 comprises an acquisition module 11, a pixel module 12, a differential module 13, and a storage module 14.

[0056] The acquisition module 11 is used to acquire animation sequence data and split the animation sequence data into at least one image data in chronological order. The pixel module 12 is used to acquire pixel data for each image data and divide the continuous same pixel data in the pixel data into a pixel group. The pixel information of each pixel group is acquired, the pixel information including the pixel value and the number of the pixel data corresponding to the pixel group, and the pixel information corresponding to the same image data is taken as a pixel information group. The differential module 13 is used to select one of the at least one image data as a target data, take the pixel information group corresponding to the target data as a target information group, and acquire the differential information of the pixel information groups corresponding to the remaining image data and the target information group. The storage module 14 is used to store the target information group and the differential information as storage information of the animation sequence data.

[0057] The pixel module 12 is also used to poll all pixel data in the image data, judge whether the pixel value of the current pixel data is the same as that of the previous pixel data, if yes, the current pixel data is classified into the pixel group in which the previous pixel data is located, and if not, a new pixel group is created and the current pixel data is classified into the new pixel group.

[0058] The pixel module 12 is also used to create a counter corresponding to the new pixel group, and the initial value of the counter is 1. The pixel module 12 is also used to add 1 to the count value of the counter corresponding to the pixel group in which the previous pixel data is located.

[0059] The storage module 14 is also used to store the storage information to the end of the executable file in the built-in flash memory or to the external flash memory, and record the file length of the storage information.

[0060] The storage and display system 10 of the image further comprises a display module (not shown in the figure), which is configured to read the stored information, acquire the target information group and the difference information, acquire all pixel information groups based on the target information group and the difference information, acquire, for each pixel information group, a pixel value sequence corresponding to each pixel information in the pixel information group, and transmit the pixel value sequences corresponding to the same image data as sequence group data to the screen display communication interface in sequence for display.

[0061] The display module is further configured to divide two transmission buffers in the memory, and alternately perform data transmission on the two transmission buffers, and when one transmission buffer is full, transmit the sequence group data to the screen through the memory access controller, and fill the sequence group data into the other transmission buffer in sequence.

[0062] As described above, in the embodiment, the animation sequence data is split into at least one image data in time sequence, the continuous same pixel data in the image data is compressed into pixel information of "value+count", any dictionary structure is not maintained, space redundancy is eliminated, the target information group is selected from the multiple pixel information groups, the subsequent pixel information group is different from the target information group, only the difference information representing the difference data of the pixel information group and the target information group is stored, time redundancy is eliminated, and a double compression effect is achieved. The greedy demand of the dictionary algorithm on the memory is fundamentally avoided, only two variables of pixel value and counter of the pixel group need to be stored during compression, the demand on the memory is low, excellent compression efficiency can be maintained, and smooth running on the single-chip microcomputer can be realized. During decompression, all pixel information groups are acquired based on the target information group and the difference information, the pixel value sequence corresponding to each pixel information in the pixel information group is acquired, the pixel value sequence is transmitted to the screen display communication interface for display, pre-decompression to the RAM is not needed, direct streaming transmission to the screen is realized, and the method is suitable for the single-chip microcomputer with low memory. The method is hardware-friendly, the transmission efficiency is improved by using the batch transmission characteristics of the communication interface, the CPU waiting is eliminated by using DMA hardware acceleration transmission and double buffering, high-efficiency and stable screen refreshing is realized, and the method is particularly suitable for the single-chip microcomputer system with limited resources.

[0063] Please refer to Figure 7 , Figure 7 is a structural schematic diagram of an embodiment of a control circuit of an energy storage device provided by the application. The control circuit 20 of the energy storage device comprises an input / output interface 21, a battery pack 22, a battery management module 23, a control chip 24, a display circuit 25 and a FLASH chip 26.

[0064] The input / output interface 21 is used to charge or discharge the energy storage device; the battery pack 22 is used to store electric quantity; the battery management module 23 is connected with the input / output interface and the battery pack, and is used to control the charging / discharging current and / or voltage of the battery pack; the FLASH chip 26 is used to store the animation sequence data to be displayed; the control chip 24 is connected with the battery management module 23 and the FLASH chip 26, and is used to execute the steps of the method as shown in Figure 1 and / or Figure 2 The display circuit 25 is connected with the control chip 24, and is used to display the operation result of the control chip 24.

[0065] Please refer to Figures 8-9 , Figure 8 The circuit of an embodiment of the control chip and the FLASH chip provided by the application, Figure 9 The circuit schematic diagram of an embodiment of the display circuit provided by the application. As shown in Figure 8 and Figure 9 The SPI_FLASH_CS port (No. 17 pin) of the control chip (screen driving MCU) is connected with the SPI_FLASH_CS port (No. 1 pin) of the FLASH chip, the SPI_LCD_SCLK port (No. 10 pin) of the control chip is connected with the SPI_FLASH_SCLK port (No. 6 pin) of the FLASH chip through R21, the SPI_LCD_MISO port (No. 12 pin) of the control chip is connected with the SPI_FLASH_MOSI (No. 5 pin) of the FLASH chip through R22, and the SPI_FLASH_MISO (No. 11 pin) of the control chip is connected with the SPI_FLASH_MISO (No. 2 pin) of the FLASH chip, so as to realize the communication between the control chip and the FLASH chip. The communication interface is the SPI interface, and the control chip can read the animation sequence data from the FLASH chip through the SPI interface.

[0066] The SPI_LCD_SCLK port (No. 10 pin), the SPI_LCD_MOSI port (No. 12 pin), the SPI_LCD_CS port (No. 13 pin), the SPI_LCD_DC port (No. 14 pin) and the SPI_LCD_RST port (No. 15 pin) of the control chip are connected with the SPI_LCD_SCLK port (No. 2 pin), the SPI_LCD_MOSI port (No. 1 pin), the SPI_LCD_CS port (No. 5 pin), the SPI_LCD_DC port (No. 3 pin) and the SPI_LCD_RST port (No. 4 pin) of the display circuit respectively, so that the control chip can convert the animation sequence data read from the FLASH chip into storage information for storage, and convert the storage information into a sequence group and then transmit to the display circuit through the SPI communication interface, and the display screen connected with the display circuit displays.

[0067] Referring now to the drawings Figure 10 , Figure 10 is a structural schematic diagram of an embodiment of the energy storage device provided by the present application. The energy storage device 30 comprises a processor 31 and a memory 32. The processor 31 is coupled to the memory 32. The memory 32 stores a computer program, and the processor 31 executes the computer program to implement the method as above when working. The detailed steps can be referred to the above, and will not be described here again.

[0068] Referring now to the drawings Figure 11 , Figure 11 is a structural schematic diagram of an embodiment of the computer readable storage medium provided by the present application. The computer readable storage medium 40 stores at least one computer program 41, and the computer program 41 is used to be executed by a processor to implement the method as above, and the detailed steps can be referred to the above, and will not be described here again. In an embodiment, the computer readable storage medium can be a storage chip in a terminal, a hard disk, or a mobile hard disk or an optical disc, or other readable and writable storage tools, and can also be a server, etc.

[0069] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware. The program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiments. Any reference to memory, storage, database or other medium used in the embodiments provided by the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0070] The technical features of the above embodiments can be combined in any way. To make the description concise, not all possible combinations of the technical features in the above embodiments are described, but as long as the combinations of the technical features do not contradict, they should be considered as within the scope of the present application.

[0071] It should be understood that the above examples are only used to illustrate the technical solutions of the present application, but not limit the present application. Those skilled in the art can make modifications to the technical solutions described in the above examples, or make equivalent replacements to some of the technical features; and all the modifications and replacements shall belong to the protection scope of the present application.

Claims

1. A method of storing and displaying an image, characterized by, The method comprises the following steps: acquiring animation sequence data, and splitting the animation sequence data into at least one image data in time sequence; acquiring pixel data of each image data, and dividing continuous same pixel data in the pixel data into a pixel group; acquiring pixel information of each pixel group, wherein the pixel information comprises pixel value and quantity of pixel data corresponding to the pixel group; and taking pixel information corresponding to the same image data as a pixel information group; selecting one pixel information group from at least one pixel information group as a target information group, and acquiring difference information of the remaining pixel information groups and the target information group; storing the target information group and the difference information as storage information of the animation sequence data.

2. The image storage and display method according to claim 1, wherein The step of dividing continuous same pixel data in the pixel data into a pixel group and acquiring pixel information of each pixel group comprises the following steps: polling all pixel data in the image data, and judging whether the pixel value of current pixel data is same as the pixel value of previous pixel data; if yes, the current pixel data is classified into the pixel group in which the previous pixel data is located; if no, a new pixel group is created, and the current pixel data is classified into the new pixel group.

3. The image storage and display method according to claim 2, wherein The step of creating a new pixel group comprises the following steps: creating a counter corresponding to the new pixel group, and the initial value of the counter is 1; the step of classifying the current data into the pixel group in which the previous pixel data is located comprises the following steps: adding 1 to the count value of the counter corresponding to the pixel group in which the previous pixel data is located.

4. The image storage and display method according to claim 1, wherein The step of storing the target information group and the difference information as storage information of the animation sequence data comprises the following steps: storing the storage information into the end of an executable file in a built-in flash memory, or storing the storage information into an external flash memory; recording the file length of the storage information.

5. The image storage and display method according to claim 1, wherein The storage and display method of the image further comprises the following steps: reading the storage information, acquiring the target information group and the difference information, and acquiring all pixel information groups based on the target information group and the difference information; for each pixel information group, acquiring a pixel value sequence corresponding to each pixel information in the pixel information group; taking the pixel value sequence corresponding to the same image data as sequence group data, and transmitting the sequence group data to a screen display communication interface in sequence for display.

6. The image storage and display method according to claim 5, wherein The step of transmitting the image data to the screen display communication interface in sequence for display comprises the following steps: dividing two transmission buffers in the memory, and alternately transmitting data by the two transmission buffers; when one transmission buffer is full, transmitting the sequence group data to the screen through a memory access controller, and filling the sequence group data into another transmission buffer in sequence.

7. A storage and display system for images, characterized in that The method comprises the following steps: an acquiring module, configured to acquire animation sequence data, and split the animation sequence data into at least one image data in time sequence; A pixel module is configured to acquire pixel data of each of the image data, divide the same pixel data in the pixel data into pixel groups, acquire pixel information of each of the pixel groups, and include pixel values and quantities of the pixel data corresponding to the pixel groups in the pixel information, and include the pixel information corresponding to the same image data as a pixel information group; A difference module is configured to select one of the image data as target data, acquire difference information between the pixel information groups corresponding to the remaining image data and the target information group, and include the pixel information group corresponding to the target data as a target information group; A storage module is configured to store the target information group and the difference information as storage information of the animation sequence data.

8. A control circuit for an energy storage device, characterized by The application further provides a device for storing and displaying animation sequence data, including: An input / output interface is configured to charge or discharge the energy storage device; A battery pack is configured to store electric quantity; A battery management module is connected to the input / output interface and the battery pack, and is configured to control the charging and discharging current and / or voltage of the battery pack; A FLASH chip is configured to store the animation sequence data to be displayed; A control chip is connected to the battery management module and the FLASH chip, and is configured to execute the steps of the method according to any one of claims 1 to 6; A display circuit is connected to the control chip, and is configured to display the operation result of the control chip.

9. A computer-readable storage medium, characterized in that, The application further provides a computer program product, which includes a computer program stored in a computer readable storage medium, and the computer program is configured to execute the steps of the method according to any one of claims 1 to 6 when executed by a processor.

10. An energy storage device, characterized by, The application further provides a device for storing and displaying animation sequence data, including a memory and a processor, wherein the memory stores a computer program, and the computer program is configured to execute the steps of the method according to any one of claims 1 to 6 when executed by the processor.