Method for managing thumbnails and related apparatus

The thumbnail service uniformly manages and stores the thumbnails of the original image, which solves the problem of multiple thumbnails occupying storage space and repeated decoding increasing power consumption on electronic devices, achieving the effect of saving storage space and reducing power consumption.

WO2024179306A1PCT designated stage expired Publication Date: 2024-09-06HUAWEI TECH CO LTD

Patent Information

Application Number
PCT/CN2024/077390
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-01
Filing Date
2024-02-18
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

Multiple applications on electronic devices generate multiple thumbnails for the same original image, resulting in a waste of storage space, and repeated decoding and downsampling increase power consumption.

Method used

The thumbnail service manages and stores the thumbnails of the original image in a unified manner. Applications do not need to cache thumbnails, reducing decoding and downsampling operations and reducing power consumption.

Benefits of technology

Save storage space, reduce power consumption of electronic devices, and improve thumbnail acquisition speed and display performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024077390_06092024_PF_FP
    Figure CN2024077390_06092024_PF_FP
Patent Text Reader

Abstract

The present application provides a method for managing thumbnails and a related apparatus. One or more applications are installed in an electronic device. The method comprises: in response to an operation by a user on a first application, the first application invokes a thumbnail service; in response to the invoking by the first application, the thumbnail service acquires an address identifier, which exists in a storage space, of a first thumbnail corresponding to a first original image; the thumbnail service returns the address identifier of the first thumbnail to the first application; and the first application displays the first thumbnail. Thumbnails of original images on the electronic device are uniformly managed and stored by means of the thumbnail service, and applications do not need to cache thumbnails, which can save storage space on the electronic device and overcome the problem of wasting storage space.
Need to check novelty before this filing date? Find Prior Art

Description

Method and related device for managing thumbnails

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 1, 2023, with application number 202310232085.5 and application name “Method and Related Device for Managing Thumbnails”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of terminal technology, and in particular to a method and related apparatus for managing thumbnails. Background Art

[0003] Currently, some applications (APPs) on electronic devices have the permission to access the original images of the electronic devices. When the application accesses the original images, if the application does not cache the thumbnails of the original images, the application will decode and downsample the original images, generate thumbnails of these original images, cache these thumbnails, and then read these thumbnails.

[0004] In this thumbnail management method, applications that can directly or indirectly access the original image will cache the thumbnail corresponding to the original image. As the number of applications on electronic devices with direct or indirect access to the original image of the electronic device increases, the electronic device may store multiple thumbnails corresponding to the same original image. For the electronic device, multiple thumbnails corresponding to the same original image occupy a large amount of storage space, resulting in a waste of storage space.

[0005] Summary of the Invention

[0006] The present application provides a method and related apparatus for managing thumbnails in order to improve the problem of wasting storage space.

[0007] In a first aspect, the present application provides a method for managing thumbnails, which can be performed by an electronic device, or by a component configured in the electronic device (such as a chip, a chip system, etc.), or by a logic module or software capable of implementing all or part of the functions of the electronic device, which is not limited by the present application. The electronic device has one or more applications installed.

[0008] Exemplarily, the method includes: in response to a user operation on a first application, the first application calls a thumbnail service; in response to the call of the first application, the thumbnail service obtains an address identifier of a first thumbnail corresponding to the first original image in a storage space; the thumbnail service returns the address identifier of the first thumbnail to the first application.

[0009] Based on the above scheme, the thumbnails of the original images on the electronic device are uniformly managed and stored through the thumbnail service, that is, the electronic device uniformly caches the thumbnails, and the application does not need to cache the thumbnails, which can save storage space on the electronic device and improve the problem of wasted storage space. In addition, applications on the electronic device that have direct or indirect access to the original image can obtain the address identifier of the thumbnail by calling the thumbnail service, reducing the number of operations such as decoding and downsampling of the original image by the electronic device, reducing the power consumption of the electronic device, and improving the power consumption problem. For example, since the application no longer needs to cache thumbnails, when the storage space on the electronic device is insufficient, the user will not clear the thumbnails cached by the electronic device when clearing the cache of the application. After clearing the cache of the application, when the application obtains the thumbnail, the electronic device does not need to perform the steps of generating thumbnails and caching thumbnails again. Therefore, reducing the number of operations such as decoding and downsampling of the original image by the electronic device can reduce the power consumption of the electronic device, thereby improving the power consumption problem.

[0010] In combination with the first aspect, in some possible implementations, before the thumbnail service obtains the address identifier of the first thumbnail corresponding to the first original image in the storage space, the method further includes: the thumbnail service determines whether the address identifier of the first thumbnail exists.

[0011] It is understood that if the electronic device has the first thumbnail cached, the address identifier of the first thumbnail will be present; if the electronic device has not cached the first thumbnail, the address identifier of the first thumbnail will not be present. In other words, the thumbnail service can determine whether the electronic device has cached the first thumbnail by determining whether the address identifier of the first thumbnail exists.

[0012] In combination with the first aspect, in some possible implementations, in response to the call of the first application, the thumbnail service corresponds to the address identifier of the first thumbnail of the first original image in the storage space, including: in response to the call of the first application, in the absence of the address identifier of the first thumbnail, the thumbnail service generates the first thumbnail based on the first original image; the thumbnail service saves the first thumbnail to the storage space to obtain the address identifier of the first thumbnail; or, in response to the call of the first application, in the presence of the address identifier of the first thumbnail, the thumbnail service reads the address identifier of the first thumbnail from the storage space.

[0013] In conjunction with the first aspect, in some possible implementations, the method further includes: detecting a user operation on a second application in the electronic device, where the operation may be launching the second application or opening an interface of the second application. After the interface is opened, the first thumbnail may be displayed. Accordingly, the second application calls the thumbnail service. In response to the call by the second application, the thumbnail service obtains the address identifier of the first thumbnail; the thumbnail service returns the address identifier of the first thumbnail to the second application; and the second application displays the first thumbnail.

[0014] In a second aspect, the present application provides a method for managing thumbnails, which can be performed by an electronic device, or by a component configured in the electronic device (such as a chip, a chip system, etc.), or by a logic module or software that can implement all or part of the functions of the electronic device, which is not limited by the present application. One or more applications are installed in the electronic device.

[0015] Exemplarily, the method includes: in response to a user's operation on a first application, the first application calls a thumbnail storage module; in response to the call of the first application, the thumbnail storage module determines whether there is an address identifier of a first thumbnail corresponding to the first original image; in a case where the address identifier of the first thumbnail exists, the thumbnail storage module returns the address identifier of the first thumbnail to the first application; or, in a case where the address identifier of the first thumbnail does not exist, the thumbnail storage module returns an indicator to the first application, which is used to indicate that there is no address identifier of the first thumbnail; the first application calls a thumbnail service; in response to the call of the first application, the thumbnail service obtains the address identifier of the first thumbnail in the storage space; the thumbnail service returns the address identifier of the first thumbnail to the first application; the first application displays the first thumbnail.

[0016] The thumbnail storage module is deployed in the application layer of the operating system of the electronic device, and the thumbnail service is deployed in the framework layer of the operating system of the electronic device. The thumbnail service also includes the thumbnail storage module.

[0017] Based on the above scheme, the thumbnails of the original images on the electronic device are uniformly managed and stored through the thumbnail service, that is, the electronic device uniformly caches the thumbnails, and the application does not need to cache the thumbnails, which can save storage space on the electronic device and improve the problem of wasting storage space. Furthermore, the application layer on the electronic device is deployed with a thumbnail storage module. When the first thumbnail is cached in the electronic device, the first application can directly read the first thumbnail from the preset storage space through the thumbnail storage module of the application layer, without having to call the thumbnail service across layers to obtain the first thumbnail, so that the first application can read the thumbnail more conveniently and efficiently, which can save the time spent on reading thumbnails across layers, improve the performance of reading thumbnails, and improve the display delay problem of thumbnails. In addition, applications on the electronic device that have direct or indirect access to the original image can obtain the address identifier of the thumbnail by calling the thumbnail service, reducing the number of operations such as decoding and downsampling of the original image by the electronic device, reducing the power consumption of the electronic device, and improving the power consumption problem. For example, since the application no longer needs to cache thumbnails, when the storage space on the electronic device is insufficient, the user will not clear the thumbnails cached by the electronic device when clearing the application cache. After clearing the application cache, when the application obtains thumbnails, the electronic device does not need to perform the steps of generating thumbnails and caching thumbnails again. Therefore, reducing the number of operations such as decoding and downsampling of the original image by the electronic device can reduce the power consumption of the electronic device, thereby improving the power consumption problem.

[0018] In combination with the second aspect, in some possible implementations, in response to a call from the first application, the thumbnail service obtains the address identifier of the first thumbnail in the storage space, including: in response to a call from the first application, the thumbnail service generates the first thumbnail based on the first original image; the thumbnail service saves the first thumbnail to the storage space to obtain the address identifier of the first thumbnail.

[0019] In combination with the second aspect, in some possible implementations, the method further includes: detecting a user operation on a second application in the electronic device, which operation may be to start the second application or open an interface of the second application. After the interface is opened, the first thumbnail can be displayed. Accordingly, the second application calls the thumbnail storage module. In response to the call of the second application, the thumbnail storage module determines whether there is an address identifier of the first thumbnail; and, in the case that the address identifier of the first thumbnail exists, the thumbnail storage module returns the address identifier of the first thumbnail to the second application; or, in the case that the address identifier of the first thumbnail does not exist, the thumbnail storage module returns the above-mentioned indicator to the second application; the second application calls the thumbnail service; in response to the call of the second application, the thumbnail service obtains the address identifier of the first thumbnail in the storage space; the thumbnail service returns the address identifier of the first thumbnail to the second application; the second application displays the first thumbnail.

[0020] In combination with the first aspect and the second aspect, in some possible implementations, the above method also includes: when the electronic device is in a sleep state, or when a preset trigger time is reached, the thumbnail service detects whether there is an address identifier of the corresponding second thumbnail for the second original image currently stored in the electronic device; if there is no address identifier of the second thumbnail, the thumbnail service generates a second thumbnail based on the second original image; the thumbnail service saves the second thumbnail to a storage space to obtain the address identifier of the second thumbnail.

[0021] The second original image is an original image for which no corresponding thumbnail image is cached in the current electronic device.

[0022] Even in the absence of the first application calling the thumbnail service, the thumbnail service can actively manage thumbnails. In the absence of the address identifier of the second thumbnail, the thumbnail service can generate a second thumbnail after decoding and downsampling the second original image, and can save the second thumbnail to the corresponding folder in the preset storage space to obtain the address identifier of the second thumbnail. Therefore, when the first application calls the thumbnail service, the thumbnail service can return the address identifier of the thumbnail required by the first application to the first application more quickly, thereby increasing the speed at which the first application obtains thumbnails.

[0023] In combination with the first aspect and the second aspect, in some possible implementations, the method further includes: creating an atlas in response to a user's creation operation; wherein the atlas includes at least one original image, and the cover of the atlas is a third thumbnail with a reference flag; the thumbnail service stores the third thumbnail in a storage space; when the electronic device clears the thumbnails in the storage space, the third thumbnail corresponding to the cover is retained based on the reference flag.

[0024] The atlas may be a collection of original images categorized by time, location, user-defined tags, system-defined tags (such as "wonderful moments," "people," "animals," "architecture," etc.), etc. This application does not impose any limitation on this.

[0025] That is to say, for the thumbnails that are automatically set as the cover of the album by the user or the system, the thumbnail management module in the thumbnail service can set reference marks for these thumbnails to avoid the thumbnails being cleared due to aging, or being cleared when the operating system of the electronic device is clearing the cache, to avoid the problem of displaying a blank cover or a black cover due to the clearing of the album cover, thereby helping to improve the user experience.

[0026] In a third aspect, the present application provides an electronic device that can be used to implement the method in the first aspect and any possible implementation of the first aspect, or can be used to implement the method in the second aspect and any possible implementation of the second aspect. The electronic device includes corresponding modules for executing the above methods. The modules included in the electronic device can be implemented in software and / or hardware.

[0027] In a fourth aspect, the present application provides an electronic device comprising at least one processor and at least one communication interface. The processor is coupled to the communication interface and is configured to execute a computer program to implement the method for managing thumbnails in the first aspect and any possible implementation of the first aspect, or to implement the method for managing thumbnails in the second aspect and any possible implementation of the second aspect.

[0028] Optionally, the electronic device further includes a memory, and the processor is coupled to the memory.

[0029] In a fifth aspect, the present application provides a chip system comprising at least one processor for supporting the implementation of the functions involved in the above-mentioned first aspect and any possible implementation method of the first aspect, or for supporting the implementation of the functions involved in the above-mentioned second aspect and any possible implementation method of the second aspect, for example, processing the data involved in the above-mentioned method, etc.

[0030] In one possible design, the chip system also includes a memory, which is used to store program instructions and data. The memory is located inside or outside the processor.

[0031] The chip system can be composed of chips, or can include chips and other discrete devices.

[0032] In a sixth aspect, a computer-readable storage medium is provided, on which a computer program (also referred to as code, or instructions) is stored. When the computer program is run by a computer, the method in the above-mentioned first aspect and any possible implementation of the first aspect is executed, or the method in the above-mentioned second aspect and any possible implementation of the second aspect is executed.

[0033] In a seventh aspect, a computer program product is provided. The computer program product includes a computer program (also referred to as code or instructions), which, when executed, causes the method of the first aspect and any possible implementation of the first aspect to be performed, or causes the method of the second aspect and any possible implementation of the second aspect to be performed.

[0034] It should be understood that the third to seventh aspects of the present application correspond to the technical solutions of the first and second aspects of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] FIG1 is a schematic structural diagram of an electronic device applicable to the method for managing thumbnails provided in an embodiment of the present application;

[0036] FIG2 is a structural block diagram of software of an electronic device applicable to the method for managing thumbnails provided in an embodiment of the present application;

[0037] FIG3 is another structural block diagram of software of an electronic device applicable to the method for managing thumbnails provided in an embodiment of the present application;

[0038] FIG4 is another structural block diagram of software of an electronic device applicable to the method for managing thumbnails provided in an embodiment of the present application;

[0039] FIG5 is a schematic flow chart of a method for managing thumbnails provided in an embodiment of the present application;

[0040] FIG6 is another schematic flowchart of a method for managing thumbnails provided in an embodiment of the present application;

[0041] FIG7 is a schematic flowchart of another method for managing thumbnails provided in an embodiment of the present application. DETAILED DESCRIPTION

[0042] The technical solution in this application will be described below with reference to the accompanying drawings.

[0043] First, in the embodiments of the present application, words such as "first," "second," and "third" are used to distinguish between identical or similar items with substantially the same functions and effects. For example, the first original image and the second original image are used to distinguish different original images, and the first thumbnail, the second thumbnail, and the third thumbnail are used to distinguish different thumbnails, and their order is not limited. Those skilled in the art will understand that words such as "first," "second," and "third" do not limit the quantity or execution order, and words such as "first," "second," and "third" do not necessarily mean that they are different.

[0044] In some examples, the original image may also be referred to as a picture. The thumbnail may be obtained by processing the original image or picture.

[0045] Second, in the embodiments of the present application, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a device, system, product or equipment that includes a series of modules, modules or units is not necessarily limited to those modules, modules or units clearly listed, but may include other modules, modules or units that are not clearly listed or inherent to these devices, systems, products or equipment.

[0046] Third, in the embodiments of this application, "and / or" describes the relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects are in an "or" relationship, but it does not exclude the possibility of indicating an "and" relationship between the associated objects. The specific meaning of the symbol should be understood in the context.

[0047] Fourth, in the embodiments of this application, words such as "exemplarily" and "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts in a concrete manner.

[0048] For ease of understanding, the following is a brief description of the terms involved in this application.

[0049] 1. Thumbnail: A compressed image on a webpage or electronic device, typically containing a hyperlink to the original image. Thumbnails can include large thumbnails (also known as miniature images) and small thumbnails (also known as thumb images). Small thumbnails are smaller than large thumbnails.

[0050] 2. Subsampled: also known as downsampling, can be generally understood as reducing the image and reducing the number of sampling points in the matrix.

[0051] 3. Handle: An identifier used to identify an object or instance. These objects include modules, application instances, windows, controls, bitmaps, Graphics Device Interface (GDI) objects, resources, files, and so on. In other words, a handle uniquely identifies an object or instance. In this embodiment, a handle is used as an address identifier.

[0052] Before describing in detail the method for managing thumbnails provided in an embodiment of the present application, an electronic device applicable to the embodiment of the present application is exemplarily described with reference to FIG. 1 , FIG. 2 and FIG. 3 .

[0053] The thumbnail management method provided in the embodiments of the present application can be applied to electronic devices such as mobile phones, tablet computers, smart watches, wearable devices, in-vehicle devices, laptop computers, personal computers (PCs), ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), and distributed devices. The embodiments of the present application do not impose any restrictions on the specific types of electronic devices.

[0054] In addition, the methods described in the embodiments of the present application can support operating systems such as Android operating system (Android OS), HarmonyOS, and OpenHarmony, but the embodiments of the present application do not impose any limitation on this.

[0055] FIG1 is a schematic structural diagram of an electronic device applicable to the method for managing thumbnails provided in an embodiment of the present application.

[0056] For example, FIG1 shows a schematic structural diagram of an electronic device 100. As shown in FIG1 , 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 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 and a bone conduction sensor 180M, etc.

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

[0058] The application processor outputs sound signals through the audio module 170 (such as the speaker 170A, etc.), or displays images or videos through the display screen 194.

[0059] 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.

[0060] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0061] The processor 110 can perform different operations to implement different functions by executing instructions. The instructions can be, for example, instructions pre-stored in the memory before the device leaves the factory, or instructions read from the APP after the user installs a new APP during use. This embodiment of the application does not impose any restrictions on this.

[0062] In some embodiments, the processor 110 may include one or more interfaces. The interfaces 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 SIM interface, and / or a USB interface.

[0063] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as augmented reality (AR) devices, etc. It will be understood that the interface connection relationship between the modules illustrated in this application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0064] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also provide power to the electronic device 100 via the power management module 141.

[0065] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0066] 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, the baseband processor, and the like.

[0067] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.

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

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

[0070] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with a network and other devices through wireless communication technologies. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wide band code division multiple access (WCDMA), time-division code division multiple access (TD-CDMA), long term evolution (LTE), fifth generation (5G) communication system, BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a BeiDou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0071] Electronic device 100 can implement display functions using a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0072] Display screen 194 , also referred to as a screen, can be used to display images, videos, and the like. Display screen 194 may include a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a mini LED (Mini LED), a micro LED (Micro LED), a micro-OLED (Micro-OLED), a quantum dot light-emitting diode (QLED), and the like. In some embodiments, electronic device 100 may include one or more display screens 194 .

[0073] It should be understood that the display screen 194 may also include additional components, such as a backlight panel and a driver circuit. The backlight panel may be used to provide a light source, and the display panel emits light based on the light provided by the backlight panel. The driver circuit may be used to control whether the liquid crystals in the liquid crystal layer are light-transmissive or light-impermeable.

[0074] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.

[0075] 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. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.

[0076] The internal memory 121 can be used to store computer executable program codes, which 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. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area can store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

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

[0078] It should be understood that the structure illustrated in this application does not constitute a specific limitation on the electronic device 100. In other embodiments, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain 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.

[0079] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The layered architecture divides the software system of the electronic device 100 into several layers, each layer has a clear role and division of labor, and the layers communicate with each other through software interfaces. This application uses operating systems such as HarmonyOS, OpenHarmony, and Android with layered architectures as examples to illustrate the software structure of the electronic device 100. However, this does not limit the type of operating system of the electronic device used in the method for managing thumbnails provided in the embodiments of this application.

[0080] FIG2 is a structural block diagram of software of an electronic device applicable to the method for managing thumbnails provided in an embodiment of the present application.

[0081] As shown in Figure 2, in some embodiments, the operating system is divided into four layers, from top to bottom, namely, the application layer, the framework layer, the system service layer, and the kernel layer. In some embodiments, the electronic device 100 also includes hardware, such as a GPU, a CPU, a display screen, etc.

[0082] The application layer can include a series of applications. As shown in Figure 2, the application layer can include system applications and third-party applications. System applications can be understood as some applications that come with the system, such as camera, gallery (or album), calendar, call, map, Bluetooth, video and music applications. Third-party applications can be understood as non-system applications, which can be downloaded and installed from application stores, etc. The method for managing thumbnails provided in the embodiment of the present application is applicable to third-party applications and system applications that have direct or indirect access to the original image.

[0083] In some implementations, the application layer may also include a thumbnail storage module, which can provide thumbnail-related services for third-party applications and system applications, such as determining whether there are thumbnails required by the application (including third-party applications or system applications), and returning the address identifier of the thumbnail required by the application to the application if there are thumbnails required by the application.

[0084] The framework layer may include a thumbnail service, a user interface (UI) framework, a user program framework, and a component framework. Among them, the thumbnail service can provide thumbnail-related services for third-party applications and system applications, such as obtaining the address identifier of the thumbnail. For a detailed description of the thumbnail service, please refer to the relevant description below. The framework layer provides the operating system's application with a multi-language user program framework and component framework in C, C++, JavaScript (JS), and other languages, as well as a multi-language framework (application programming interface, API) for various software and hardware services to the outside world; at the same time, it provides devices with multi-language UI frameworks in C, C++, JS, and other languages. The APIs supported by different devices are related to the degree of componentization and tailoring of the system.

[0085] The system service layer can include the system basic capability subsystem set, the basic software service subsystem set, the enhanced software service subsystem set, and the hardware service subsystem set. The system service layer is the core capability set of the operating system and provides services to applications through the framework layer.

[0086] Among them, the system basic capability subsystem set can be composed of subsystems such as distributed soft bus and distributed data management. The system basic capability subsystem set can provide basic capabilities for the operation, scheduling, migration and other operations of distributed applications on multiple devices.

[0087] The basic software service subsystem set can be composed of event notification, telephone, multimedia and other subsystems, and can provide public and general software services.

[0088] The enhanced software service subsystem set can be composed of subsystems such as smart screen proprietary business, wearable proprietary business, and Internet of Things (IoT) proprietary business, and can provide differentiated capability-enhanced software services for different devices.

[0089] The hardware service subsystem set can be composed of subsystems such as location services, biometric recognition, wearable proprietary hardware services, IoT proprietary hardware services, etc., and can provide hardware services.

[0090] It should be noted that, depending on the deployment environment of different device forms, the basic software service subsystem set, the enhanced software service subsystem set, and the hardware service subsystem set can be tailored at the subsystem granularity, and each subsystem can be tailored at the functional granularity. This embodiment of the application does not impose any limitation on this.

[0091] The kernel layer includes the kernel subsystem and the driver subsystem. The operating system can adopt a multi-kernel design. Based on the kernel subsystem, the operating system supports the selection of appropriate OS kernels for different resource-constrained devices. The kernel abstraction layer (KAL) shields the differences between multiple kernels and provides basic kernel capabilities to the upper layer, including process / thread management, memory management, file system, network management, and peripheral management. The driver framework in the driver subsystem is the foundation of the open operating system hardware ecosystem, providing unified peripheral access capabilities and a driver development and management framework.

[0092] In an embodiment of the present application, as shown in FIG2 , the electronic device may include a thumbnail service so that the electronic device has the ability to implement the method for managing thumbnails provided in the present application.

[0093] FIG3 is a structural block diagram of software of another electronic device applicable to the method for managing thumbnails provided in an embodiment of the present application.

[0094] As shown in FIG3 , in some embodiments, the Android operating system is divided from top to bottom into an application layer, an application framework layer, an Android runtime (Android runtime), a system library, and a kernel layer.

[0095] In some embodiments, the electronic device 100 also includes hardware, such as a GPU, a CPU, a display screen, etc.

[0096] The application layer can include a series of applications. As shown in Figure 3, the application layer can include system applications and third-party applications. System applications can be understood as some applications that come with the system, such as camera, gallery, calendar, call, map, Bluetooth, video and music applications. Third-party applications can be understood as non-system applications that can be downloaded and installed from application stores, etc. The method for managing thumbnails provided in the embodiment of the present application is applicable to third-party applications and system applications that have direct or indirect access to the original image.

[0097] In some implementations, the application layer may also include a thumbnail storage module, which can provide thumbnail-related services for third-party applications and system applications, such as determining whether there are thumbnails required by the application (including third-party applications or system applications), and returning the address identifier of the thumbnail required by the application to the application if there are thumbnails required by the application.

[0098] The application framework layer provides an API and programming framework for the applications in the application layer. The application framework layer includes some predefined functional functions. As shown in Figure 3, the thumbnail service, etc. The embodiment of the present application does not impose any restrictions on this. Among them, the thumbnail service can respond to calls from third-party applications and system applications and provide related services related to thumbnails for third-party applications and system applications, such as obtaining the address identifier of the thumbnail. For a detailed description of the thumbnail service, please refer to the relevant description below.

[0099] The Android runtime can include core libraries and a virtual machine. The Android runtime is responsible for scheduling and management of the Android operating system.

[0100] The core library can contain two parts: one part is the functional functions that need to be called by the Java language, and the other part is the core library of the Android operating system.

[0101] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0102] Not shown in Figure 3 , the system library may include multiple functional modules, such as a status monitoring service, a surface manager, media libraries, a 3D graphics processing library (e.g., OpenGL ES), and a 2D graphics engine (e.g., SGL).

[0103] The kernel layer is the layer between hardware and software. Not shown in Figure 3, the kernel layer may include power management services, sensor services (also known as sensor drivers), display services (also known as display drivers), camera drivers, audio drivers, etc. This embodiment of the application does not impose any restrictions on this.

[0104] In an embodiment of the present application, as shown in FIG3 , the electronic device may include a thumbnail service so that the electronic device has the ability to implement the method for managing thumbnails provided in the present application.

[0105] It should be understood that FIG1 , FIG2 and FIG3 are merely examples and should not limit the embodiments of the present application in any way.

[0106] Currently, some applications on electronic devices have the authority to directly or indirectly access the original images of the electronic device. When an application accesses the original image, if the application does not cache the thumbnail of the original image, the application will decode and downsample the original image, generate thumbnails of the original image, cache these thumbnails, and then read these thumbnails. In this method of managing thumbnails, if there are multiple applications on the electronic device that have the authority to directly or indirectly access the original image of the electronic device, these multiple applications will decode and downsample the original image to generate thumbnails of the original image, and cache these thumbnails.

[0107] For electronic devices, multiple thumbnails corresponding to the same original image occupy a large amount of storage space, resulting in a waste of storage space. In addition, with the increasing number of applications on electronic devices that have direct or indirect access to original images, electronic devices will repeatedly perform operations such as decoding and downsampling on the same original image, which increases the power consumption of electronic devices and causes serious power consumption.

[0108] In response to the above problems, the embodiments of the present application provide a method and related apparatus for managing thumbnails, which uniformly manage and store thumbnails of original images on electronic devices through a thumbnail service. That is, electronic devices uniformly cache thumbnails, and applications do not need to cache thumbnails, which can save storage space on electronic devices and improve the problem of wasted storage space. In addition, applications on electronic devices that have direct or indirect access to original images can obtain the address identifier of the thumbnail by calling the thumbnail service, reducing the number of operations such as decoding and downsampling of the original image by the electronic device, reducing the power consumption of the electronic device, and improving the power consumption problem. For example, the above-mentioned applications that can directly or indirectly access the original image may include but are not limited to instant messaging applications, shopping applications, game community applications, or video applications.

[0109] Before introducing the method for managing thumbnails provided by the present application, the software architecture of an electronic device applicable to the method for managing thumbnails provided by the present application is described again.

[0110] FIG4 is a structural block diagram of software of another electronic device applicable to the method for managing thumbnails provided in an embodiment of the present application.

[0111] This application mainly makes some improvements to the architecture layer of the operating system of the electronic device. As shown in Figure 4, taking Android as an example, a thumbnail service is deployed in the framework layer. The thumbnail service can include an open layer API, a thumbnail normalization storage module (which can be simply referred to as a thumbnail storage module) and a thumbnail normalization management module (which can be simply referred to as a thumbnail management module).

[0112] The open layer API may include the Android Open Source Project (AOSP) API and the Media Library API. The AOSP API includes, but is not limited to, media storage and interfaces for functions such as bitmaps, images, and metadata. The Media Library API is an enhanced interface customized based on the thumbnail service in an embodiment of the present application. Application layer applications (including system applications and third-party applications) can call the AOSP API and / or the Media Library API.

[0113] The thumbnail storage module can provide efficient thumbnail deduplication capabilities. For a detailed description, please refer to the relevant description below.

[0114] The thumbnail management module can interact with some synchronization services for data, such as the cloud gallery synchronization service and the home data center (HDC) synchronization service. It can generate thumbnails based on the original images stored in local galleries (galleries on electronic devices), cloud galleries, home storage galleries, distributed galleries, etc., and store the generated thumbnails in corresponding file systems, such as the local file system, distributed file system and other file systems shown in Figure 4.

[0115] In some implementations, the thumbnail management module may also provide an aging mechanism and other management capabilities for thumbnails. Detailed descriptions can be found in the following related descriptions.

[0116] It should be noted that two methods of deploying the thumbnail storage module are provided in this application. The following describes these two methods of deploying the thumbnail storage module in detail.

[0117] The first deployment method is: the thumbnail storage module is deployed in the thumbnail service of the framework layer.

[0118] In some possible implementations, for example, as shown in FIG4 , the thumbnail storage module is deployed only in the thumbnail service of the framework layer.

[0119] The second deployment method is: the thumbnail storage module is repeatedly deployed in the application layer and the framework layer.

[0120] In some possible implementations, for example, the application layer shown in FIG2 is deployed with a thumbnail storage module, and the framework layer is deployed with a thumbnail service, which includes a thumbnail storage module. Therefore, for electronic devices, the thumbnail storage module is deployed repeatedly.

[0121] In some other possible implementations, for example, the application layer shown in FIG3 is deployed with a thumbnail storage module, and the application framework layer is deployed with a thumbnail service. For electronic devices, the thumbnail storage module is deployed repeatedly.

[0122] The two deployment modes of the thumbnail storage module correspond to two methods of managing thumbnails. The two methods are described in detail below with reference to FIG. 5 and FIG. 7 .

[0123] The following first describes a method for managing thumbnails in accordance with the first deployment method of the thumbnail storage module in conjunction with FIG. 5 .

[0124] FIG5 is a schematic flowchart of a method for managing thumbnails provided in an embodiment of the present application.

[0125] As shown in Figure 5, method 500 may include steps 510 to 540. The steps of method 500 may be performed by an electronic device, or the method 500 may be performed by a component (such as a chip, a chip system, etc.) configured in the electronic device, or may be implemented by a logic module or software that can implement all or part of the functions of the electronic device, which is not limited in the embodiments of the present application.

[0126] The electronic device may have a structure as shown in Figure 1, Figure 2, Figure 3 or Figure 4, which is not limited in the present embodiment.

[0127] Step 510: In response to a user operation on the first application, the first application calls a thumbnail service.

[0128] It is understood that one or more applications may be installed on an electronic device, and these one or more applications may have direct or indirect access to the original image of the electronic device. In the embodiment of the present application, the above-mentioned applications that can directly or indirectly access the original image may include but are not limited to instant messaging applications, shopping applications, game community applications, or video applications.

[0129] For ease of explanation, any one of the one or more applications on the electronic device that have permission to access the original image is recorded as the first application.

[0130] The first application may interact with the thumbnail service to read the thumbnail.

[0131] In some examples, the first application may include an application such as a gallery or an album. In response to a user opening the gallery or album, the application such as the gallery or album may call a thumbnail service in the electronic device to read a thumbnail corresponding to the original image.

[0132] In other examples, the first application may also include other applications besides the gallery or album, such as camera, file manager and other applications. These applications can directly or indirectly access the original image, and these applications can call the thumbnail service in response to the user's operation to read the thumbnail corresponding to the original image.

[0133] It is understandable that the gallery, photo album, camera and file manager are all system applications on the electronic device. The first application may also include some third-party applications, which are not listed here in this application.

[0134] Step 520: In response to the call of the first application, the thumbnail service obtains the address identifier of the first thumbnail corresponding to the first original image in the storage space.

[0135] For ease of description, in the embodiment of the present application, any original image is referred to as the first original image. The first thumbnail is a thumbnail corresponding to the first original image.

[0136] As mentioned above, the thumbnail service is deployed in the framework layer of the operating system of the electronic device.

[0137] In some examples, the framework layer of the operating system of the electronic device may be the framework layer shown in FIG. 2 , and the thumbnail service may be deployed in the framework layer.

[0138] In other examples, the framework layer of the operating system of the electronic device may be an application framework layer as shown in FIG3 , and the thumbnail service may be deployed in the application framework layer.

[0139] The thumbnail service can uniformly manage the thumbnails on the electronic device and obtain an address identifier (e.g., a handle) of the first thumbnail in a preset storage space, which is open to the one or more applications on the electronic device. In other words, the thumbnail service can generate a first thumbnail based on the first original image, cache the generated first thumbnail based on a preset storage path rule, and obtain a handle for the first thumbnail so that the first application can quickly read the first thumbnail.

[0140] The preset storage path rule corresponds to the preset storage space. The thumbnail service can store the generated thumbnails in the preset storage space through the preset storage path rule. The thumbnail service can also find the cached thumbnails in the preset storage space through the preset storage path rule.

[0141] By way of example and not limitation, the preset storage path rule includes: dividing the last m digits of the key value corresponding to the first original image by n, taking the remainder, and using the remainder as the folder name for storing the first thumbnail of the first original image, where the folder is a folder in the preset storage space. Where m and n are integers greater than or equal to 1. In other words, the thumbnails corresponding to all original images in the electronic device can be stored in the m folders in the preset storage space in a normally distributed manner.

[0142] In this way, the handle of the first thumbnail can be obtained based on the preset storage path rule. As an example and not a limitation, the path of the preset storage space is " / storage / sdcard0 / Pictures / .hwthumbnails / ", then the handle of the first thumbnail can be " / storage / sdcard0 / Pictures / .hwthumbnails / folder name / key value of the first original image.jpeg". It can be understood that "jpeg" is a storage format for pictures and should not impose any limitations on this application. In this application, pictures can also be other storage formats, such as "jpg", "png", "gif", etc., and the embodiments of this application do not impose any limitations on this.

[0143] For example, the key value of the first original image is "Md123", n=3, m=100, and the preset storage space path is " / storage / sdcard0 / Pictures / .hwthumbnails / ", then the handle of the first thumbnail corresponding to the first original image can be " / storage / sdcard0 / Pictures / .hwthumbnails / 23 / Md123.jpeg".

[0144] In a possible implementation, before the thumbnail service obtains the address identifier of the first thumbnail corresponding to the first original image in the storage space, the method 500 further includes: the thumbnail service determining whether the address identifier of the first thumbnail exists.

[0145] That is, the thumbnail service may also determine whether the address identifier of the first thumbnail exists.

[0146] It is understood that if the electronic device has the first thumbnail cached, the address identifier of the first thumbnail will be present; if the electronic device does not have the first thumbnail cached, the address identifier of the first thumbnail will not be present. In other words, the thumbnail service can determine whether the first thumbnail is cached in the electronic device based on the address identifier of the first thumbnail.

[0147] Exemplarily, the thumbnail service can predict the handle of the first thumbnail based on the above-mentioned preset storage path rules, and match it in the folder of the preset storage space based on the predicted handle of the first thumbnail. If the match is successful, the thumbnail service can determine that there is a handle of the first thumbnail, that is, the electronic device stores the first thumbnail; if the match is not successful, the thumbnail service can determine that there is no handle of the first thumbnail, that is, the first thumbnail does not exist.

[0148] In one possible implementation, in response to a call by the first application, the thumbnail service obtains the address identifier of the first thumbnail corresponding to the first original image in the storage space, including: in response to the call of the first application, in the absence of the address identifier of the first thumbnail, the thumbnail service generates the first thumbnail based on the first original image; the thumbnail service saves the first thumbnail to the storage space to obtain the address identifier of the first thumbnail; or, in response to the call of the first application, in the presence of the handle of the first thumbnail, the thumbnail service reads the address identifier of the first thumbnail from the storage space.

[0149] As mentioned above, the thumbnail service can determine whether the handle of the first thumbnail exists.

[0150] If the handle of the first thumbnail exists, the thumbnail service can directly read the handle of the first thumbnail from the preset storage space. In other words, if the thumbnail service can directly read the handle of the first thumbnail from the preset storage space, the thumbnail service can determine that the handle of the first thumbnail exists.

[0151] In the absence of a handle for the first thumbnail, the thumbnail service can generate a first thumbnail after decoding and downsampling the first original image, and based on the above-mentioned preset storage path rules, determine the folder name of the folder used to save the first thumbnail, and then save the first thumbnail to the corresponding folder in the preset storage space to obtain a handle for the first thumbnail.

[0152] Step 530: The thumbnail service returns the address identifier of the first thumbnail to the first application.

[0153] After obtaining the address identifier of the first thumbnail, the thumbnail service may return the handle of the first thumbnail to the first application, so that the first application can read the first thumbnail based on the address identifier of the first thumbnail.

[0154] Step 540: The first application displays the first thumbnail.

[0155] After the thumbnail service returns the address identifier of the first thumbnail to the first application, the first application can read the first thumbnail based on the address identifier of the first thumbnail and display the first thumbnail on the user interface of the first application.

[0156] In one possible implementation, method 500 also includes: in response to a user's operation on a second application in the electronic device, the second application calls the thumbnail service; in response to the call of the second application, the thumbnail service obtains the address identifier of the first thumbnail; the thumbnail service returns the address identifier of the first thumbnail to the second application; and the second application displays the first thumbnail.

[0157] It is understandable that the second application is also an application that has direct or indirect access to the original image, and the second application is not the same application as the first application. The user's operation on the second application can be to start the second application or open an interface of the second application, and the first thumbnail can be displayed after the interface is opened.

[0158] The second application can also interact with the thumbnail service to read the thumbnail. In more detail, the second application can call the thumbnail service in response to the user's operation to read the first thumbnail. The thumbnail service can also obtain the address identifier of the first thumbnail in response to the call of the second application, and then return the address identifier of the first thumbnail to the second application. Thus, the second application can read and display the first thumbnail based on the address identifier of the first thumbnail. For a more detailed description, please refer to the relevant description of the interaction between the first application and the thumbnail service above. For the sake of brevity, it will not be repeated here.

[0159] FIG6 is another schematic flowchart of a method for managing thumbnails provided in an embodiment of the present application.

[0160] For example, as shown in Figure 6, the method for managing thumbnails applicable to the first deployment mode of the thumbnail storage module may also include steps 601 to 611. Steps 601 to 611 in Figure 6 are described below.

[0161] Step 601: The first application calls a system interface to obtain a thumbnail.

[0162] That is, when the first application needs to access the first thumbnail, the first application can call the system interface.

[0163] The system interface may include the AOSP APIs mentioned above. The system interface provides access to related utility classes such as the bitmap factory, media storage, image decoder, and media metadata retriever. It should be noted that these related utility classes may include, but are not limited to, the aforementioned utility classes.

[0164] Step 602: The relevant tool class calls the media interface to obtain the handle of the thumbnail file.

[0165] That is to say, the relevant tool class can call the media interface in response to the access of the first application to obtain the handle of the first thumbnail by accessing the thumbnail service, and then read the data of the first thumbnail based on the handle of the first thumbnail, thereby returning the data of the first thumbnail to the first application.

[0166] Step 603: The thumbnail service determines whether the thumbnail required by the first application is a cloud / HDC image.

[0167] In some examples, the electronic device may determine whether the original image needs to interact with other electronic devices or servers other than the electronic device to perform corresponding operations.

[0168] For example, in response to access to the relevant tool class, the thumbnail service determines whether the thumbnail required by the first application is a thumbnail corresponding to the original image in the cloud library or a thumbnail corresponding to the original image in the HDC.

[0169] In a case where the thumbnail required by the first application is not the thumbnail corresponding to the original image in the cloud image library or the thumbnail corresponding to the original image in the HDC, the thumbnail service may execute step 604 .

[0170] In the case that the thumbnail required by the first application is a thumbnail corresponding to the original image in the cloud library or a thumbnail corresponding to the original image in the HDC, the thumbnail service may execute step 605 .

[0171] Step 604: The thumbnail service returns the handle of the thumbnail of the local gallery to the relevant tool class.

[0172] In this step, the thumbnail service may first determine whether a handle of the first thumbnail exists on the electronic device.

[0173] When the handle of the first thumbnail exists, the thumbnail service returns the handle of the first thumbnail to the related tool class.

[0174] When the handle of the first thumbnail does not exist, the thumbnail service can first generate the first thumbnail based on the original image, and save the generated first thumbnail to the storage space to obtain the handle of the first thumbnail, and then return the handle of the first thumbnail to the above-mentioned tool class.

[0175] Step 605: The thumbnail service determines whether the size of the thumbnail required by the first application is smaller than or equal to the size of the small thumbnail.

[0176] If the size of the thumbnail required by the first application is not smaller than or equal to the size of the small thumbnail, the thumbnail service may execute step 606 .

[0177] In a case where the size of the thumbnail required by the first application is smaller than or equal to the size of the small thumbnail, the thumbnail service may perform step 607 .

[0178] In step 606, the thumbnail service determines whether a large thumbnail is cached in the electronic device.

[0179] The thumbnail service can determine whether a first thumbnail having a size corresponding to the large thumbnail is cached in the electronic device.

[0180] In the case that the electronic device does not cache the first thumbnail with a size corresponding to the large thumbnail, the thumbnail service may execute step 608 .

[0181] In a case where a first thumbnail having a size corresponding to the large thumbnail is cached in the electronic device, the thumbnail service may execute step 609 .

[0182] Step 607: The thumbnail service determines whether there is a small thumbnail cached in the electronic device.

[0183] The thumbnail service can determine whether a first thumbnail having a size corresponding to the small thumbnail is cached in the electronic device.

[0184] In the case that the electronic device does not cache the first thumbnail image having a size corresponding to the small thumbnail image, the thumbnail service may execute step 610 .

[0185] In a case where a first thumbnail having a size corresponding to a small thumbnail is cached in the electronic device, the thumbnail service may execute step 611 .

[0186] Step 608: The thumbnail service downloads the large thumbnail and caches it.

[0187] If the electronic device does not cache the first thumbnail with the size corresponding to the large thumbnail, the thumbnail service can first download the first thumbnail with the size corresponding to the large thumbnail based on the cloud gallery synchronization service / HDC synchronization service and cache it on the electronic device.

[0188] Step 609: The thumbnail service returns the handle of the large thumbnail to the relevant tool class.

[0189] Step 610: The thumbnail service downloads the small thumbnail and caches it.

[0190] If the electronic device does not cache the first thumbnail of the size corresponding to the small thumbnail, the thumbnail service can first download the first thumbnail of the size corresponding to the small thumbnail based on the cloud gallery synchronization service / HDC synchronization service and cache it on the electronic device.

[0191] Step 611: The thumbnail service returns the handle of the small thumbnail to the relevant tool class.

[0192] After obtaining the handle of the first thumbnail that meets the size requirements, the relevant tool class can read the data of the first thumbnail based on the handle of the first thumbnail and return the data of the first thumbnail to the first application so that the first application can obtain the first thumbnail.

[0193] Based on the above solution, thumbnails of original images in the gallery, cloud gallery or HDC gallery on electronic devices are uniformly managed and stored through the thumbnail service. That is, electronic devices uniformly cache thumbnails, and applications do not need to cache thumbnails, which can save storage space on electronic devices and improve the problem of wasted storage space.

[0194] In addition, any application on an electronic device that has direct or indirect access to the original image can obtain the thumbnail handle by calling the thumbnail service, reducing the number of operations such as decoding and downsampling of the original image by the electronic device, reducing the power consumption of the electronic device, and improving power consumption. For example, since the application no longer needs to cache thumbnails, when the storage space on the electronic device is insufficient, the user will not clear the thumbnails cached by the electronic device when clearing the application's cache. After clearing the application's cache, when the application obtains the thumbnail, the electronic device does not need to perform the steps of generating thumbnails and caching thumbnails again. Therefore, reducing the number of operations such as decoding and downsampling of the original image by the electronic device can reduce the power consumption of the electronic device, thereby improving power consumption.

[0195] The following describes a method for managing thumbnails in accordance with the second deployment method of the thumbnail storage module in conjunction with FIG. 7 .

[0196] FIG7 is a schematic flowchart of another method for managing thumbnails provided in an embodiment of the present application.

[0197] As shown in Figure 7, method 700 may include but is not limited to steps 710 to 780. The steps of method 700 may be performed by an electronic device, or the method 700 may be performed by a component configured in the electronic device (such as a chip, a chip system, etc.), or may be implemented by a logic module or software that can implement all or part of the functions of the electronic device, which is not limited in this embodiment of the present application.

[0198] The electronic device may have a structure as shown in Figure 1, Figure 2, Figure 3 or Figure 4, which is not limited in the present embodiment.

[0199] Step 710: In response to a user operation on the first application, the first application calls a thumbnail storage module.

[0200] As mentioned above, the electronic device may have one or more applications installed thereon, and these one or more applications may have the permission to directly or indirectly access the original image of the electronic device. The first application is any one of the one or more applications on the electronic device that have the permission to access the original image.

[0201] The first original image is any original image, and the first thumbnail is a thumbnail corresponding to the first original image.

[0202] For a detailed description of the first application, the first original image, and the first thumbnail, please refer to the relevant description above, which will not be repeated here for the sake of brevity.

[0203] The thumbnail storage module can determine whether there is a handle to the first thumbnail based on a preset storage path rule, that is, the thumbnail storage module can determine whether the first thumbnail is cached in the electronic device.

[0204] The first application may interact with the thumbnail storage module and the thumbnail service to read the thumbnail.

[0205] When the first application on the electronic device needs to access the thumbnail, the first application can call the thumbnail storage module on the electronic device and use the thumbnail storage module to directly check whether there is an address identifier of the first thumbnail in the preset storage space.

[0206] For a detailed description of the preset storage path rules and the preset storage space, please refer to the relevant description above. For the sake of brevity, they will not be repeated here.

[0207] Step 720: In response to the call of the first application, the thumbnail module determines whether there is an address identifier of the first thumbnail.

[0208] In response to the call of the first application, the thumbnail storage module can directly check in the preset storage space based on the preset storage path rule to determine whether there is an address identifier (such as a handle) of the first thumbnail.

[0209] In the case that the address identifier of the first thumbnail exists, the thumbnail storage module may execute step 730 .

[0210] In the case that the address identifier of the first thumbnail does not exist, the thumbnail storage module may execute step 740 .

[0211] Step 730: If the address identifier of the first thumbnail exists, the thumbnail storage module returns the address identifier of the first thumbnail to the first application.

[0212] When there is a handle to the first thumbnail, that is, when the first thumbnail is cached on the electronic device, the thumbnail storage module can directly return the address identifier of the first thumbnail to the first application, so that the first application can read the first thumbnail based on the address identifier of the first thumbnail.

[0213] After executing step 730 , the electronic device may execute step 780 .

[0214] Step 740: In the case that the address identifier of the first thumbnail does not exist, the thumbnail storage module returns an indicator to the first application, where the indicator is used to indicate that the address identifier of the first thumbnail does not exist.

[0215] When there is no address identifier of the first thumbnail, that is, when the first thumbnail is not cached on the electronic device, the thumbnail storage module can return an indicator to the first application to indicate that there is no address identifier of the first thumbnail, and the indicator can be predefined.

[0216] Step 750: The first application calls the thumbnail service.

[0217] After receiving the indicator returned by the thumbnail storage module and indicating that the address identifier of the first thumbnail does not exist, the first application can call the thumbnail service.

[0218] As mentioned above, the thumbnail storage module is deployed in the application layer of the operating system of the electronic device, and the thumbnail service is deployed in the framework layer of the operating system of the electronic device.

[0219] In a possible implementation, the application layer and framework layer of the operating system of the electronic device may be the application layer and framework layer shown in FIG2 , the thumbnail storage module may be deployed in the application layer, and the thumbnail service may be deployed in the framework layer.

[0220] In another possible implementation, the application layer and framework layer of the operating system of the electronic device may be the application layer and application framework layer as shown in FIG3 , the thumbnail storage module may be deployed in the application layer, and the thumbnail service may be deployed in the application framework layer.

[0221] The application layer and framework layer of the electronic device repeatedly deploy thumbnail storage modules. When a first thumbnail is cached in the electronic device, the first application can directly read the first thumbnail from the preset storage space through the thumbnail storage module of the application layer, without having to call the thumbnail service across layers to obtain the first thumbnail, so that the first application can read the thumbnail more conveniently and efficiently, saving the time spent on reading thumbnails across layers and improving the performance of reading thumbnails. Only when the first thumbnail is not cached in the electronic device will the first application call the thumbnail service across layers to obtain the first thumbnail.

[0222] It should be noted that the thumbnail storage module deployed by the application layer and the thumbnail storage module deployed in the thumbnail service of the framework layer can be version-marked to ensure that after the operating system version of the electronic device and / or the third-party application version is updated, the version of the thumbnail storage module deployed by the application layer and the version of the thumbnail storage module deployed in the thumbnail service of the framework layer are the same version, and the preset storage path rules in the thumbnail storage modules of the same version are the same to ensure the effective implementation of this method.

[0223] Step 760: In response to the call of the first application, the thumbnail service obtains the address identifier of the first thumbnail in the storage space.

[0224] If the first thumbnail is not cached in the electronic device, the first application calls the thumbnail service across layers. Accordingly, the thumbnail service can obtain the address identifier of the first thumbnail in the storage space in response to the call of the first application.

[0225] In one possible implementation, in response to a call from the first application, the thumbnail service obtains the address identifier of the first thumbnail in the storage space, including: in response to the call from the first application, the thumbnail service generates the first thumbnail based on the first original image; the thumbnail service saves the first thumbnail to the storage space to obtain the address identifier of the first thumbnail.

[0226] The thumbnail service can generate a first thumbnail after decoding and downsampling the first original image in response to the call of the first application, and determine the folder name of the folder used to save the first thumbnail based on the above-mentioned preset storage path rules, and then save the first thumbnail to the corresponding folder in the preset storage space to obtain the handle of the first thumbnail.

[0227] Step 770: The thumbnail service returns the address identifier of the first thumbnail to the first application.

[0228] For a detailed description, please refer to the above description of step 530, which will not be repeated here for the sake of brevity.

[0229] Step 780: The first application displays the first thumbnail.

[0230] For a detailed description, please refer to the above description of step 540, which will not be repeated here for the sake of brevity.

[0231] In one possible implementation, method 700 also includes: in response to a user's operation on a second application in the electronic device, the second application calls the thumbnail storage module; in response to the call of the second application, the thumbnail storage module determines whether there is an address identifier of the first thumbnail; and, in the case that the address identifier of the first thumbnail exists, the thumbnail storage module returns the address identifier of the first thumbnail to the second application; or, in the case that the address identifier of the first thumbnail does not exist, the thumbnail storage module returns the above-mentioned indicator to the second application; the second application calls the thumbnail service; in response to the call of the second application, the thumbnail service obtains the address identifier of the first thumbnail in the storage space; the thumbnail service returns the address identifier of the first thumbnail to the second application; the second application displays the first thumbnail.

[0232] As mentioned above, the second application is also an application that has direct or indirect access to the original image, and the second application is different from the first application. The user's operation on the second application can be to launch the second application or open an interface of the second application, which can display the first thumbnail after opening.

[0233] The second application may also interact with the thumbnail storage module and the thumbnail service to read the thumbnail. In more detail, the second application can call the thumbnail storage module in response to the user's operation to read the first thumbnail; the thumbnail storage module can determine whether the address identifier of the first thumbnail exists in the storage space in response to the call of the second application; if the address identifier of the first thumbnail exists, the thumbnail storage module returns the address identifier of the first thumbnail to the second application, so that the second application can read and display the first thumbnail based on the address identifier of the first thumbnail; if the address identifier of the first thumbnail does not exist, the thumbnail storage module returns an indicator to the second application indicating that the address identifier of the first thumbnail does not exist, thereby informing the second application that the first thumbnail does not exist, and then the second application can call the thumbnail service. Accordingly, the thumbnail service can obtain the address identifier of the first thumbnail in response to the call of the second application, and then return the address identifier of the first thumbnail to the second application, so that the second application can read and display the first thumbnail based on the address identifier of the first thumbnail. For a more detailed description, please refer to the above description of the interaction between the first application and the thumbnail storage module and the thumbnail service. For the sake of brevity, it will not be repeated here.

[0234] In some possible implementations of Figures 5 to 7 above, the method for managing thumbnails also includes: when the electronic device is in a sleep state, or when a preset trigger time is reached, the thumbnail service detects whether there is an address identifier of the corresponding second thumbnail for the second original image currently stored in the electronic device; if there is no address identifier of the second thumbnail, the thumbnail service generates a second thumbnail based on the second original image; the thumbnail service saves the generated second thumbnail to the storage space to obtain the address identifier of the second thumbnail.

[0235] Even when the first application does not call the thumbnail service, the thumbnail service can actively manage thumbnails. For example, when a preset trigger condition is met, the thumbnail service can actively detect whether there is a corresponding thumbnail handle for the original image currently stored in the electronic device, where the preset trigger condition may include the electronic device being in a dormant state or reaching a preset trigger time.

[0236] Exemplarily, when the electronic device is in a dormant state, or when a preset trigger time is reached, the thumbnail service can proactively determine which original images currently have thumbnail handles corresponding to them and which original images do not have thumbnail handles based on the above-mentioned preset storage path rules and the key value of each original image currently stored in the electronic device. That is, it can determine which original images' thumbnail handles are currently cached by the electronic device and which original images' thumbnails are not cached.

[0237] For ease of description, in an embodiment of the present application, an original image that does not have a corresponding thumbnail cached in the current electronic device is recorded as a second original image, and a thumbnail corresponding to the second original image is recorded as a second thumbnail.

[0238] If the handle to the second thumbnail does not exist, the thumbnail service can generate the second thumbnail by decoding and downsampling the second original image, and based on the above-mentioned preset storage path rules, determine the folder name for storing the second thumbnail. Then, the second thumbnail can be saved to the corresponding folder in the preset storage space to obtain the handle to the second thumbnail. Therefore, when the first application calls the thumbnail service, the thumbnail service can more quickly return the handle of the thumbnail required by the first application to the first application, thereby increasing the speed at which the first application obtains thumbnails.

[0239] As mentioned above, the thumbnail management module in the thumbnail service can also provide a thumbnail aging mechanism.

[0240] That is, the thumbnail management module can periodically clean up some thumbnails that have not been read for a long time. For example, a time threshold can be set. When some thumbnails have not been read for longer than the time threshold (these thumbnails can be called aged thumbnails), the thumbnail management module can first clean up these thumbnails to free up the storage space occupied by these thumbnails. This mechanism can be called a thumbnail aging mechanism. That is, the thumbnail management module can clean up aged thumbnails. As an example and not a limitation, the time threshold can be 10 days, 15 days, one month, three months, six months, etc., and the embodiments of the present application do not impose any limitation on this.

[0241] In some possible implementations of FIG. 5 to FIG. 7 , the third thumbnail that meets the preset condition has a reference mark, and the reference mark is used to indicate that the third thumbnail cannot be cleared.

[0242] As mentioned above, the thumbnail management module can also provide other thumbnail management capabilities. The other thumbnail management capabilities can include providing a protection mechanism for thumbnails that meet preset conditions to avoid being cleaned up.

[0243] For the convenience of description, the thumbnail that meets the preset conditions is recorded as the third thumbnail in this application.

[0244] That is to say, the thumbnail management module in the thumbnail service can determine which thumbnails meet the preset conditions and which thumbnails do not meet the preset conditions, and set reference marks for thumbnails that meet the preset conditions to avoid the thumbnails being cleared due to aging, or being cleared during the process of clearing the cache of the electronic device's operating system.

[0245] In some possible implementations, the preset condition includes: the third thumbnail being set as the cover of the album to which the original image corresponding to the third thumbnail belongs. That is, in some possible implementations, the method for managing thumbnails further includes: creating an album in response to a user's creation operation; wherein the album includes at least one original image, and the cover of the album is the third thumbnail with a reference identifier; the thumbnail service storing the third thumbnail in a storage space; and when the electronic device clears the thumbnails in the storage space, retaining the third thumbnail corresponding to the cover based on the reference identifier.

[0246] It is understandable that the atlas can be a collection of original images categorized by time, location, user-defined tags, system-defined tags (such as "wonderful moments", "people", "animals", "architecture", etc.), etc. This application does not impose any limitation on this.

[0247] An electronic device can create an album in response to a user's creation operation of creating an album. The album includes at least one original image, and the cover of the album is a third thumbnail with a reference mark. When the electronic device clears the thumbnails cached in the storage space, the electronic device can retain the third thumbnail based on the reference mark, that is, the third thumbnail set as the cover of the album will not be cleared.

[0248] That is to say, for the thumbnails that are automatically set as the cover of the album by the user or the system, the thumbnail management module in the thumbnail service can set reference marks for these thumbnails to avoid the thumbnails being cleared due to aging, or being cleared when the operating system of the electronic device is clearing the cache, to avoid the problem of displaying a blank cover or a black cover due to the clearing of the album cover, thereby helping to improve the user experience.

[0249] The thumbnail management module in the thumbnail service can also provide a mechanism for deleting thumbnail references. For example, if thumbnail A was previously set as the cover of an album, the thumbnail management module would assign a reference to it. Later, if the user changes the album cover to thumbnail B, the thumbnail management module can delete the reference to thumbnail A.

[0250] Based on the above solution, thumbnails of original images in the gallery, cloud gallery or HDC gallery on electronic devices are uniformly managed and stored through the thumbnail service. Electronic devices uniformly cache thumbnails, and applications do not need to cache thumbnails, which can save storage space on electronic devices and improve the problem of wasted storage space.

[0251] Furthermore, a thumbnail storage module is deployed in the application layer of the electronic device. When a first thumbnail is cached in the electronic device, the first application can directly read the first thumbnail from the preset storage space through the thumbnail storage module of the application layer, without having to call the thumbnail service across layers to obtain the first thumbnail, so that the first application can read the thumbnail more conveniently and efficiently, saving the time-consuming cross-layer reading of thumbnails, improving the performance of reading thumbnails, and improving the display delay problem of thumbnails.

[0252] In addition, any application on an electronic device that has direct or indirect access to the original image can obtain the thumbnail handle by calling the thumbnail service, reducing the number of operations such as decoding and downsampling of the original image by the electronic device, reducing the power consumption of the electronic device, and improving power consumption. For example, since the application no longer needs to cache thumbnails, when the storage space on the electronic device is insufficient, the user will not clear the thumbnails cached by the electronic device when clearing the application's cache. After clearing the application's cache, when the application obtains the thumbnail, the electronic device does not need to perform the steps of generating thumbnails and caching thumbnails again. Therefore, reducing the number of operations such as decoding and downsampling of the original image by the electronic device can reduce the power consumption of the electronic device, thereby improving power consumption.

[0253] The present application also provides an electronic device including corresponding modules for executing the steps in the embodiments described in Figures 5, 6, or 7. The modules included in the electronic device may be implemented in software and / or hardware.

[0254] An embodiment of the present application also provides an electronic device, which includes a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call and execute the computer program, so that the electronic device performs the steps in the embodiments described in Figures 5, 6 or 7 above.

[0255] The present application also provides a chip system, which includes at least one processor for implementing the functions involved in the steps of the embodiments described in Figures 5, 6 or 7 above.

[0256] In one possible design, the chip system further includes a memory, which is used to store program instructions and data, and the memory is located inside or outside the processor.

[0257] The chip system can be composed of chips, or can include chips and other discrete devices.

[0258] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a computer, the computer is caused to execute the steps in the embodiment described in FIG. 5 , FIG. 6 or FIG. 7 .

[0259] An embodiment of the present application further provides a computer program product, including a computer program. When the computer program is executed, the computer executes the steps in the embodiment described in Figure 5, Figure 6 or Figure 7 above.

[0260] It should be understood that the processor in the embodiments of the present application can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above-mentioned method embodiment can be completed by hardware integrated logic circuits in the processor or by software instructions. The above-mentioned processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above-mentioned method.

[0261] It should also be understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0262] The terms "unit," "module," and the like used in this specification may be used to refer to a computer-related entity, hardware, firmware, a combination of hardware and software, software, or software in execution.

[0263] Those skilled in the art will appreciate that the various illustrative logical blocks and steps described in conjunction with the embodiments disclosed herein can be implemented using 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. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application. In the several embodiments provided in this application, it should be understood that the disclosed devices, equipment, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the module division is only a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not implemented. In addition, the coupling or direct coupling or communication connection shown or discussed can be through some interface, indirect coupling or communication connection of devices or modules, and can be electrical, mechanical, or other forms.

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

[0265] In addition, the functional modules in the various embodiments of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more units may be integrated into one module.

[0266] In the above embodiments, the functions of each functional module can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions (programs). When the computer program instructions (program) are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital versatile disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).

[0267] 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, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment 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 ROM, a RAM, a magnetic disk, or an optical disk.

[0268] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A method for managing thumbnails, characterized in that: Applied to electronic equipment, the method comprises: In response to a user operation on a first application, the first application calls a thumbnail service; In response to the call of the first application, the thumbnail service obtains an address identifier of a first thumbnail corresponding to the first original image in a storage space; The thumbnail service returns the address identifier of the first thumbnail to the first application; The first application displays the first thumbnail.

2. The method according to claim 1, characterized in that Before the thumbnail service obtains the address identifier of the first thumbnail corresponding to the first original image in the storage space, the method further includes: The thumbnail service determines whether an address identifier of the first thumbnail exists.

3. The method according to claim 2, characterized in that The step of obtaining, by the thumbnail service, an address identifier of a first thumbnail corresponding to the first original image in a storage space in response to the call of the first application includes: In response to the call of the first application, in the absence of an address identifier of the first thumbnail, the thumbnail service generates the first thumbnail based on the first original image; The thumbnail service saves the first thumbnail into the storage space to obtain an address identifier of the first thumbnail; or, In response to the call of the first application, if the address identifier of the first thumbnail exists, the thumbnail service reads the address identifier of the first thumbnail from the storage space.

4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: When the electronic device is in a dormant state, or when a preset trigger time is reached, the thumbnail service detects whether there is an address identifier of a corresponding second thumbnail for the second original image currently stored in the electronic device; In the absence of an address identifier of the second thumbnail, the thumbnail service generates the second thumbnail based on the second original image; The thumbnail service saves the second thumbnail into the storage space to obtain an address identifier of the second thumbnail.

5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: In response to a user's operation on a second application in the electronic device, the second application calls the thumbnail service; In response to the call of the second application, the thumbnail service obtains the address identifier of the first thumbnail; The thumbnail service returns the address identifier of the first thumbnail to the second application; The second application displays the first thumbnail.

6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: In response to a creation operation of a user, creating an atlas; wherein the atlas includes at least one original image, and the cover of the atlas is a third thumbnail image with a reference mark; The thumbnail service stores the third thumbnail in the storage space; When the electronic device clears the thumbnails in the storage space, the third thumbnail corresponding to the cover is retained based on the reference mark.

7. A method for managing thumbnails, characterized in that: Applied to electronic equipment, the method comprises: In response to a user operation on a first application, the first application calls a thumbnail storage module; In response to the call of the first application, the thumbnail storage module determines whether there is an address identifier of the first thumbnail corresponding to the first original image; and In the case where the address identifier of the first thumbnail exists, the thumbnail storage module returns the address identifier of the first thumbnail to the first application; or, In the case that the address identifier of the first thumbnail does not exist, the thumbnail storage module returns an indicator to the first application, where the indicator is used to indicate that the address identifier of the first thumbnail does not exist; The first application calls a thumbnail service; In response to the call of the first application, the thumbnail service obtains an address identifier of the first thumbnail in the storage space; The thumbnail service returns the address identifier of the first thumbnail to the first application; The first application displays the first thumbnail.

8. The method according to claim 7, characterized in that The step of obtaining, by the thumbnail service, an address identifier of the first thumbnail in the storage space in response to the call of the first application includes: In response to the call of the first application, the thumbnail service generates the first thumbnail based on the first original image; The thumbnail service saves the first thumbnail into the storage space to obtain an address identifier of the first thumbnail.

9. The method according to claim 7 or 8, characterized in that The method further comprises: When the electronic device is in a dormant state, or when a preset trigger time is reached, the thumbnail service detects whether there is an address identifier of a corresponding second thumbnail for the second original image currently stored in the electronic device; In the absence of an address identifier of the second thumbnail, the thumbnail service generates the second thumbnail based on the second original image; The thumbnail service saves the second thumbnail into the storage space to obtain an address identifier of the second thumbnail.

10. The method according to any one of claims 7 to 9, characterized in that The method further comprises: In response to a user's operation on a second application in the electronic device, the second application calls the thumbnail storage module; In response to the call of the second application, the thumbnail storage module determines whether there is an address identifier of the first thumbnail; and if there is an address identifier of the first thumbnail, the thumbnail storage module returns the address identifier of the first thumbnail to the second application; or, In the case where the address identifier of the first thumbnail does not exist, the thumbnail storage module returns the indicator to the second application; The second application calls the thumbnail service; In response to the call of the second application, the thumbnail service obtains an address identifier of the first thumbnail in the storage space; The thumbnail service returns the address identifier of the first thumbnail to the second application; The second application displays the first thumbnail.

11. The method according to any one of claims 7 to 10, characterized in that The method further comprises: In response to a creation operation of a user, creating an atlas; wherein the atlas includes at least one original image, and the cover of the atlas is a third thumbnail image with a reference mark; The thumbnail service stores the third thumbnail in the storage space; When the electronic device clears the thumbnails in the storage space, the third thumbnail corresponding to the cover is retained based on the reference mark.

12. An electronic device, characterized in that: comprising a processor and a memory, wherein: The memory is used to store computer programs; The processor is configured to call the computer program so that the electronic device executes the method according to any one of claims 1 to 11.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed, the computer is caused to perform the method according to any one of claims 1 to 11.

14. A computer program product, characterized in that The invention comprises a computer program which, when being executed, causes a computer to execute the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Thumbnail management method and related device

    CN118585498A

  • Mobile terminal, picture processing method and picture processing device for mobile terminal

    CN103699673A

  • Method and device for generating thumbnail

    CN106294624A

  • Picture selection method and electronic equipment

    CN112783379A

  • Linking thumbnail of image to web page

    US20160103915A1

Cited By

  • Thumbnail display method and device, equipment and medium

    CN121810847A

  • Thumbnail display method, apparatus, device, and medium

    CN121810847B