Thumbnail display method and electronic equipment

By first displaying smaller thumbnails on the electronic device and decoding larger thumbnails in the background, the problem of white blocks when quickly sliding to view pictures is solved, improving display speed and user experience.

CN118842971APending Publication Date: 2024-10-25HUAWEI TECH CO LTD

Patent Information

Application Number
CN202410115867.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-26
Publication Date
2024-10-25

AI Technical Summary

Technical Problem

In electronic devices, when you slide quickly to view the thumbnails of pictures, it is easy to display white blocks because multiple thumbnails need to be decoded at the same time, resulting in long decoding time and affecting the display speed.

Method used

Display smaller thumbnails first, and decode larger thumbnails in the background. After decoding is completed, replace the thumbnails in the display area to avoid displaying white blocks.

Benefits of technology

The speed at which electronic devices display thumbnails is improved, the phenomenon of white blocks when displaying multiple thumbnails at one time is avoided, and the user's browsing experience is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118842971A_ABST
    Figure CN118842971A_ABST
Patent Text Reader

Abstract

The invention provides a thumbnail display method and electronic equipment. In the technical scheme, the target picture can have various thumbnails with different sizes, when the electronic equipment displays the thumbnail with the larger size of the target picture, the thumbnail with the smaller size of the target picture can be firstly displayed, the thumbnail with the larger size is decoded in the background, and after the decoding is completed, the thumbnail with the larger size is decoded. And replacing the thumbnail with the smaller size with the thumbnail with the larger size. According to the technical scheme, the thumbnail display speed of the electronic equipment can be increased, and the phenomenon that white blocks are displayed when multiple thumbnails are displayed at a time is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic technology, and more specifically, to a thumbnail display method and an electronic device. Background Art

[0002] When displaying pictures, electronic devices often need to quickly switch the displayed pictures as the user slides. For example, when a user quickly browses picture thumbnails in a gallery application, the electronic device displays a large number of thumbnails at one time, and the user's quick sliding operation easily causes the electronic device to display white blocks. Summary of the invention

[0003] The present application provides a display method and an electronic device. The technical solution can display a smaller thumbnail first when displaying a thumbnail of a target image, and the electronic device can read the smaller thumbnail faster, thereby improving the speed of displaying thumbnails by the electronic device and avoiding the phenomenon of displaying white blocks when displaying multiple thumbnails at one time.

[0004] In a first aspect, a thumbnail display method is provided, which is applied to an electronic device, and the method comprises: in response to a first operation that causes the electronic device to display a thumbnail of a target image, obtaining a first target thumbnail and a second target thumbnail, wherein the first target thumbnail and the second target thumbnail are thumbnails of different sizes of the target image, and the size of the first target thumbnail is larger than the size of the second target thumbnail; displaying the second target thumbnail in a display area for displaying thumbnails of the target image; decoding the first target thumbnail; and after the decoding of the first target thumbnail is completed, replacing the second target thumbnail in the display area with the first target thumbnail.

[0005] Exemplarily, the first target thumbnail may be a daily thumbnail, and the second target thumbnail may be a monthly thumbnail, a yearly thumbnail, or other thumbnail whose size is smaller than that of the daily thumbnail.

[0006] Exemplarily, the first operation may be an operation for displaying a first target thumbnail of the target picture.

[0007] Based on an embodiment of the present application, in response to a first operation that causes an electronic device to display a thumbnail of a target image, the electronic device can obtain a first target thumbnail with a larger size and a second target thumbnail with a smaller size of the target image, and display the second target thumbnail with a smaller size in a display area for implementing the thumbnail of the target image; and decode the first target thumbnail in the background, and after the decoding of the first target thumbnail is completed, use the first target thumbnail to replace the second target thumbnail in the display area.

[0008] In this way, when displaying thumbnails of target images, the electronic device can first display smaller thumbnails. The electronic device reads smaller thumbnails faster, thereby improving the speed at which the electronic device displays thumbnails and avoiding the phenomenon of displaying white blocks when displaying multiple thumbnails at one time.

[0009] In combination with the first aspect, in certain implementations of the first aspect, when the electronic device stores the first target thumbnail and the second target thumbnail, the encoding compression rate of the first target thumbnail is greater than the encoding compression rate of the second target thumbnail; or, the first target thumbnail is stored in a format that requires encoding compression, and the second target thumbnail is stored in a format that does not require encoding compression.

[0010] Exemplarily, the encoding compression rate of the first target thumbnail is higher, for example, the first target thumbnail can be stored in JPG or PNG format. The encoding compression rate of the second target thumbnail is lower, for example, the second target thumbnail can be stored in a texture format. Alternatively, the second target thumbnail can also be stored in a format that does not require encoding compression, for example, the second target thumbnail can be stored in a bitmap format.

[0011] It should be understood that the storage format that does not require coding compression can also be understood as a storage format with a coding compression rate of 0.

[0012] Based on the embodiment of the present application, the encoding compression rate of the first target thumbnail is greater than the encoding compression rate of the second target thumbnail, or the first target thumbnail is stored in a format that requires encoding compression, and the second target thumbnail is stored in a format that does not require encoding compression.

[0013] In this way, the electronic device can quickly display the second target thumbnail, thereby avoiding the phenomenon of displaying a white block.

[0014] In combination with the first aspect, in certain implementations of the first aspect, in response to a first operation that causes the electronic device to display a thumbnail of a target picture, obtaining the first target thumbnail and the second target thumbnail includes: in response to the first operation, obtaining an index of the first target thumbnail and an index of the second target thumbnail; obtaining the first target thumbnail and the second target thumbnail according to the index of the first target thumbnail and the index of the second target thumbnail.

[0015] Based on the embodiment of the present application, the electronic device can obtain the first target thumbnail according to the index of the first target thumbnail, and obtain the second target thumbnail according to the index of the second target thumbnail, so that the electronic device can quickly obtain the thumbnails.

[0016] In combination with the first aspect, in certain implementations of the first aspect, before responding to the first operation, the method further includes: for thumbnails of a target size, creating a target file for storing thumbnails of the target size, wherein the target file has a continuous storage space of a first target size; when storing the thumbnails of the target size, writing the thumbnails of the target size into the continuous storage space of the target file according to index information of the target file.

[0017] Based on the embodiment of the present application, for thumbnails of target size, the electronic device can be used to store a target file of the thumbnail, and the target file has a continuous storage space. When storing thumbnails of target size, the electronic device stores them in the continuous storage space of the target file.

[0018] In this way, when storing multiple thumbnails, the electronic device can realize continuous storage of the thumbnails, avoiding scattered storage of the multiple thumbnails, so that when the thumbnails need to be read later, the thumbnails can be read continuously, thereby improving the speed of reading thumbnails.

[0019] In combination with the first aspect, in certain implementations of the first aspect, writing the thumbnail of the target size into the continuous storage space of the target file according to the index information of the target file includes: determining the next available storage space in the continuous storage space according to the index information; and writing the thumbnail of the target size into the next available storage space.

[0020] Based on the embodiment of the present application, the target file may have index information, so that when the electronic device stores thumbnails, it can query the next available storage space through the index information and store the thumbnail in the next available storage space, thereby achieving continuous storage of thumbnails.

[0021] In combination with the first aspect, in certain implementations of the first aspect, the electronic device allocates the same storage space for thumbnails of the same target size.

[0022] Based on the embodiments of the present application, the electronic device allocates the same storage space for thumbnails of the same target size, which can improve the performance of the electronic device in reading thumbnails.

[0023] In combination with the first aspect, in some implementations of the first aspect, the method further includes: when the continuous storage space of the target file is full, allocating continuous storage space of a second target size to the target file.

[0024] Exemplarily, the second target size may be M times the first target size, where M is a positive integer.

[0025] It should be understood that the continuous storage space of the first target size and the continuous storage space of the second target size may be continuous or discontinuous.

[0026] Based on the embodiment of the present application, when the continuous storage space of the target file is full, the electronic device continues to allocate continuous storage space of the second target size for the target file, so that the thumbnails stored subsequently can also be stored continuously.

[0027] In combination with the first aspect, in some implementations of the first aspect, the storage format of the second target thumbnail includes a bitmap or a texture.

[0028] It is understandable that the storage format of the second target thumbnail may also include other storage formats with lower coding compression rates, or other storage formats that do not require coding compression.

[0029] Based on the embodiment of the present application, the storage format of the second target thumbnail includes a bitmap or texture, so that the electronic device does not need to decode when displaying the second target thumbnail, thereby increasing the speed at which the electronic device displays thumbnails and avoiding the phenomenon of displaying white blocks.

[0030] In combination with the first aspect, in certain implementations of the first aspect, the first operation is an operation for triggering the electronic device to display a thumbnail of a first target size, and the first target size is the size of the first target thumbnail. The method also includes: in response to a second operation that causes the electronic device to display a thumbnail of the target image, obtaining the second target thumbnail, wherein the second operation is an operation for triggering the electronic device to display a thumbnail of a second target size, the second target size is the size of the second target thumbnail, and the second target size is smaller than the first target size; and displaying the second target thumbnail in the display area.

[0031] For example, the first target size may be 256*256, and the second target size may be 128*128 or 64*64, etc.

[0032] Based on the embodiment of the present application, in response to the second operation of causing the electronic device to display a thumbnail of the second target size, the electronic device can obtain the second target thumbnail and directly display the second target thumbnail, thereby increasing the speed at which the electronic device displays thumbnails and avoiding displaying white blocks.

[0033] In combination with the first aspect, in some implementations of the first aspect, the method further includes: when decoding of the first target thumbnail is not completed and it is determined that the first target thumbnail does not need to be displayed further, canceling the decoding operation on the first target thumbnail.

[0034] Based on the embodiment of the present application, when the decoding of the first target thumbnail is not completed, the electronic device cancels the decoding operation on the first target thumbnail when it determines that the first target thumbnail does not need to be displayed. This technical solution can avoid decoding the first target thumbnail when the first target thumbnail does not need to be displayed, thereby saving power consumption of the electronic device.

[0035] In combination with the first aspect, in some implementations of the first aspect, the determining that the first target thumbnail does not need to be displayed any more includes: when the electronic device no longer displays the display area, determining that the first target thumbnail does not need to be displayed any more.

[0036] The electronic device no longer displays the display area, which may include that the electronic device needs to display other thumbnails in response to the user's sliding operation; or the electronic device responds to the user's operation of exiting the gallery, etc.

[0037] Based on the embodiment of the present application, the electronic device can determine whether it needs to continue displaying the first target thumbnail.

[0038] In a second aspect, an electronic device is provided, comprising: one or more processors; one or more memories; the one or more memories storing one or more programs, and when the one or more programs are executed by one or more processors, the thumbnail display method described in the first aspect and any possible implementation thereof is executed.

[0039] In a third aspect, a thumbnail display device is provided, comprising a module for implementing the thumbnail display method as described in the first aspect and any possible implementation manner thereof.

[0040] In a fourth aspect, a chip is provided, comprising a processor and a communication interface, wherein the communication interface is used to receive a signal and transmit the signal to the processor, and the processor processes the signal so that the thumbnail display method described in the first aspect and any possible implementation thereof is executed.

[0041] In a fifth aspect, a readable storage medium is provided, wherein instructions are stored in the readable storage medium. When the instructions are executed on an electronic device, the thumbnail display method described in the first aspect and any possible implementation thereof is executed.

[0042] In a sixth aspect, a program product is provided, the program product comprising a program code, and when the program code is run on an electronic device, the thumbnail display method as described in the first aspect and any possible implementation thereof is executed. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0044] Figure 2 It is a schematic diagram of the software structure of the electronic device provided in the embodiment of the present application.

[0045] Figure 3 It is a schematic diagram of a scenario to which the embodiments of the present application can be applied.

[0046] Figure 4 It is a schematic diagram of a system architecture provided in an embodiment of the present application.

[0047] Figure 5 It is a schematic diagram of a file organization method provided in an embodiment of the present application.

[0048] Figure 6 It is a schematic diagram of a user mode module provided in an embodiment of the present application.

[0049] Figure 7 It is a schematic diagram of another file organization method provided in an embodiment of the present application.

[0050] Figure 8 It is a schematic diagram of allocating continuous storage space provided in an embodiment of the present application.

[0051] Fig. 9 It is a schematic flow chart of a method for continuously storing thumbnails provided in an embodiment of the present application.

[0052] Fig.10 It is a schematic flowchart of reading thumbnails provided in an embodiment of the present application.

[0053] Fig.11 This is another schematic flowchart of reading thumbnails provided in an embodiment of the present application.

[0054] Fig.12 It is a schematic flow chart of a thumbnail display method provided in an embodiment of the present application.

[0055] Fig.13 It is a schematic block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0056] The technical solution in this application will be described below in conjunction with the accompanying drawings.

[0057] The thumbnail display method in the embodiment of the present application can be applied to electronic devices such as smart phones, tablet computers, laptops, personal computers (PCs), ultra-mobile personal computers (UMPCs), netbooks, vehicle-mounted devices, wearable devices, foldable devices, and Internet of Things (IOT) devices.

[0058] Figure 1 1 shows a schematic diagram of the structure of the electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0059] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0060] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0061] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0062] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0063] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus interface, etc.

[0064] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL).

[0065] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170.

[0066] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface.

[0067] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160.

[0068] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .

[0069] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc.

[0070] The USB interface 130 is an interface that complies with USB standard specifications, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device.

[0071] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0072] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.

[0073] The power management module 141 is used to connect the battery 142 , the charging management module 140 and the processor 110 .

[0074] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0075] The mobile communication module 150 can provide wireless communication solutions including 2G / 3G / 4G / 5G etc. applied on the electronic device 100 .

[0076] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0077] The wireless communication module 160 can provide wireless communication solutions for application in the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), Bluetooth low energy (BLE), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc.

[0078] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with the network and other devices through wireless communication technology.

[0079] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0080] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), or a display panel made of one of the materials such as an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed or a quantum dot light-emitting diode (QLED). In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0081] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0082] The ISP is used to process data fed back by the camera 193. The camera 193 is used to capture still images or videos.

[0083] Digital signal processors are used to process digital signals. In addition to processing digital image signals, they can also process other digital signals.

[0084] Video codecs are used to compress or decompress digital video.

[0085] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100 .

[0086] The internal memory 121 may be used to store computer executable program codes, wherein the executable program codes include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121 .

[0087] The electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0088] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals.

[0089] The speaker 170A, also called a "horn", is used to convert audio electrical signals into sound signals.

[0090] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals.

[0091] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals.

[0092] The earphone jack 170D is used to connect a wired earphone.

[0093] Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, an acceleration sensor 180E, a distance sensor 180F, a fingerprint sensor 180H, a touch sensor 180K, a bone conduction sensor 180M, etc.

[0094] Buttons 190 include a power button, a volume button, and the like.

[0095] Motor 191 can generate vibration prompts.

[0096] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0097] The SIM card interface 195 is used to connect a SIM card.

[0098] Figure 2 1 is a software structure diagram of the electronic device 100 of the embodiment of the present application. The layered architecture divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the operating system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the system library, and the kernel layer. The application layer can include a series of application packages.

[0099] like Figure 2 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, wallet, etc.

[0100] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0101] like Figure 2 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0102] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0103] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0104] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0105] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).

[0106] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0107] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0108] The core library consists of two parts: one part is the function that the Java language needs to call, and the other part is the core library.

[0109] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0110] The system library may include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0111] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0112] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0113] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0114] A 2D graphics engine is a drawing engine for 2D drawings.

[0115] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0116] Before introducing the technical solution of the present application, some professional terms that may be involved in the present application are first introduced as follows.

[0117] Thumbnail: In the embodiment of the present application, a thumbnail can be understood as a preview image in the gallery of an electronic device for users to quickly browse images. The size of a thumbnail is generally small, so that the electronic device can quickly display multiple thumbnails. In the embodiment of the present application, thumbnails can include presentations in a variety of different views, such as a day view (or grid view), a month view, a year view, and the like. The size of a thumbnail can be expressed as "pixel*pixel". For example, the size of a thumbnail in a day view can be 256*256; the size of a thumbnail in a month view can be 128*128; and the size of a thumbnail in a year view can be 64*64. Generally speaking, the size of a thumbnail in a day view is larger than the size of a thumbnail in a month view, and the size of a thumbnail in a month view is larger than the size of a thumbnail in a year view. In the embodiment of the present application, thumbnails in a day view, thumbnails in a month view, and thumbnails in a year view can be referred to as "day thumbnails", "month thumbnails", and "year thumbnails", respectively.

[0118] For ease of description, the embodiment of the present application takes the electronic device displaying thumbnails in the day view as an example to illustrate the applicable scenarios of the embodiment of the present application, but this does not constitute a limitation on the applicable scenarios of the technical solutions provided in the embodiment of the present application.

[0119] For example, Figure 3 Schematic diagram of a scenario to which the embodiment of the present application can be applied. Figure 3 The graphical user interface (GUI) from (a) to (b) in FIG. 1 shows a process in which the electronic device 200 displays a picture in response to a user's operation.

[0120] See also Figure 3 In (a), the GUI may be a display interface 210 of a gallery application of the electronic device 200. The display interface 210 may be used to display thumbnails of pictures in a day view. In the display interface 210, the thumbnails of the pictures in the day view are arranged in the order of the time taken on each day. For example, the display interface 210 displays thumbnails of pictures taken from "December 14, 2023 to December 16, 2023" in the day view.

[0121] The electronic device 200 can switch and display the thumbnails of pictures taken on different dates in the day view in response to the user's sliding operation.

[0122] For example, when the electronic device 200 detects that the user slides up in the display interface 210, the following information may be displayed: Figure 3 GUI shown in (b) in .

[0123] See also Figure 3In (b), the GUI may be a display interface 220 of a gallery application of the electronic device 200. The display interface 220 may be a thumbnail for displaying pictures taken from "November 13, 2023 to November 15, 2023" in a day view.

[0124] When the electronic device displays the day view, multiple day thumbnails can be displayed on its display screen. For example, 32 day thumbnails can be displayed at one time on the display screen of the electronic device. As the user slides in the display interface of the gallery application, the electronic device 200 will continuously switch the displayed day thumbnails. When the user slides quickly, some white blocks may exist in the day thumbnails displayed in the electronic device, that is, some day thumbnails are not displayed immediately, but are displayed after a period of time.

[0125] Continue to see Figure 3 In (b), the daily thumbnail 221, the daily thumbnail 222, the daily thumbnail 223 and the daily thumbnail 224 in the display interface 220 are not displayed immediately, but are displayed as white blocks.

[0126] The reason for this phenomenon is that each daily thumbnail is stored in the electronic device in the format of the Joint Photographic Experts Group (JPG). When the electronic device displays each daily thumbnail, it needs to decode each daily thumbnail separately. Therefore, when multiple daily thumbnails are displayed on one screen, the decoding time of the picture is long, which easily causes the phenomenon of displaying white blocks.

[0127] Similarly, when an electronic device displays a month view or a year view, the number of thumbnails displayed on one screen of the electronic device is greater, and as the user slides, it is more likely to cause the electronic device to display white blocks.

[0128] In view of this, the embodiment of the present application provides a thumbnail display method and an electronic device. In the technical solution, when displaying a target thumbnail, the electronic device can first display a thumbnail smaller than the target thumbnail, and the electronic device background synchronously decodes the target thumbnail, and displays the target thumbnail after the decoding is completed. The technical solution is expected to display the corresponding thumbnail quickly and smoothly when the user slides to view the thumbnail of the picture displayed by the electronic device, avoiding the phenomenon of displaying white blocks.

[0129] The following will combine Figure 4-Figure 11 The technical solution of the display method provided in the embodiments of the present application is introduced.

[0130] For example, Figure 4 Schematic diagram of a system architecture provided by an embodiment of the present application. Figure 4As shown, the electronic device may include at least a gallery application, a camera application, a media library and a memory.

[0131] The media library may at least include a picture writing module, a picture acquiring module and a thumbnail cache generating module.

[0132] The memory can store the original image, metadata and multi-level thumbnails of the picture. The multi-level thumbnails can be understood as thumbnails of different sizes, such as daily thumbnails, monthly thumbnails and yearly thumbnails.

[0133] Exemplarily, when the electronic device detects that the user uses a camera to take a picture A, the picture writing module can write the picture A into the memory. For example, the picture writing module can write the original picture of picture A into the memory, and write the metadata of picture A into the memory.

[0134] After picture A is written, the thumbnail cache generation module can generate thumbnails of multiple different sizes corresponding to picture A, and store the thumbnails of multiple different sizes in the memory. For example, the thumbnail cache generation module can generate thumbnails of size 1, size 2, and size 3 corresponding to picture A, and store the thumbnails of size 1, size 2, and size 3 in the memory, where size 1>size 2>size 3. For example, size 1 can correspond to a daily thumbnail, size 2 can correspond to a monthly thumbnail, and size 3 can correspond to a yearly thumbnail.

[0135] It should be understood that for each picture taken by the camera, the thumbnail cache generation module can generate multiple thumbnails of different sizes. Alternatively, for each picture included in the gallery application, the thumbnail cache generation module can generate multiple thumbnails of different sizes.

[0136] In other examples, the thumbnail cache generation module can also generate a screen preview image corresponding to the picture A. The size of the screen preview image is the same as the size of the original picture of picture A, but the storage space occupied is smaller than the storage space occupied by the original picture of picture A.

[0137] It should be understood that the metadata of the picture A may include information such as the size, storage location, shooting time, and shooting parameters of the picture A.

[0138] In other examples, for video B shot by the user using a camera, the picture writing module can also write the video B and the metadata of video B into the memory. After the video B is written, the thumbnail cache generation module can generate thumbnails of multiple different sizes corresponding to the cover image of video B, and store the thumbnails of multiple different sizes in the memory.

[0139] Generally, electronic devices store thumbnails of different sizes in JPG format. In this way, the pictures have good compression performance, so that the space occupied by the pictures in the read-only memory is small. However, when the electronic device displays the thumbnails, the thumbnails need to be decoded. When the electronic device needs to display multiple thumbnails at one time, white blocks are prone to appear.

[0140] In the embodiment of the present application, for thumbnails with larger sizes (such as daily thumbnails), the electronic device can store them in a format with a higher coding compression rate in the memory, while for thumbnails with smaller sizes (such as monthly thumbnails and yearly thumbnails), due to their smaller sizes, they can be stored in the memory in a format with a lower coding compression rate or without coding compression. Alternatively, for thumbnails with a size greater than or equal to a preset size, the electronic device can store them in a format with a higher coding compression rate in the memory, while for other thumbnails with a size less than the preset size, the electronic device can store them in a format with a lower coding compression rate or without coding compression in the memory.

[0141] For example, for thumbnails with smaller sizes, the electronic device may store them in a format with a lower coding compression rate, such as texture; or, the electronic device may store them in a format that does not require coding compression, such as bitmap.

[0142] The reason why the electronic device stores smaller thumbnails in this way is that the smaller thumbnails are stored in the memory in the format of bitmaps or textures. After obtaining the data of this part of the thumbnail, the electronic device can directly display this part of the thumbnail without decoding, thereby improving the speed of displaying the thumbnail.

[0143] Although thumbnails stored in bitmap or texture format do not need to be decoded when displayed, the electronic device still needs to read these thumbnails from the storage into the running memory, that is, the reading of each thumbnail requires a data reading operation by the electronic device. Therefore, when there are a large number of thumbnails and the storage locations of the thumbnails are relatively scattered (or the disk is severely fragmented), the reading performance of the electronic device will be affected, and white blocks may still appear when the user quickly browses these thumbnails.

[0144] For this phenomenon, the embodiment of the present application provides a thumbnail storage method, which can continuously store thumbnails of different pictures, so that when the electronic device reads the thumbnails, a large number of thumbnails can be read continuously, thereby improving the reading performance of the electronic device and avoiding the phenomenon of displaying white blocks. Figure 5-8 The technical solution for continuously storing thumbnails in an embodiment of the present application is introduced.

[0145] See also Figure 5 , Figure 5Schematic diagram of a file organization method provided by an embodiment of the present application. When an electronic device first creates a file for storing thumbnails, a continuous storage space of a preset size is allocated to the file. The file can correspond to the size type of the thumbnail one by one, and each file is responsible for organizing and storing the data of the thumbnail of the corresponding size.

[0146] For example, when a thumbnail of size 1 is created for the first time, the electronic device may create file 1, which is used to store thumbnails of size 1; when thumbnails of size 1 are added later, the electronic device may store the added thumbnails in file 1. When a thumbnail of size 2 is created for the first time, the electronic device may create file 2, which is used to store thumbnails of size 2; when thumbnails of size 2 are added later, the electronic device may store the added thumbnails in file 2.

[0147] It should be understood that the file is used to store thumbnails, which can be understood as the continuous storage space allocated by the electronic device for the file can be used to store thumbnail data.

[0148] The electronic device can allocate the same storage space for thumbnails of the same size. Assuming that size 2 is 128*128, the electronic device can allocate 32 kilobytes (KB) of storage space for each thumbnail of size 2, then the continuous storage space allocated by the electronic device for file 2 can be N times of 32KB, where N is a positive integer. For example, when N is 64, the storage space allocated by the electronic device for file 2 is a continuous 2 megabytes (MB).

[0149] It should be understood that the first time an electronic device creates a file for storing thumbnails, the electronic device may create the file when it is first turned on; or, the electronic device may create the file when it first takes a picture, video, or stores a picture, video, or animated image.

[0150] The file may have a file header and index information.

[0151] The file header can record key information such as the fixed length of the current thumbnail, the maximum file size supported, and the starting position of the file. The fixed length of the thumbnail can be used to indicate the fixed size of each thumbnail in the file, such as 32KB or 16KB; the maximum file size supported can be used to indicate the maximum storage space of the file, such as 2MB, 4MB, etc.; the starting position of the file can be used to indicate the position of the first thumbnail stored in the file in the memory, such as the starting position can be address A.

[0152] The index information may include an index and an indication of whether the storage location corresponding to the index is occupied. The index information is used to record the allocation of thumbnails stored in the file and the available storage space in the file. The electronic device can determine the occupancy of the file through the index information, such as where the thumbnails are stored in the file and which storage space is not occupied. Thus, when it is necessary to continue to store thumbnails in the future, the electronic device can determine the available storage locations in the file through the index information, and can store the data of the thumbnail that needs to be stored in the available storage locations in the file.

[0153] Exemplarily, the indication information may be represented by "1" or "0", wherein "1" indicates that it is occupied, and "0" indicates that it is not occupied.

[0154] For example, for "index 1, index 2, index 3, index 4, ..." in the index information, the corresponding indication information is "1100...", which can indicate "the storage space corresponding to index 1 and index 2 is occupied, and the storage space corresponding to index 3 and index 4 is not occupied, ..." It should be understood that each index can correspond to a storage space of a fixed size.

[0155] The electronic device can store the thumbnail in the continuous storage space allocated to the file. When the electronic device stores the thumbnail, it can determine which indexes correspond to available storage space by searching the index information of the file, and store the thumbnail in the available storage space of the file. After the thumbnail is stored, the storage space is occupied, and the electronic device can modify the indication information corresponding to the storage space, for example, changing the indication information from "0" to "1". At the same time, the index corresponding to the thumbnail is returned to the user state space to facilitate the subsequent reading of the thumbnail.

[0156] In this way, the electronic device can store thumbnails continuously to avoid scattered storage of thumbnails, so that when thumbnails are subsequently read, the thumbnails can also be read continuously, thereby improving the performance of the electronic device in reading thumbnails.

[0157] It should be understood that the above index information is managed by the kernel, and the application does not perceive the kernel's allocation of thumbnail indexes. For example, for a gallery application, when the electronic device writes thumbnails into the memory, the gallery application does not perceive how the thumbnail indexes are allocated.

[0158] In this way, the application does not need to manage the index information of the thumbnails, and the workload of the application developer in developing the application is reduced.

[0159] In other examples, the index information may also be managed in the user state of the electronic device.

[0160] For example, a gallery application in an electronic device can establish a mapping relationship between thumbnails and indexes, that is, the index information is managed by the gallery application. Then, when the electronic device writes thumbnails to the memory, it can determine which available storage space is available through the index information in the gallery application, store the thumbnail in the available storage space, and record the storage location of the thumbnail in the index information.

[0161] For example, Figure 6 Schematic diagram of a user mode module provided in an embodiment of the present application. Figure 6 As shown, the user mode module may include an index mapping submodule and an index allocation submodule.

[0162] Exemplarily, the user mode module may be a gallery application.

[0163] The index mapping submodule may be used to record the mapping relationship between the stored thumbnails and the indexes. It should be understood that the mapping relationship may be stored in a memory.

[0164] The index allocation submodule may be used to record currently available indexes and may support allocation of the next available index when storing a new thumbnail.

[0165] The index allocation submodule can also be used to mark the index that has been released. For example, when the electronic device deletes the thumbnail according to the user's operation Figure X When the index allocation submodule can mark the abbreviation Figure X The corresponding index X has been released, and when an index is allocated next time, the index X can be allocated to the next stored thumbnail.

[0166] It should be understood that the content recorded by the index allocation submodule can be stored in the memory.

[0167] In this case, the files stored in the memory can be found in Figure 7 . For example, Figure 7 is a schematic diagram of another file organization method provided in an embodiment of the present application. Figure 7 , the files in the memory may include thumbnails stored consecutively, each thumbnail occupying the same storage space.

[0168] In this way, the index information of the thumbnail is managed by the user state application, so that the storage of the thumbnail can be made more convenient without passing through the kernel. In addition, the storage of the thumbnail does not need to pass through the kernel, so that the application can support electronic devices under different systems and has good portability.

[0169] When the storage space of the file is full or about to be full, the electronic device continues to allocate another continuous storage space of a preset size for the file. Exemplarily, the another preset size may be M times the current preset size.

[0170] For example, see Figure 8 , Figure 8 It is a schematic diagram of allocating continuous storage space provided by an embodiment of the present application. When an electronic device allocates storage space for a file for the first time, a continuous storage space of a preset size can be allocated. For example, the index of the continuous storage space can be 1, 2, 3, ..., P, and the continuous storage space can store up to P thumbnails. When the continuous storage space is full, or when the continuous storage space is about to be full, the electronic device can continue to allocate another continuous storage space of a preset size for the file. For example, the index of the other continuous storage space of a preset size can be K, K+1, K+2, ..., Q.

[0171] It should be understood that when the other preset size of continuous storage space is full or about to be full, the electronic device can continue to allocate a certain size of continuous storage space for the file. For example, the newly allocated continuous storage space can be M times the continuous storage space allocated last time.

[0172] For example, if a 2M continuous storage space is allocated to the file for the first time, when the 2M continuous storage space is full or about to be full, the electronic device can continue to allocate a 4M continuous storage space for the file. The 2M storage space and the 4M storage space can be continuous or discontinuous.

[0173] It is understandable that a fixed-size thumbnail, such as a 32KB thumbnail, can be stored in the file. If a thumbnail is less than 32KB, the storage space occupied by the thumbnail can be padded with zeros when storing the thumbnail, so that the storage space finally occupied by the thumbnail is 32KB.

[0174] In this way, electronic devices can store thumbnails of smaller sizes (such as year thumbnails and month thumbnails) continuously, so that when the electronic devices read the thumbnails later, they can also be read continuously. As mentioned above, after the data is read, it can be displayed directly without decoding, thereby improving the reading performance of the electronic device and avoiding the phenomenon of displaying white blocks.

[0175] In other examples, the electronic device may also store the thumbnails in a non-relational database in a key-value format when storing the thumbnails, and read the thumbnails continuously as much as possible when reading the thumbnails to increase the speed of data reading.

[0176] For thumbnails with larger sizes (such as daily thumbnails), they can also be stored in the manner of or not in the manner of the above-mentioned file organization. However, when the size of the thumbnail is larger, if the electronic device also stores it in the format of a bitmap or texture, although decoding is not required when displaying, the compression rate of the bitmap or texture for the image is low, and the space occupied by the read-only memory is large. In addition, for existing electronic devices, thumbnails of larger sizes are generally stored in the JPG format.

[0177] Therefore, for thumbnail A with a larger size, the embodiment of the present application can store it in a format with a higher coding compression rate, such as JPG, portable network graphics (PNG), and when displaying thumbnail A with a larger size, the electronic device can first obtain the corresponding thumbnail B with a smaller size in the above manner and directly display it in the display area A in the gallery where thumbnail A is originally required to be displayed. At the same time, the electronic device obtains thumbnail A from the memory, and decodes thumbnail A in the background. After decoding, thumbnail A is used to replace thumbnail B, so that the electronic device can display thumbnail A with a larger size in display area A.

[0178] Continue to see Figure 4 In some embodiments, after the thumbnail cache generation module stores the data of the multi-level thumbnails of the above-mentioned media files such as pictures or videos in the memory, when the user needs to view the thumbnail A of the picture in the gallery, the picture acquisition module can obtain a thumbnail B of the same picture that is smaller than the thumbnail A from the memory through the thumbnail acquisition interface, and display the thumbnail B in the display area A where the thumbnail A is originally required to be displayed through the display unit. At the same time, the picture acquisition module obtains the thumbnail A from the memory through the thumbnail acquisition interface, and the electronic device decodes the thumbnail A in the background, and after the decoding is completed, the thumbnail A is used to replace the thumbnail B, so that the electronic device can display the thumbnail A with a larger size in the display area A.

[0179] In some embodiments, when a user needs to view thumbnail A of a picture in a gallery, the picture acquisition module can obtain thumbnail B of the same picture that is smaller than thumbnail A and thumbnail A from the memory through the thumbnail acquisition interface, and first display thumbnail B in display area A where thumbnail A is originally required to be displayed through the display unit. At the same time, the electronic device decodes thumbnail A in the background, and after decoding, replaces thumbnail B with thumbnail A, so that the electronic device can display thumbnail A of a larger size in display area A.

[0180] For example, the thumbnail A may be a daily thumbnail, and the thumbnail B may be a weekly thumbnail, a monthly thumbnail, a yearly thumbnail, or the like, which is a thumbnail smaller in size than the daily thumbnail.

[0181] It should be understood that the thumbnail B first displayed by the electronic device is enlarged to the same size as the thumbnail A and then displayed in the display area where the thumbnail A is originally required to be displayed.

[0182] In this way, for thumbnails with larger sizes, the present application can store them in formats with higher encoding compression rates, such as JPG and PNG, so that the memory space occupied by them can be smaller. In addition, when displaying, the electronic device first displays thumbnails with smaller sizes that do not need to be decoded, and decodes the thumbnails with larger sizes in the background, and after the decoding is completed, the thumbnails with larger sizes are replaced with the thumbnails with smaller sizes. Since the thumbnails with smaller sizes are stored in a continuous storage manner and do not need to be decoded when displayed, the electronic device can read and display the thumbnails with smaller sizes faster, thereby avoiding the electronic device from displaying white blocks. After the decoding of the larger thumbnail is completed, the electronic device replaces the previously displayed thumbnail with the thumbnail with a larger size. The user cannot perceive this change, which can fully meet the user's needs for quickly browsing pictures.

[0183] In addition, for existing electronic devices, thumbnails of larger size are generally stored in JPG format, and this technical solution can also be applied to these electronic devices.

[0184] The following will combine Fig. 9 The technical solution for continuously storing thumbnails in the embodiments of the present application is introduced in detail.

[0185] For example, Fig. 9 FIG. 1 is a schematic flow chart of a method for continuously storing thumbnails provided in an embodiment of the present application. Fig. 9 As shown, the method 300 may include steps 310 to 340 .

[0186] 310 , for a thumbnail of a target size, the electronic device creates a target file having a first target size.

[0187] For example, for the same photographed picture, the electronic device may store thumbnails of multiple different sizes. For each thumbnail of different sizes, the electronic device may create a corresponding target file.

[0188] The thumbnail of the target size may be a thumbnail of smaller size mentioned above, such as a monthly thumbnail, a yearly thumbnail, etc. The thumbnail of the target size may also be a thumbnail of larger size mentioned above, such as a daily thumbnail, etc.

[0189] Exemplarily, if the target size is 256*256, the electronic device may create a target file 1 of a first target size, where the first target size may be N times the size of the storage space occupied by a thumbnail of the target size.

[0190] It is understandable that the target file can be the Figure 5 , Figure 8 An example of a file used to store thumbnails as described in .

[0191] 320 , the electronic device writes the thumbnail into the continuous storage space of the target file according to the index information of the target file, wherein the electronic device allocates the same storage space for each thumbnail.

[0192] When it is necessary to write the thumbnail into the continuous storage space of the target file, the electronic device can write the thumbnail into the continuous storage space of the target file according to the index information of the target file. For example, the electronic device can first query the index information of the target file, determine the next free storage space in the target file, and write the thumbnail into the next free storage space.

[0193] For each thumbnail stored in the continuous storage space of the target file, the electronic device allocates a fixed storage space for it. For example, the electronic device allocates 32KB of storage space for each thumbnail. If the size of the thumbnail is less than 32KB, the electronic device can fill the storage space occupied by it with zeros when storing the thumbnail, so that the storage space finally allocated for the thumbnail is 32KB.

[0194] It is understandable that after writing the thumbnail into the continuous storage space of the target file, the electronic device can modify the indication information of the index corresponding to the thumbnail in the index information of the target file, such as changing the indication information from "0" to "1". And the index corresponding to the thumbnail is returned to the user state space to facilitate the subsequent reading of the thumbnail.

[0195] In this way, the electronic device can continuously store multiple thumbnails that need to be stored.

[0196] 330 , the electronic device determines whether the continuous storage space of the target file is full.

[0197] The electronic device can determine whether the target file is full according to the index information of the target file. For example, for index X, a value of 1 indicates that the file is full, and a value of 0 indicates that the file is not full.

[0198] For some examples, see Figure 8 When the electronic device writes a thumbnail to the target file, if it determines that the indication information of index 1 to index P is all 1 by querying the index information, it can be determined that the target file has been filled, and the electronic device can execute step 340. Alternatively, when the electronic device determines that the target file is about to be filled, step 340 can also be executed.

[0199] In other examples, when the electronic device determines that there is an index with indication information of 0 based on the index information, it can be determined that the target file is not full, and the electronic device can continue to execute step 320 and store the thumbnail in the target file when a thumbnail needs to be generated.

[0200] 340. The electronic device allocates a continuous storage space of a second target size for the target file.

[0201] When the electronic device determines that the target file is full, the electronic device may allocate a second target size of continuous storage space for the target file, and the second target size may be M times the first target size, where M is a positive integer. For example, M is 2 or 4, and the specific value of M is not limited in the embodiment of the present application.

[0202] It should be understood that after step 340 , the electronic device may continue to execute step 320 when it is necessary to continue writing thumbnails.

[0203] In this way, the electronic device can realize continuous storage of thumbnails, so that when the electronic device displays multiple thumbnails later, the thumbnails can be read continuously, thereby improving the reading speed of thumbnails. Figure 10-11 The technical solution for electronic devices to read thumbnails is introduced in detail.

[0204] For example, Fig.10 is a schematic flow chart of reading thumbnails provided by an embodiment of the present application. Fig.10 As shown, the method 400 may be applied to an electronic device, and the method 400 may include steps 410 to 430.

[0205] 410, in response to causing the electronic device to display a thumbnail Figure 1 Operation, electronic equipment query abbreviation Figure 1 The index of .

[0206] For example, the abbreviation Figure 1 It can be a thumbnail with a size smaller than the preset size. Figure 1 It can also be a thumbnail of smaller size as mentioned above. For example, the first target thumbnail is a monthly thumbnail or a yearly thumbnail.

[0207] In some embodiments, the electronic device is caused to display a thumbnail Figure 1 The operation may also be an operation of the user sliding in the display interface A of the gallery. For example, the display interface A may be a display interface for displaying monthly thumbnails. When the electronic device detects that the user slides down or up in the display interface A, the electronic device will display multiple thumbnails (such as 102) along with the user's sliding operation. Each thumbnail in the multiple thumbnails is the thumbnail. Figure 1Then, the electronic device can first query the thumbnail Figure 1 The index of .

[0208] For example, at a certain moment, as the user slides, the electronic device needs to display multiple thumbnails. The electronic device needs to first obtain the information of the thumbnails to be displayed from the media library, such as the file name, creation date, uniform resource locator and index of the thumbnail.

[0209] 420, electronic equipment according to the abbreviation Figure 1 Get thumbnails from the index Figure 1 .

[0210] Get the thumbnail to be displayed on the electronic device Figure 1 After obtaining the index, the thumbnail can be obtained from the memory according to the index. Figure 1 For example, in electronic devices, the abbreviation Figure 1 Stored in bitmap or texture format.

[0211] It should be understood that this abbreviation Figure 1 The storage method described above can be used to store the data continuously, so the electronic device can store the data according to the plurality of thumbnails. Figure 1 The index of the multiple abbreviations Figure 1 The data can be read continuously, thereby improving the data reading speed.

[0212] 430, electronic device display thumbnail Figure 1 .

[0213] In some examples, when the abbreviation Figure 1 When stored in bitmap format, due to the thumbnail Figure 1 It is not compressed when stored, so electronic devices can obtain thumbnail images. Figure 1 After the bitmap format data is converted, the thumbnail can be directly displayed by the display unit. Figure 1 .

[0214] In some examples, when the abbreviation Figure 1 When stored in texture format, electronic devices obtain thumbnails Figure 1 After the texture format data is obtained, the texture format data can be processed by the GPU and the thumbnail can be directly displayed by the display unit. Figure 1 .

[0215] It should be understood that in the above two methods, the electronic device does not need to Figure 1 After decoding, it can be displayed directly.

[0216] In this way, when the electronic device displays multiple thumbnails, it can read the multiple thumbnails continuously, thereby improving the speed of data reading. In addition, the electronic device can directly display the data without decoding the data when reading, thereby improving the speed of displaying thumbnails, so that the electronic device can quickly display the thumbnails that need to be displayed as the user slides, avoiding the display of white blocks.

[0217] In some cases, for some larger thumbnails, such as daily thumbnails, when users need to quickly display multiple thumbnails when sliding quickly, for example, the electronic device needs to transmit 90 frames per second. In order to avoid displaying white blocks, the electronic device needs to first obtain a smaller thumbnail, enlarge it, and then display it in the display area of ​​the larger thumbnail. Fig.11 Introduce the technical solution.

[0218] For example, Fig.11 FIG. 1 is another schematic flow chart of reading thumbnails provided by an embodiment of the present application. Fig.11 As shown, the method 500 may be applied to an electronic device, and the method 500 may include steps 510 to 540.

[0219] 510, in response to causing the electronic device to display a thumbnail Figure 2 Operation, query abbreviation Figure 2 Index and abbreviations Figure 3 The index of Figure 3 The size is smaller than the thumbnail Figure 2 size.

[0220] For example, the abbreviation Figure 2 It can be a thumbnail with a size greater than or equal to the preset size. Figure 3 The size of the same image can be smaller than the thumbnail. Figure 2 It should be understood that the thumbnail Figure 2 This can be a larger thumbnail from the previous article. Figure 3 This can be a smaller thumbnail from the previous article.

[0221] For example, for a picture A taken by an electronic device, the thumbnail Figure 2 is the daily thumbnail corresponding to the picture A. Figure 3 is the monthly thumbnail corresponding to picture A. It should be understood that the thumbnail Figure 3 It can also be a weekly thumbnail or a yearly thumbnail corresponding to picture A.

[0222] It should be understood that the manner in which the electronic device queries the index can refer to the relevant description in step 410, and for the sake of brevity, it will not be repeated here.

[0223] 520, electronic equipment according to the abbreviation Figure 3 Get thumbnails from the index Figure 3 , according to the abbreviation Figure 2 Get thumbnails from the index Figure 2 .

[0224] It should be understood that the electronic device can be based on the abbreviation Figure 3 Gets a thumbnail of a bitmap or texture format that can be displayed directly Figure 3 As mentioned above, due to the large size of the abbreviation Figure 2 It is stored in the memory after being encoded and compressed, so the electronic device uses the abbreviation Figure 2 The index gets the encoded abbreviation Figure 3 , the abbreviation Figure 3 It needs to be decoded before it can be displayed.

[0225] 530, electronic equipment in abbreviated Figure 2 The thumbnail is displayed in the display area Figure 3 , and abbreviate Figure 2 to decode.

[0226] Get a thumbnail of a bitmap or texture format on an electronic device Figure 3 After that, you can use the abbreviation Figure 3 Directly display the thumbnail Figure 2 in the display area.

[0227] For example, abbreviation Figure 2 The size is 256*256. Figure 3 If the size is 128*128, the electronic device can Figure 3 After the size is enlarged to 256*256, it is displayed in the original thumbnail Figure 2 in the display area, so that the electronic device displays thumbnails to the user. Figure 2 .

[0228] It should be understood that the electronic device displays thumbnails Figure 3 At the same time, the encoded thumbnails can be synchronized in the background Figure 2 to decode.

[0229] 540, in abbreviated Figure 2 After decoding, the electronic device uses the thumbnail Figure 2 Replace Abbreviation Figure 3 .

[0230] In abbreviated Figure 2 After decoding is completed, the electronic device can display the thumbnail Figure 2 Replace Abbreviation Figure 3 . Because electronic devices display thumbnails Figure 3There is no need to decode, so as the user quickly slides, the electronic device can quickly display multiple thumbnails that need to be displayed.

[0231] In addition, in electronic devices, Figure 2 After decoding is completed, the abbreviation will be used Figure 2 Replace Abbreviation Figure 3 This process takes a short time and the user can hardly perceive the change. In the user's view, the electronic device displays a larger thumbnail. Figure 2 , which can bring users a good and fast browsing experience.

[0232] In some cases, because the user slides the picture quickly, the electronic device needs to switch the multiple thumbnails displayed on the display screen as the user slides. Figure 2 The decoding is still being performed in the background, and the user has continued to slide, so the electronic device does not need to display the multiple thumbnails. Figure 2 , but need to display multiple thumbnails Figure 2 .

[0233] Therefore, the method 500 may further include:

[0234] After confirming that you do not need to continue displaying thumbnails Figure 2 When the electronic device cancels the thumbnail Figure 2 to decode.

[0235] For example, since the display screen of the electronic device needs to display multiple thumbnails at one time, the multiple thumbnails are displayed in the background of the electronic device. Figure 2 During decoding, if there are 10 thumbnails waiting to be decoded in the decoding queue, at this time, the electronic device detects the user's sliding operation and needs to display other thumbnails, then the electronic device can cancel the decoding task of the 10 thumbnails and continue decoding the other thumbnails that need to be displayed.

[0236] In this way, the electronic device can give priority to decoding the thumbnail that needs to be displayed currently, so as to ensure that the currently displayed picture has no white blocks. In addition, the decoding of the thumbnail that the user has swiped away and does not need to be displayed is cancelled, which can save the power consumption of the electronic device.

[0237] It is understandable that the electronic device may also provide a variety of display strategies for the user to choose from. For example, the electronic device may provide a fast access strategy, a balanced access strategy, and a high-quality access strategy.

[0238] for Fig.11 The method shown in can be a balanced access strategy.

[0239] Exemplarily, for the quick access strategy, in response to the operation of causing the electronic device to display thumbnail A1, the electronic device may obtain thumbnail B1 that is smaller than thumbnail A1, and display thumbnail B1 in the display area of ​​thumbnail A1. For example, thumbnail A1 is a daily thumbnail, and thumbnail B1 is a monthly thumbnail. Alternatively, thumbnail A1 is an original image, and thumbnail B1 is a daily thumbnail.

[0240] In this way, the electronic device can display pictures quickly.

[0241] For the high-quality access policy, in response to the operation of causing the electronic device to display the thumbnail A2, the electronic device can obtain data of the thumbnail A2 at the original size and display the thumbnail A2, so that the thumbnail A2 displayed by the electronic device can be clearer.

[0242] It is understandable that among the above-mentioned multiple display strategies, the user can choose which display strategy to use in the application.

[0243] In other examples, the electronic device may also determine a corresponding display strategy based on the user's sliding speed.

[0244] For example, when the electronic device determines that the user's sliding speed in the display interface of the gallery application is less than the preset speed, the electronic device obtains the thumbnail to be displayed and displays it after decoding is completed, which can meet the user's usage needs. Then the electronic device can determine to take effect the high-quality access policy.

[0245] When the electronic device determines that the user's sliding speed in the display interface of the gallery application is greater than or equal to the preset speed, it may take a long time for the electronic device to obtain the thumbnail to be displayed and display it after decoding, resulting in the phenomenon of displaying white blocks. Therefore, the electronic device can determine to take effect the balanced access strategy to achieve fast display of thumbnails and avoid the phenomenon of displaying white blocks.

[0246] Fig.12 is a schematic flow chart of a thumbnail display method provided in an embodiment of the present application. Fig.12 As shown, the method 600 may be applied to an electronic device, and the method 600 may include steps 610 to 640.

[0247] 610. In response to a first operation of causing the electronic device to display a thumbnail of a target image, the electronic device obtains a first target thumbnail and a second target thumbnail, wherein the first target thumbnail and the second target thumbnail are thumbnails of different sizes of the target image, and the size of the first target thumbnail is larger than the size of the second target thumbnail.

[0248] It should be understood that the first target thumbnail may be a thumbnail with a larger size as mentioned above, such as a daily thumbnail; and the second target thumbnail may be a thumbnail with a smaller size as mentioned above, such as a monthly thumbnail or a yearly thumbnail.

[0249] Exemplarily, the first operation may be an operation in which the user clicks on the gallery, and when the electronic device last exited the gallery, the size of the thumbnail of the target picture displayed in the gallery was the same as the size of the first target thumbnail. Alternatively, the first operation may also be an operation in which the user slides up or down in the gallery, and at this time, the size of the thumbnail of the target picture displayed in the gallery is the same as the size of the first target thumbnail. Alternatively, the first operation may also be an operation in which the user slides with two fingers to enlarge the thumbnail when the size of the target picture displayed in the gallery is the same as the size of the second target thumbnail.

[0250] 620. The electronic device displays a second target thumbnail in a display area for displaying thumbnails of target pictures.

[0251] The electronic device first displays the second target thumbnail in the display area for displaying the thumbnail of the target image. For example, the electronic device may first enlarge the size of the second target thumbnail to the same size as the first target thumbnail and then display it in the display area.

[0252] 630. The electronic device decodes the first target thumbnail.

[0253] It is understandable that step 620 and step 630 may be performed synchronously. Thus, while the electronic device displays the second target thumbnail, the electronic device synchronously decodes the first target thumbnail in the background.

[0254] 640. After the decoding of the first target thumbnail is completed, the electronic device uses the first target thumbnail to replace the second target thumbnail in the display area.

[0255] After the first target thumbnail is decoded, the electronic device uses the first target thumbnail to replace the second target thumbnail in the display area, so that the first target thumbnail with a larger size is displayed in the display area.

[0256] In this way, the electronic device can read and display the smaller thumbnail faster, thereby avoiding the display of white blocks. After the larger thumbnail is decoded, the electronic device replaces the previously displayed smaller thumbnail with the larger thumbnail, and the user cannot perceive the change, which can fully meet the user's need to browse pictures quickly.

[0257] Based on an embodiment of the present application, in response to a first operation that causes an electronic device to display a thumbnail of a target image, the electronic device can obtain a first target thumbnail with a larger size and a second target thumbnail with a smaller size of the target image, and display the second target thumbnail with a smaller size in a display area for implementing the thumbnail of the target image; and decode the first target thumbnail in the background, and after the decoding of the first target thumbnail is completed, use the first target thumbnail to replace the second target thumbnail in the display area.

[0258] In this way, when displaying thumbnails of target images, the electronic device can first display smaller thumbnails. The electronic device reads smaller thumbnails faster, thereby improving the speed at which the electronic device displays thumbnails and avoiding the phenomenon of displaying white blocks when displaying multiple thumbnails at one time.

[0259] In some embodiments, when the electronic device stores a first target thumbnail and a second target thumbnail, the encoding compression rate of the first target thumbnail is greater than the encoding compression rate of the second target thumbnail; or, the first target thumbnail is stored in a format that requires encoding compression, and the second target thumbnail is stored in a format that does not require encoding compression.

[0260] Exemplarily, the encoding compression rate of the first target thumbnail is higher, for example, the first target thumbnail can be stored in JPG or PNG format. The encoding compression rate of the second target thumbnail is lower, for example, the second target thumbnail can be stored in a texture format. Alternatively, the second target thumbnail can also be stored in a format that does not require encoding compression, for example, the second target thumbnail can be stored in a bitmap format.

[0261] It should be understood that the storage format that does not require coding compression can also be understood as a storage format with a coding compression rate of 0.

[0262] Based on the embodiment of the present application, the encoding compression rate of the first target thumbnail is greater than the encoding compression rate of the second target thumbnail, or the first target thumbnail is stored in a format that requires encoding compression, and the second target thumbnail is stored in a format that does not require encoding compression.

[0263] In this way, the electronic device can quickly display the second target thumbnail, thereby avoiding the phenomenon of displaying a white block.

[0264] In some embodiments, in response to a first operation of causing the electronic device to display a thumbnail of a target picture, acquiring a first target thumbnail and a second target thumbnail includes:

[0265] In response to the first operation, the electronic device obtains an index of the first target thumbnail and an index of the second target thumbnail;

[0266] The electronic device acquires the first target thumbnail and the second target thumbnail according to the index of the first target thumbnail and the index of the second target thumbnail.

[0267] It should be understood that the manner in which the electronic device obtains the index of the first target thumbnail and the index of the second target thumbnail can refer to the relevant description of step 410 in the foregoing text, and for the sake of brevity, it will not be repeated here.

[0268] It should be understood that the manner in which the electronic device obtains the first target thumbnail and the second target thumbnail can refer to the relevant description of step 420 in the foregoing text.

[0269] Based on the embodiment of the present application, the electronic device can obtain the first target thumbnail according to the index of the first target thumbnail, and obtain the second target thumbnail according to the index of the second target thumbnail, so that the electronic device can quickly obtain the thumbnails.

[0270] In some embodiments, before responding to the first operation, the method 600 may further include:

[0271] For a thumbnail of a target size, the electronic device creates a target file for storing the thumbnail of the target size, wherein the target file has a continuous storage space of a first target size;

[0272] When storing the thumbnail of the target size, the electronic device writes the thumbnail of the target size into the continuous storage space of the target file according to the index information of the target file.

[0273] It should be understood that the target file can be Figure 5 A file described in for storing thumbnails.

[0274] See also Figure 8 , the first target size can be Figure 8 The preset size in, for example, can be the size of the storage space corresponding to index 1 to index P.

[0275] Continue to see Figure 8 When storing thumbnails, the electronic device can write the thumbnails into the continuous storage space of the target file according to the index.

[0276] Based on the embodiment of the present application, for thumbnails of target size, the electronic device can be used to store a target file of the thumbnail, and the target file has a continuous storage space. When storing thumbnails of target size, the electronic device stores them in the continuous storage space of the target file.

[0277] In this way, when storing multiple thumbnails, the electronic device can realize continuous storage of the thumbnails, avoiding scattered storage of the multiple thumbnails, so that when the thumbnails need to be read later, the thumbnails can be read continuously, thereby improving the speed of reading thumbnails.

[0278] In some embodiments, the electronic device writes the thumbnail of the target size into the continuous storage space of the target file according to the index information of the target file, including:

[0279] The electronic device determines the next available storage space in the continuous storage space according to the index information;

[0280] The electronic device writes the thumbnail of the target size into the next available storage space.

[0281] For example, see Figure 8 , assuming that the storage spaces corresponding to indexes 1 to 7 in the current target file are all occupied, when there is a new thumbnail, the electronic device can determine through the index information that the next available storage space is the storage space corresponding to index 8, then the electronic device can store the new thumbnail in the storage space corresponding to index 8.

[0282] Based on the embodiment of the present application, the target file may have index information, so that when the electronic device stores thumbnails, it can query the next available storage space through the index information and store the thumbnail in the next available storage space, thereby achieving continuous storage of thumbnails.

[0283] In some embodiments, the electronic device allocates the same storage space for thumbnails of the same target size.

[0284] For example, see Figure 8 , the storage space corresponding to each index is the same. In this way, when the electronic device stores thumbnails, the rules are relatively simple, and the thumbnails only need to be written into a storage space of a fixed size.

[0285] Based on the embodiments of the present application, the electronic device allocates the same storage space for thumbnails of the same target size, which can improve the performance of the electronic device in reading thumbnails.

[0286] In some embodiments, the method 600 may further include:

[0287] When the continuous storage space of the target file is full, the electronic device allocates continuous storage space of a second target size to the target file.

[0288] Exemplarily, the second target size may be M times the first target size, where M is a positive integer.

[0289] It should be understood that the continuous storage space of the first target size and the continuous storage space of the second target size may be continuous or discontinuous.

[0290] For example, see Figure 8 When the continuous storage space of the first target size is full, the electronic device can continue to allocate continuous storage space of the second target size to it, such as the index corresponding to the continuous storage space of the first target size is index 1 to index P, and the index corresponding to the continuous storage space of the second target size is index K to index Q.

[0291] Based on the embodiment of the present application, when the continuous storage space of the target file is full, the electronic device continues to allocate continuous storage space of the second target size for the target file, so that the thumbnails stored subsequently can also be stored continuously.

[0292] In some embodiments, the storage format of the second target thumbnail includes a bitmap or a texture.

[0293] It is understandable that the storage format of the second target thumbnail may also include other storage formats with lower coding compression rates, or other storage formats that do not require coding compression.

[0294] Based on the embodiment of the present application, the storage format of the second target thumbnail includes a bitmap or texture, so that the electronic device does not need to decode when displaying the second target thumbnail, thereby increasing the speed at which the electronic device displays thumbnails and avoiding the phenomenon of displaying white blocks.

[0295] In some embodiments, the first operation is an operation for triggering the electronic device to display a thumbnail of a first target size, the first target size is the size of the first target thumbnail, and the method 600 further includes:

[0296] In response to a second operation for causing the electronic device to display a thumbnail of the target picture, the electronic device acquires a second target thumbnail, wherein the second operation is an operation for triggering the electronic device to display a thumbnail of a second target size, the second target size is a size of the second target thumbnail, and the second target size is smaller than the first target size;

[0297] The electronic device displays the second target thumbnail in the display area.

[0298] For example, the first target size may be 256*256, and the second target size may be 128*128 or 64*64, etc.

[0299] Exemplarily, the second operation may be an operation in which the user clicks on the gallery, and when the electronic device last exited the gallery, the size of the thumbnail of the target picture displayed in the gallery was the same as the size of the second target thumbnail. Alternatively, the second operation may also be an operation in which the user slides up or down in the gallery, and at this time, the size of the thumbnail of the target picture displayed in the gallery is the same as the size of the second target thumbnail. Alternatively, the second operation may also be an operation in which when the gallery displays a thumbnail of the first target size, the user slides with two fingers to reduce the thumbnail.

[0300] Based on the embodiment of the present application, in response to the second operation of causing the electronic device to display a thumbnail of the second target size, the electronic device can obtain the second target thumbnail and directly display the second target thumbnail, thereby increasing the speed at which the electronic device displays thumbnails and avoiding displaying white blocks.

[0301] In some embodiments, the method 600 further includes:

[0302] In the case where the decoding of the first target thumbnail is not completed and it is determined that the first target thumbnail does not need to be displayed further, the decoding operation on the first target thumbnail is canceled.

[0303] Based on the embodiment of the present application, when the decoding of the first target thumbnail is not completed, the electronic device cancels the decoding operation on the first target thumbnail when it determines that the first target thumbnail does not need to be displayed. This technical solution can avoid decoding the first target thumbnail when the first target thumbnail does not need to be displayed, thereby saving power consumption of the electronic device.

[0304] In some embodiments, the electronic device determines that it is not necessary to continue to display the first target thumbnail, including:

[0305] When the electronic device no longer displays the display area, the electronic device determines that it is not necessary to continue displaying the first target thumbnail.

[0306] The electronic device no longer displays the display area, which may include that the electronic device needs to display other thumbnails in response to the user's sliding operation; or the electronic device responds to the user's operation of exiting the gallery, etc.

[0307] Based on the embodiment of the present application, the electronic device can determine whether it needs to continue displaying the first target thumbnail.

[0308] Fig.13 is a schematic block diagram of an electronic device provided in an embodiment of the present application. Fig.13As shown, the electronic device 700 may include one or more processors 710; one or more memories 720; the one or more memories 720 store one or more instructions, and when the instructions are executed by the one or more processors 710, the thumbnail display method described in any possible implementation method described above is executed.

[0309] For example, the electronic device 700 may be the electronic device 100, Figure 4 Electronic equipment, etc.

[0310] The electronic device 700 can be used to execute the method 300, method 400, method 500, method 600, etc. mentioned above.

[0311] An embodiment of the present application also provides a device, including a processor and a communication interface, the communication interface is used to receive a signal and transmit the signal to the processor, the processor processes the signal so that the thumbnail display method described in any possible implementation method described above is executed.

[0312] The device may be a chip. For example, the chip may be a chip system or an independent chip.

[0313] An embodiment of the present application also provides a readable storage medium, in which instructions are stored. When the instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the thumbnail display method in the above-mentioned embodiment.

[0314] The embodiment of the present application also provides a program product. When the program product is run on an electronic device, the electronic device executes the above-mentioned related steps to implement the thumbnail display method in the above-mentioned embodiment.

[0315] An embodiment of the present application also provides a thumbnail display device, including a module for implementing the thumbnail display method described in any of the above embodiments.

[0316] In addition, an embodiment of the present application also provides a device, which may specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store instructions, and when the device is running, the processor may execute the instructions stored in the memory so that the device executes the thumbnail display method in the above-mentioned method embodiments.

[0317] Among them, the equipment, readable storage medium, program product or device provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.

[0318] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0319] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0320] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0321] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0322] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0323] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk, or an optical disk.

[0324] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A thumbnail display method, characterized in that: The method is applied to an electronic device, and the method comprises: In response to a first operation that causes the electronic device to display a thumbnail of a target picture, acquiring a first target thumbnail and a second target thumbnail, wherein the first target thumbnail and the second target thumbnail are thumbnails of different sizes of the target picture, and the size of the first target thumbnail is larger than the size of the second target thumbnail; Displaying the second target thumbnail in a display area for displaying thumbnails of the target pictures; Decoding the first target thumbnail; After the decoding of the first target thumbnail is completed, the second target thumbnail in the display area is replaced with the first target thumbnail.

2. The method according to claim 1, characterized in that When the electronic device stores the first target thumbnail and the second target thumbnail, the encoding compression rate of the first target thumbnail is greater than the encoding compression rate of the second target thumbnail; Alternatively, the first target thumbnail is stored in a format that requires encoding compression, and the second target thumbnail is stored in a format that does not require encoding compression.

3. The method according to claim 1 or 2, characterized in that: In response to a first operation of causing the electronic device to display a thumbnail of a target picture, acquiring the first target thumbnail and the second target thumbnail comprises: In response to the first operation, obtaining an index of the first target thumbnail and an index of the second target thumbnail; The first target thumbnail and the second target thumbnail are acquired according to the index of the first target thumbnail and the index of the second target thumbnail.

4. The method according to any one of claims 1 to 3, characterized in that Before responding to the first operation, the method further includes: For a thumbnail of a target size, creating a target file for storing the thumbnail of the target size, wherein the target file has a continuous storage space of a first target size; When storing the thumbnail of the target size, the thumbnail of the target size is written into the continuous storage space of the target file according to the index information of the target file.

5. The method according to claim 4, characterized in that Writing the thumbnail of the target size into the continuous storage space of the target file according to the index information of the target file includes: Determine the next available storage space in the continuous storage space according to the index information; The thumbnail of the target size is written into the next available storage space.

6. The method according to claim 5, characterized in that The electronic device allocates the same storage space to thumbnails of the same target size.

7. The method according to any one of claims 4 to 6, characterized in that: The method further comprises: When the continuous storage space of the target file is full, a continuous storage space of a second target size is allocated to the target file.

8. The method according to any one of claims 1 to 7, characterized in that The storage format of the second target thumbnail includes a bitmap or a texture.

9. The method according to any one of claims 1 to 8, characterized in that The first operation is an operation for triggering the electronic device to display a thumbnail of a first target size, the first target size is the size of the first target thumbnail, and the method further includes: In response to a second operation that causes the electronic device to display a thumbnail of a target picture, acquiring the second target thumbnail, wherein the second operation is an operation for triggering the electronic device to display a thumbnail of a second target size, the second target size is a size of the second target thumbnail, and the second target size is smaller than the first target size; The second target thumbnail is displayed in the display area.

10. The method according to any one of claims 1 to 9, characterized in that The method further comprises: In the case where the decoding of the first target thumbnail is not completed and it is determined that the first target thumbnail does not need to be displayed further, the decoding operation on the first target thumbnail is canceled.

11. The method according to claim 10, characterized in that The determining that the first target thumbnail does not need to be displayed further includes: When the electronic device no longer displays the display area, it is determined that there is no need to continue displaying the first target thumbnail.

12. An electronic device, characterized in that: include: one or more processors; One or more memories; the one or more memories store one or more programs, and when the one or more programs are executed by one or more processors, the thumbnail display method as described in any one of claims 1-11 is executed.

13. A chip, characterized in that: The chip includes a processor and a communication interface, wherein the communication interface is used to receive a signal and transmit the signal to the processor, and the processor processes the signal so that the thumbnail display method according to any one of claims 1 to 11 is executed.

14. A readable storage medium, characterized in that: The readable storage medium stores instructions, and when the instructions are executed on the electronic device, the thumbnail display method according to any one of claims 1 to 11 is executed.

15. A program product, characterized in that The program product includes a program code, and when the program code is run on an electronic device, the thumbnail display method according to any one of claims 1 to 11 is executed.

Citation Information

Patent Citations

  • Picture display method and device and mobile terminal

    CN106681667A

  • Picture display method, electronic equipment and computer storage medium

    CN116107479A

  • Picture viewing method and device

    CN117311885A

  • Method and apparatus for displaying an image

    EP2557562A1

Cited By

  • Thumbnail display method and electronic device

    EP4734535A1

  • Thumbnail display method and electronic device

    WO2025157210A1

  • Thumbnail display method and related apparatus

    WO2026103628A1

  • Picture display method and electronic device

    WO2026144583A1