Data processing method and device, electronic equipment and storage medium
By processing and packetizing image sequences, data packets matching the e-ink device are generated, solving the problem of low data transmission efficiency of e-ink devices in low-power wide area network environments. This enables efficient animation and page refresh, reducing energy consumption and firmware complexity.
Patent Information
- Application Number
- CN202511033895.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-24
- Publication Date
- 2025-11-14
AI Technical Summary
When displaying dynamic images, existing technologies for e-ink screen devices suffer from problems such as low data transmission efficiency, severe redundancy, inapplicability of compression, and inefficient management of multiple images. In particular, in low-power wide area network environments, packet loss leads to the retransmission of the entire frame, affecting display quality and energy consumption.
By processing the image sequence to generate a target image that matches the e-ink device, and then dividing it into multiple data blocks, a data packet is generated by combining the frame positioning index information. A packet indexing mechanism is established to ensure that data packet loss is reduced in low-power wide area network environments.
It improves the data transmission efficiency of e-ink devices, supports animation and page refresh sequences, adapts to low-bandwidth transmission scenarios, and reduces firmware complexity and communication power consumption.
Smart Images

Figure CN120956908A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of e-ink screen data processing, and more specifically to a data processing method, apparatus, electronic device, and storage medium. Background Technology
[0002] Currently, e-ink devices generally use traditional image formats (such as PNG, BMP, JPG, etc.) to store images and send them to the screen controller via common transmission protocols (such as SPI / I2C). However, when the e-ink screen needs to display dynamic images, multiple images are stored independently, requiring developers to manually stitch the files together or sort them by file. In low-power wide area network (LPWAN) environments, single-frame images need to be retransmitted in their entirety due to data packet loss, resulting in low data transmission efficiency for e-ink devices. Summary of the Invention
[0003] This invention provides a data processing method, apparatus, electronic device, and storage medium, aiming to effectively improve the data transmission efficiency of e-ink screen devices.
[0004] In a first aspect, embodiments of the present invention provide a data processing method applied to a terminal device, the data processing method comprising:
[0005] Obtain an image sequence to be displayed, the image sequence comprising at least two frames of images with a display order;
[0006] Image processing is performed on each frame of the image sequence to obtain a target image, and the target image matches the display format of the e-ink screen device associated with the terminal device;
[0007] The target image in each frame is divided into packets to obtain multiple image data blocks for each frame of the target image;
[0008] Based on multiple image data blocks of each target image frame and the frame positioning index information of the image corresponding to each target image frame in the image sequence, at least two data packets are generated for each target image frame, and each data packet contains at least one image data block of the target image.
[0009] The data packet is sent to the e-ink device.
[0010] Optionally, generating at least two data packets for each target image frame based on multiple image data blocks of each target image frame and the frame location index information of the image corresponding to each target image frame in the image sequence includes:
[0011] For each frame of the target image, the multiple image data blocks of the target image are divided into multiple image data block groups, and each image data block group includes at least one image data block;
[0012] For each image data group, based on the frame positioning index information corresponding to the image data block group and the target image, a data packet corresponding to the image data block group is generated to obtain at least two data packets for the target image.
[0013] Optionally, the step of performing image processing on each frame of the image sequence to obtain the target image includes:
[0014] The first image processing is performed on each frame of the image sequence according to the pre-configured e-ink screen driving parameters to obtain the target image;
[0015] The step of generating a data packet corresponding to the image data block group based on at least one image data block in the image data block group and the frame location index information of the target image corresponding to the image in the image sequence includes:
[0016] Based on the e-ink screen driving parameters, the image data block group, and the frame positioning index information of the target image corresponding to the image in the image sequence, a data packet corresponding to the image data block group is generated, and the e-ink screen driving parameters are located in the header of the data packet.
[0017] Optionally, the e-ink screen driving parameters include at least one of color parameters, e-ink screen refresh parameters, temperature compensation waveform parameters, and compression parameters.
[0018] Optionally, the data packet may also include at least one of the following: the total number of data packets for the target image corresponding to the image data block group, the location information of the image data block group in the target image, and the length of the image data block group.
[0019] Secondly, embodiments of the present invention also provide a data processing method applied to an e-ink display device, the data processing method comprising:
[0020] Acquire multiple data packets sent by the terminal device;
[0021] Based on the frame location index information in the multiple data packets, multiple target data packet groups are determined, and each target data packet group includes multiple data packets with the same frame location index information.
[0022] For each target data packet group, the display image of the e-ink device is generated based on the image data blocks within each data packet in the target data packet group;
[0023] Based on the frame positioning index information corresponding to each target data packet group, the e-ink device is controlled to display the display image corresponding to each target data packet group.
[0024] Optionally, generating the display image of the e-ink device based on the image data blocks within each data packet of the target data packet group includes:
[0025] Obtain the e-ink screen driver parameters from the data packet;
[0026] The image data blocks in each data packet of the target data packet group are subjected to second image processing according to the image processing parameters in the e-ink screen driving parameters to generate the display image of the e-ink screen device.
[0027] The step of controlling the e-ink device to display the display image corresponding to each target data packet group based on the frame positioning index information corresponding to each target data packet group includes:
[0028] According to the e-ink screen driving parameters other than the image processing parameters, and based on the frame positioning index information corresponding to each target data packet group, the e-ink screen device is controlled to display the display image corresponding to each target data packet group.
[0029] Thirdly, embodiments of the present invention provide a data processing apparatus, the data processing apparatus comprising:
[0030] The acquisition module is used to acquire an image sequence to be displayed, the image sequence including at least two frames of images with a display order;
[0031] The processing module is used to perform image processing on each frame of the image sequence to obtain a target image, wherein the target image matches the display format of the e-ink screen device associated with the terminal device;
[0032] The packet segmentation module is used to segment the target image for each frame to obtain multiple image data blocks for each frame of the target image;
[0033] The generation module is used to generate at least two data packets for each frame of target image based on multiple image data blocks of each frame of target image and frame positioning index information of the image corresponding to each frame of target image in the image sequence, wherein each data packet contains at least one image data block of the target image.
[0034] The sending module is used to send the data packet to the e-ink screen device.
[0035] Fourthly, embodiments of the present invention also provide an electronic device, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of any data processing method provided in the embodiments of the present invention.
[0036] Fifthly, embodiments of the present invention also provide a computer-readable storage medium, which includes a computer program. When the computer program is run on an electronic device, the computer program is used to cause the electronic device to perform the steps of any of the data processing methods provided in the embodiments of the present invention.
[0037] This invention first acquires an image sequence to be displayed, the image sequence including at least two frames of images with a display order; performs image processing on each frame of the image sequence to obtain a target image, the target image matching the display format of the e-ink device associated with the terminal device; divides each frame of the target image into packets to obtain multiple image data blocks for each frame of the target image; generates at least two data packets for each frame of the target image based on the multiple image data blocks of each frame of the target image and the frame location index information of the image corresponding to each frame of the target image in the image sequence, each data packet containing at least one image data block of the target image; and sends the data packets to the e-ink device. By dividing the multiple frames of target images generated from the image sequence that match the display format of the e-ink device associated with the terminal device into packets, and generating several data packets for transmission according to the frame location index information of the image corresponding to the target image in the image sequence, a separate packet indexing mechanism is established, which reduces packet loss in low-power wide-area network (LPWAN) environments and improves the data transmission efficiency of the e-ink device. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 This is a flowchart illustrating one embodiment of the data processing method provided in this invention.
[0040] Figure 2 This is a schematic diagram of a data packet structure provided in an embodiment of the present invention;
[0041] Figure 3 This is a schematic diagram of a file header structure provided in an embodiment of the present invention;
[0042] Figure 4 This is a schematic diagram of a data block structure in a data packet provided in an embodiment of the present invention;
[0043] Figure 5 This is a flowchart illustrating another embodiment of the data processing method provided in this invention.
[0044] Figure 6 This is a schematic diagram of the structure of the data processing device provided in the embodiments of the present invention;
[0045] Figure 7 This is a schematic diagram of the structure of the electronic device provided in the embodiment of the present invention. Detailed Implementation
[0046] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Furthermore, in the description of the embodiments of the present invention, the terms "first," "second," etc., are only used for distinguishing descriptions and should not be construed as indicating or implying relative importance. Therefore, features defined with "first" or "second" may explicitly or implicitly include one or more features. In the description of the embodiments of the present invention, "multiple" means two or more, unless otherwise explicitly specified.
[0047] This invention provides a data processing method, apparatus, electronic device, and storage medium that can be applied to terminal devices or e-ink screen devices.
[0048] Specifically, this embodiment will be described from the perspective of a data processing device, which can be integrated into an electronic device. That is, the data processing method of this embodiment can be executed by an electronic device, which can be a terminal device or an e-ink screen device. The terminal device can be a mobile phone, tablet computer, laptop computer, desktop computer, etc.
[0049] The following detailed description is provided in conjunction with the accompanying drawings. In this embodiment, an electronic device is used as the execution subject. It should be noted that the order of description in the following embodiments is not intended to limit the preferred order of the embodiments. Although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be performed in a different order than that shown in the accompanying drawings.
[0050] According to the background art description of this invention, current e-ink screen devices generally use traditional image formats (such as PNG, BMP, JPG, etc.) to store images and send them to the screen controller via common transmission protocols (such as SPI / I2C). A typical process is as follows:
[0051] A PNG image is generated on the PC, decoded by a microcontroller, binarized, and then displayed on an electronic ink screen, also known as an electrophoretic display (EPD).
[0052] However, when displaying dynamic images on an e-ink screen, multiple images are stored independently, requiring developers to manually stitch the files together or sort them by file. In a low-power wide-area network (LPWAN) environment, a single frame image needs to be retransmitted as a whole due to packet loss, resulting in low data transmission efficiency for e-ink screen devices.
[0053] In addition to the above, current e-ink screen image processing technology also has the following shortcomings:
[0054] 1. Format and hardware are out of sync:
[0055] 1. The file does not contain key EPD drive parameters (such as temperature compensation waveform data, refresh data, etc.). The driver needs to be reconfigured every time it is refreshed, which adds a delay of 100-500ms.
[0056] 2. RGB format needs to be converted to 1-bit / 4 grayscale of EPD. Inconsistent conversion algorithms result in loss of image details and increased ghosting (such as jagged edges on text and images).
[0057] II. Inefficient management of multiple images:
[0058] 1. Storing multiple independent files and sorting them by filename leads to frequent file system accesses, increasing Flash wear;
[0059] 2. In partial refresh mode, the difference area needs to be calculated manually and transmitted. Developers need to implement complex differential algorithms, which increases the development cycle by 30%.
[0060] III. Severe transmission redundancy:
[0061] 1. A 1-bit binary image is stored as an 8-bit BMP, with 87.5% of the data being redundant, leading to data bloat.
[0062] 2. A single 640x480 image requires transmission of the entire frame (37.5KB), which takes more than 125 seconds on a low-bandwidth LoRa network (2.4kbps).
[0063] IV. Compression is not applicable to e-ink screen devices:
[0064] For example, lossy compression algorithms for JPEG result in blurred edges in binary images; compression algorithms for PNG DEFLATE are not adequately optimized for run-length encoding, resulting in a compression rate of only 10%-20%; and compression algorithms for the RLE standard are not optimized for long continuous black / white stripes in EPD images.
[0065] It is evident that current e-ink display devices face significant technical bottlenecks in image processing:
[0066] 1. Format level: Common image files (PNG / BMP, etc.) do not have embedded e-ink screen driver parameters, forcing the device to store driver configurations separately, resulting in a 20%-40% increase in firmware complexity;
[0067] 2. Transmission layer: Single-frame images lack a packet indexing mechanism. In low-power wide area network (LPWAN) environments, due to packet loss, the entire frame needs to be retransmitted, increasing energy consumption by 3-5 times.
[0068] 3. Compression aspect: The current algorithm is insufficient for the compression rate of binary / low grayscale EPD images. Actual tests show that for the same price tag image, the PNG size (8.7KB) is 7.25 times that of the dedicated algorithm (EPDFF: 1.2KB).
[0069] 4. Multi-image management: The animation sequence requires developers to manually splice files, and there is no built-in display timing control, resulting in inter-frame refresh delay fluctuations of up to ±300ms.
[0070] Therefore, there is an urgent need for a dedicated file format that is deeply adapted to the physical characteristics of e-ink screens, and that solves the above-mentioned systemic defects by coupling driving parameters, image data, built-in compression and packetization protocols.
[0071] To address the above problems, this invention discloses a data processing method. Please refer to [reference needed]. Figure 1 This data processing method can be applied to terminal devices, and the specific process can be summarized in steps S10 to S50, wherein:
[0072] Step S10: Obtain the image sequence to be displayed, wherein the image sequence includes at least two frames of images with a display order;
[0073] In this embodiment, the image sequence includes at least two frames of images with a display order. This image sequence can be obtained by sorting at least two images. These image frames form a continuous dynamic picture when displayed, such as a switchable image group, GIF animation, video, etc. The image sequence needs to be processed by the terminal device before being sent to the e-ink screen device for display. The e-ink screen device is an electronic device that uses electronic ink (E Ink) technology as its display screen. Its core features are low power consumption, eye protection, and a reading experience close to that of a paper book. The target e-ink screen device has a fast refresh rate and can be used for video or dynamic interaction, but it still lacks a dedicated file format that is deeply adapted to the physical characteristics of e-ink screens.
[0074] Step S20: Perform image processing on each frame of the image sequence to obtain a target image, wherein the target image matches the display format of the e-ink screen device associated with the terminal device;
[0075] In this embodiment, image processing is performed on each frame of the image sequence. This image processing includes binarization and differential processing to adapt to the display of the e-ink device, as well as compression processing to transmit data to the e-ink device. After image processing, a target image is obtained corresponding to each frame of the image sequence. Therefore, the target image matches the display format of the e-ink device associated with the terminal device, and there are multiple target images with a display order among them.
[0076] Step S30: Divide the target image of each frame into packets to obtain multiple image data blocks of the target image of each frame;
[0077] In this embodiment, each frame of image is divided into packets to obtain multiple image data blocks of each frame of target image. The multiple image data blocks of each frame of target image can be stitched together to form the corresponding target image.
[0078] Step S40: Based on multiple image data blocks of each frame of target image and the frame positioning index information of the image corresponding to each frame of target image in the image sequence, generate at least two data packets for each frame of target image, each data packet containing at least one image data block of the target image.
[0079] In this embodiment, frame location index information refers to metadata or tagging systems in an image sequence used for quick location, retrieval, or jumping to a specific frame. It maps "time" or "logical order" to "storage address," enabling efficient random access. For each image data block of each target image frame, based on the frame location information of the image corresponding to the target image in the image sequence, at least two data packets are generated for each target graphic frame. Each data packet contains at least one image data block of the target graphic.
[0080] For example, the data packet architecture can be as follows Figure 2 As shown, the data packet contains a file header, a dynamic parameter block, a frame index table (FIT), and a frame data block. The file header can be of fixed length, such as 13 bytes, while the dynamic parameter block is of variable length. The frame index table is one type of frame positioning index information, which can also take other forms.
[0081] Step S50: Send the data packet to the e-ink screen device.
[0082] In this embodiment, all data packets can be sent to the e-ink device after generating at least two data packets for each frame of the target image. Alternatively, the generated data packets can be sent to the e-ink device at the same time as generating at least two data packets for each frame of the target image. After receiving the data packets, the e-ink device can store, display, etc., and achieve the same animation effect as the image sequence during display.
[0083] In this disclosed technical solution, an image sequence to be displayed is obtained, the image sequence including at least two frames of images with a display order; image processing is performed on each frame of the image sequence to obtain a target image, the target image matching the display format of the e-ink device associated with the terminal device; each frame of the target image is packetized to obtain multiple image data blocks for each frame of the target image; based on the multiple image data blocks of each frame of the target image and the frame positioning index information of the image corresponding to each frame of the target image in the image sequence, at least two data packets are generated for each frame of the target image, each data packet containing at least one image data block of the target image; the data packets are sent to the e-ink device. By packetizing multiple frames of target images generated from the image sequence that match the display format of the e-ink device associated with the terminal device, and generating several data packets for transmission according to the frame positioning index information of the corresponding image in the image sequence, a separate packet indexing mechanism is established, which reduces packet loss in low-power wide-area network (LPWAN) environments and improves the data transmission efficiency of the e-ink device. Furthermore, it supports animation / page refresh sequences, has a built-in data packet index, and is adapted to low-bandwidth transmission scenarios.
[0084] Optionally, generating at least two data packets for each target image frame based on multiple image data blocks of each target image frame and the frame location index information of the image corresponding to each target image frame in the image sequence includes:
[0085] For each frame of the target image, the multiple image data blocks of the target image are divided into multiple image data block groups, and each image data block group includes at least one image data block;
[0086] For each image data group, based on the frame positioning index information corresponding to the image data block group and the target image, a data packet corresponding to the image data block group is generated to obtain at least two data packets for the target image.
[0087] In this embodiment, when generating data packets for each frame of target image, multiple image data blocks of the target image are divided into multiple image data block groups. Each image data block group includes at least one image data block. Then, for each image data group, based on the frame positioning index information corresponding to the image data block group and the target image, a data packet corresponding to the image data block group is generated to obtain at least two data packets for the target image, thereby quickly completing packet splitting.
[0088] In one embodiment, the step of performing image processing on each frame of the image sequence to obtain the target image includes:
[0089] The first image processing is performed on each frame of the image sequence according to the pre-configured e-ink screen driving parameters to obtain the target image. The e-ink screen driving parameters are located in the header of the data packet.
[0090] The step of generating a data packet corresponding to the image data block group based on at least one image data block in the image data block group and the frame location index information of the target image corresponding to the image in the image sequence includes:
[0091] Based on the e-ink screen driving parameters, the image data block group, and the frame positioning index information of the target image in the image sequence, a data packet corresponding to the image data block group is generated.
[0092] In this embodiment, the e-ink screen driving parameters can be the hardware parameters of the e-ink screen device. These parameters are required for displaying and refreshing images to ensure correct, stable, and low-power driving of the screen display content. In this embodiment, the e-ink screen driving parameters are pre-configured for the image sequence and transmitted along with it, eliminating the need for the e-ink screen device to store the driver configuration separately, thus reducing firmware complexity. Each frame in the image sequence undergoes first image processing according to the e-ink screen driving parameters to obtain the target image. When generating a data packet, the e-ink screen driving parameters are packaged into the data packet. Based on the e-ink screen driving parameters, the image data block group, and the frame positioning index information of the target image in the image sequence, a data packet corresponding to the image data block group is generated. Thus, the data packet includes the e-ink screen driving parameters, image data blocks, and frame positioning index information. After receiving the data packet, the e-ink screen device can display the image based on this information.
[0093] In this embodiment, the e-ink screen driving parameters include at least one of color parameters, e-ink screen refresh parameters, temperature compensation waveform parameters, and compression parameters. The color parameters characterize the color mode of the image displayed on the e-ink screen device; the e-ink screen refresh parameters characterize the mode of refreshing the displayed content on the e-ink screen device; and the temperature compensation waveform parameters are a set of dynamically adjusted parameters in the e-ink screen driver used to offset the impact of ambient temperature changes on the display effect, ensuring that the migration speed and grayscale response of ink particles remain consistent at different temperatures, thereby avoiding image retention, color difference, or refresh failure. The compression parameters are compression algorithms used for image sequences to facilitate data transmission.
[0094] In some embodiments, the e-ink screen driving parameters can be placed in the header of the data packet, and the header structure can be as follows: Figure 3 As shown.
[0095] In this embodiment, the data packet also includes at least one of the following: the total number of data packets for the target image corresponding to the image data block group, the position information of the image data block group in the target image, and the length of the image data block group.
[0096] In this embodiment, the data packet also includes association information for image data block groups. This association information may include at least one of the following: the total number of data packets corresponding to the target image of the image data block group, the location information of the image data block group in the target image, and the length of the image data block group. This data can be placed in the same data structure as the image database within the data packet. This data structure can be as follows: Figure 4 As shown, it includes the image frame index, the total number of packets in the current frame, the current index of the packet in the frame (which can start from 0), the data length (PayloadSize), and the image data block (Payload).
[0097] Accordingly, a data processing method is also disclosed; please refer to it. Figure 5 This data processing method can be applied to any of the e-ink screen devices provided in the embodiments of this application. The specific process can be as follows: steps S100 to S400, wherein:
[0098] S100: Obtain multiple data packets sent by the terminal device;
[0099] S200: Classify the multiple data packets according to the frame location index information in the multiple data packets to determine multiple target data packet groups, each of the target data packet groups including multiple data packets with the same frame location index information;
[0100] S300: For each target data packet group, generate the display image of the e-ink device based on the image data blocks in each data packet of the target data packet group;
[0101] S400. Based on the frame positioning index information corresponding to each target data packet group, control the e-ink screen device to display the display image corresponding to each target data packet group.
[0102] In this embodiment, the e-ink device can receive multiple data packets sent by the interrupt device. Based on the frame positioning index information in each data packet, it classifies them to determine multiple target data packet groups. Each target data packet group includes multiple data packets with the same frame positioning index information. This classification process can be performed synchronously while receiving each data packet, thereby determining whether all data packets corresponding to the image sequence have been received, so as to proceed with subsequent processes. Each target data packet group actually corresponds to a target image, corresponding to an image in a frame image sequence. The display image of the e-ink device is generated based on the image data blocks within each data packet in the target data packet group. According to the frame positioning index information corresponding to each target data packet group, the display images can be assembled into a display image sequence. This display image sequence matches the aforementioned image sequence, and the display content is consistent. Based on the frame positioning index information corresponding to each target data packet group, the e-ink device is controlled to display the display image corresponding to each target data packet group, thereby completing the display of the image sequence to be displayed on the e-ink device.
[0103] In one embodiment, generating the display image of the e-ink device based on the image data blocks within each data packet of the target data packet group includes:
[0104] Obtain the e-ink screen driver parameters from the data packet;
[0105] The image data blocks within each data packet of the target data packet group are subjected to second image processing according to the e-ink screen driving parameters to generate the display image of the e-ink screen device.
[0106] The method involves controlling the e-ink device to display the image corresponding to each target data packet group based on the frame positioning index information corresponding to each target data packet group.
[0107] According to the e-ink screen driving parameters, and based on the frame positioning index information corresponding to each target data packet group, the e-ink screen device is controlled to display the display image corresponding to each target data packet group.
[0108] In this embodiment, the e-ink screen driving parameters in the data packet are obtained, and the image data blocks in each data packet of the target data packet group are subjected to second image processing according to the image processing parameters in the e-ink screen driving parameters to generate the display image of the e-ink screen device. According to the frame positioning index information corresponding to each target data packet group, the e-ink screen device is controlled to display the display image corresponding to each target data packet group. According to the other e-ink screen driving parameters in the e-ink screen driving parameters other than the image processing parameters, the e-ink screen device is controlled to display the display image corresponding to each target data packet group according to the frame positioning index information corresponding to each target data packet group.
[0109] In the technical solutions disclosed in the application embodiments, the e-ink screen devices using the above data processing methods have advantages in application scenarios such as electronic price tags, e-ink power banks, and low-power IoT devices. In the electronic price tag scenario, storing price / promotion image sequences in a single file can reduce the number of transmissions. In the e-ink power bank scenario, pre-storing 3 frames of transition animation enables smooth page turning. In the low-power IoT device scenario, packet transmission supports breakpoint resumption, saving communication energy consumption.
[0110] To better understand, a specific application scenario is provided below:
[0111] Taking the display of a GIF image on an e-ink device as an example, a GIF image is input into the terminal device to obtain an animated image sequence. Frame type analysis is performed on the animated image sequence to determine the image type. Then, the e-ink refresh mode with partial refresh is adopted. For the first frame of the sequence, full-frame binarization and run-length encoding are used to obtain the target image corresponding to the first frame. For subsequent frames, differential calculation is used to obtain the target images corresponding to the subsequent frames, and the coordinates of the changing areas are extracted. Finally, the obtained target images are adaptively compressed and packetized. When generating data packets, the corresponding compression algorithm, the e-ink refresh mode with partial refresh, frame positioning index information, and temperature compensation waveform parameters, etc., are added to the e-ink drive parameters. The generated data packets are then sent to the e-ink device. The e-ink device's MUC reads the file header of the data packets to obtain the corresponding compression algorithm, the e-ink refresh mode with partial refresh, and the frame positioning index information, etc. The screen controller preloads the temperature compensation waveform according to the temperature compensation waveform parameters in the drive parameters, parses each packet, and then obtains the display image sequence according to the frame positioning index information and compression algorithm. For the first frame of the display image, full-screen refresh is used. For subsequent differential frames, only the coordinates of the changing areas are updated.
[0112] This embodiment also provides a data processing device, which can be specifically integrated into an electronic device. For example, such as Figure 6 As shown, the data processing apparatus may include:
[0113] Acquisition module 1001 is used to acquire an image sequence to be displayed, the image sequence including at least two frames of images with a display order;
[0114] Processing module 1002 is used to perform image processing on each frame of the image sequence to obtain a target image, wherein the target image matches the display format of the e-ink screen device associated with the terminal device;
[0115] The packet sub-module 1003 is used to sub-packet each frame of the target image to obtain multiple image data blocks for each frame of the target image.
[0116] The generation module 1004 is used to generate at least two data packets for each frame of target image based on multiple image data blocks of each frame of target image and frame positioning index information of the image corresponding to each frame of target image in the image sequence, wherein each data packet contains at least one image data block of the target image.
[0117] The sending module 1005 is used to send the data packet to the e-ink screen device.
[0118] Optionally, the generation module 1004 is further configured to divide the multiple image data blocks of the target image into multiple image data block groups for each frame of the target image, wherein each image data block group includes at least one image data block.
[0119] For each image data group, based on the frame positioning index information corresponding to the image data block group and the target image, a data packet corresponding to the image data block group is generated to obtain at least two data packets for the target image.
[0120] Optionally, the processing module 1002 is further configured to perform first image processing on each frame of the image sequence according to the pre-configured e-ink drive parameters to obtain a target image, wherein the e-ink drive parameters are located in the header of the data packet;
[0121] The generation module 1004 is further configured to generate a data packet corresponding to the image data block group based on the e-ink screen driving parameters, the image data block group, and the frame positioning index information of the target image corresponding to the image in the image sequence.
[0122] Optionally, the e-ink screen driving parameters include at least one of color parameters, e-ink screen refresh parameters, temperature compensation waveform parameters, and compression parameters.
[0123] Optionally, the data packet may also include at least one of the following: the total number of data packets for the target image corresponding to the image data block group, the location information of the image data block group in the target image, and the length of the image data block group.
[0124] This embodiment also provides another data processing device, which can be integrated into an electronic device. The data processing device may include:
[0125] The receiving module is used to acquire multiple data packets sent by the terminal device;
[0126] The classification module is used to classify the multiple data packets according to the frame location index information in the multiple data packets and determine multiple target data packet groups, each of the target data packet groups including multiple data packets with the same frame location index information;
[0127] The determining module is used to generate the display image of the e-ink device based on the image data blocks in each data packet of the target data packet group for each target data packet group;
[0128] The display module is used to control the e-ink device to display the display image corresponding to each target data packet group based on the frame positioning index information corresponding to each target data packet group.
[0129] Optionally, the determining module is also used to obtain the e-ink screen driving parameters in the data packet;
[0130] The image data blocks in each data packet of the target data packet group are subjected to second image processing according to the image processing parameters in the e-ink screen driving parameters to generate the display image of the e-ink screen device.
[0131] Optionally, the display module is further configured to control the e-ink device to display the display image corresponding to each target data packet group according to the frame positioning index information corresponding to each target data packet group, based on other e-ink driving parameters besides the image processing parameters in the e-ink driving parameters.
[0132] In this embodiment, an image sequence to be displayed is obtained, the image sequence including at least two frames of images with a display order; image processing is performed on each frame of the image sequence to obtain a target image, the target image matching the display format of the e-ink device associated with the terminal device; each frame of the target image is packetized to obtain multiple image data blocks for each frame of the target image; based on the multiple image data blocks of each frame of the target image and the frame positioning index information of the image corresponding to each frame of the target image in the image sequence, at least two data packets for each frame of the target image are generated, each data packet containing at least one image data block of the target image; the data packets are sent to the e-ink device. By packetizing multiple frames of target images generated from the image sequence that match the display format of the e-ink device associated with the terminal device, and generating several data packets for transmission according to the frame positioning index information of the corresponding image in the image sequence, a separate packet indexing mechanism is established, which reduces packet loss in low-power wide-area network (LPWAN) environments and improves the data transmission efficiency of the e-ink device. Furthermore, it supports animation / page refresh sequences, has a built-in data packet index, and is adapted to low-bandwidth transmission scenarios.
[0133] like Figure 7 As shown, Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. The electronic device 1100 includes a processor 1101 with one or more processing cores, a memory 1102 with one or more computer-readable storage media, and a computer program stored on the memory 1102 and executable on the processor. The processor 1101 and the memory 1102 are electrically connected. Those skilled in the art will understand that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0134] The processor 1101 is the control center of the electronic device 1100. It connects various parts of the electronic device 1100 via various interfaces and lines. By running or loading software programs and / or units stored in the memory 1102, and by calling data stored in the memory 1102, it executes various functions of the electronic device 1100 and processes data, thereby providing overall monitoring of the electronic device 1100. The processor 1101 can be a CPU, GPU, network processor (NP), etc., and can implement or execute the methods, steps, and logic diagrams disclosed in the embodiments of this invention.
[0135] In this embodiment of the invention, the processor 1101 in the electronic device 1100 loads the instructions corresponding to the processes of one or more applications into the memory 1102 according to the following steps, and the processor 1101 runs the applications stored in the memory 1102 to realize various functions, such as:
[0136] Obtain an image sequence to be displayed, the image sequence comprising at least two frames of images with a display order;
[0137] Image processing is performed on each frame of the image sequence to obtain a target image, and the target image matches the display format of the e-ink screen device associated with the terminal device;
[0138] The target image in each frame is divided into packets to obtain multiple image data blocks for each frame of the target image;
[0139] Based on multiple image data blocks of each target image frame and the frame positioning index information of the image corresponding to each target image frame in the image sequence, at least two data packets are generated for each target image frame, and each data packet contains at least one image data block of the target image.
[0140] The data packet is sent to the e-ink device.
[0141] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0142] Optional, such as Figure 7 As shown, the electronic device 1100 also includes: a touch display screen 1103, a radio frequency circuit 1104, an audio circuit 1105, an input unit 1106, and a power supply 1107. The processor 1101 is electrically connected to the touch display screen 1103, the radio frequency circuit 1104, the audio circuit 1105, the input unit 1106, and the power supply 1107. Those skilled in the art will understand that... Figure 7 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0143] The touch display screen 1103 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. The touch display screen 1103 may include a display screen and a touch panel. The display screen can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. Optionally, the display screen can be configured using a liquid crystal display (LCD), an organic light-emitting diode (OLED), or other similar devices. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program according to the operation commands. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch location and the signal generated by the touch operation, transmitting the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 1101. It can also receive and execute commands from the processor 1101. The touch panel can cover the display screen. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 1101 to determine the type of touch event. Subsequently, the processor 1101 provides corresponding visual output on the display screen based on the type of touch event. In this embodiment, the touch panel and the display screen can be integrated into the touch display screen 1103 to achieve input and output functions. However, in some embodiments, the touch panel and the touch display screen can be implemented as two independent components to achieve input and output functions. That is, the touch display screen 1103 can also be used as part of the input unit 1106 to achieve input functions.
[0144] The radio frequency circuit 1104 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other electronic devices, and to transmit and receive signals with network devices or other electronic devices.
[0145] Audio circuit 1105 can be used to provide an audio interface between a user and an electronic device via a speaker and a microphone. Audio circuit 1105 can convert received audio data into electrical signals and transmit them to the speaker, where the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuit 1105, converted back into audio data, and then processed by processor 1101 before being transmitted via radio frequency circuit 1104 to, for example, another electronic device, or output to memory 1102 for further processing. Audio circuit 1105 may also include an earphone jack to provide communication between peripheral headphones and electronic devices.
[0146] The input unit 1106 can be used to receive input numbers, characters, or user characteristic information (such as fingerprints, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
[0147] Power supply 1107 is used to supply power to various components of electronic device 1100. Optionally, power supply 1107 can be logically connected to processor 1101 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 1107 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0148] although Figure 7 As not shown in the diagram, the electronic device 1100 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.
[0149] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0150] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0151] To this end, embodiments of the present invention provide a computer-readable storage medium storing a plurality of computer programs, which can be loaded by a processor to execute any of the data processing methods provided in the embodiments of the present invention. The computer program can execute the steps of the following data processing method:
[0152] Obtain an image sequence to be displayed, the image sequence comprising at least two frames of images with a display order;
[0153] Image processing is performed on each frame of the image sequence to obtain a target image, and the target image matches the display format of the e-ink screen device associated with the terminal device;
[0154] The target image in each frame is divided into packets to obtain multiple image data blocks for each frame of the target image;
[0155] Based on multiple image data blocks of each target image frame and the frame positioning index information of the image corresponding to each target image frame in the image sequence, at least two data packets are generated for each target image frame, and each data packet contains at least one image data block of the target image.
[0156] The data packet is sent to the e-ink device.
[0157] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0158] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0159] Since the computer program stored in the computer-readable storage medium can execute any of the data processing methods provided in the embodiments of the present invention, the beneficial effects that any of the data processing methods provided in the embodiments of the present invention can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.
[0160] In the above embodiments of the data processing apparatus, computer-readable storage medium, electronic device, and computer program product, the descriptions of each embodiment have different focuses. Parts not described in detail in a particular embodiment can be referred to in the relevant descriptions of other embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes and beneficial effects of the data processing apparatus, computer-readable storage medium, computer program product, electronic device, and their corresponding units described above can be referred to the description of the data processing method in the above embodiments, and will not be repeated here.
[0161] The foregoing has provided a detailed description of a data processing method, data processing apparatus, electronic device, computer-readable storage medium, and computer program product provided by embodiments of the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A data processing method, characterized in that, Applied to terminal devices, the data processing method includes: Obtain an image sequence to be displayed, the image sequence comprising at least two frames of images with a display order; Image processing is performed on each frame of the image sequence to obtain a target image, and the target image matches the display format of the e-ink screen device associated with the terminal device; The target image in each frame is divided into packets to obtain multiple image data blocks for each frame of the target image; Based on multiple image data blocks of each target image frame and the frame positioning index information of the image corresponding to each target image frame in the image sequence, at least two data packets are generated for each target image frame, and each data packet contains at least one image data block of the target image. The data packet is sent to the e-ink device.
2. The method as described in claim 1, characterized in that, The step of generating at least two data packets for each target image frame based on multiple image data blocks of each target image frame and the frame location index information of the image corresponding to each target image frame in the image sequence includes: For each frame of the target image, the multiple image data blocks of the target image are divided into multiple image data block groups, and each image data block group includes at least one image data block; For each image data group, based on the image data block group and the frame positioning index information corresponding to the target image, a data packet corresponding to the image data block group is generated to obtain at least two data packets for the target image.
3. The method as described in claim 2, characterized in that, The step of processing each frame of the image sequence to obtain the target image includes: The first image processing is performed on each frame of the image sequence according to the pre-configured e-ink screen driving parameters to obtain the target image; The step of generating a data packet corresponding to the image data block group based on at least one image data block in the image data block group and the frame location index information of the target image corresponding to the image in the image sequence includes: Based on the e-ink screen driving parameters, the image data block group, and the frame positioning index information of the target image corresponding to the image in the image sequence, a data packet corresponding to the image data block group is generated, and the e-ink screen driving parameters are located in the file header of the data packet.
4. The method as described in claim 3, characterized in that, The e-ink screen driving parameters include at least one of the following: color parameters, e-ink screen refresh parameters, temperature compensation waveform parameters, and compression parameters.
5. The method as described in claim 3, characterized in that, The data packet also includes at least one of the following: the total number of data packets for the target image corresponding to the image data block group, the location information of the image data block group in the target image, and the length of the image data block group.
6. A data processing method, characterized in that, The data processing method, applied to e-ink display devices, includes: Acquire multiple data packets sent by the terminal device; Based on the frame location index information in the multiple data packets, multiple target data packet groups are determined, and each target data packet group includes multiple data packets with the same frame location index information. For each target data packet group, the display image of the e-ink device is generated based on the image data blocks within each data packet in the target data packet group; Based on the frame positioning index information corresponding to each target data packet group, the e-ink device is controlled to display the display image corresponding to each target data packet group.
7. The method as described in claim 6, characterized in that, The step of generating the display image of the e-ink device based on the image data blocks within each data packet of the target data packet group includes: Obtain the e-ink screen driver parameters from the data packet; The image data blocks in each data packet of the target data packet group are subjected to second image processing according to the image processing parameters in the e-ink screen driving parameters to generate the display image of the e-ink screen device; The step of controlling the e-ink device to display the display image corresponding to each target data packet group based on the frame positioning index information corresponding to each target data packet group includes: According to the e-ink screen driving parameters other than the image processing parameters, and based on the frame positioning index information corresponding to each target data packet group, the e-ink screen device is controlled to display the display image corresponding to each target data packet group.
8. A data processing apparatus, characterized in that, The data processing device includes: The acquisition module is used to acquire an image sequence to be displayed, the image sequence including at least two frames of images with a display order; The processing module is used to perform image processing on each frame of the image sequence to obtain a target image, wherein the target image matches the display format of the e-ink screen device associated with the terminal device; The packet segmentation module is used to segment the target image for each frame to obtain multiple image data blocks for each frame of the target image; The generation module is used to generate at least two data packets for each frame of target image based on multiple image data blocks of each frame of target image and frame positioning index information of the image corresponding to each frame of target image in the image sequence, wherein each data packet contains at least one image data block of the target image. The sending module is used to send the data packet to the e-ink screen device.
9. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of any of the data processing methods of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a computer program that, when run on an electronic device, causes the electronic device to perform the steps of any of the data processing methods of claims 1-7.