Picture display method and related apparatus

By stitching multiple thumbnails into a large image and displaying it using a small number of view controls, the lag issue on electronic devices when displaying a large number of thumbnails is resolved, loading and display performance is improved, and the user experience is enhanced.

WO2025260885A9PCT designated stage Publication Date: 2026-01-22HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/085685
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-06-20
Filing Date
2025-03-28
Publication Date
2026-01-22

AI Technical Summary

Technical Problem

Electronic devices experience lag when displaying a large number of thumbnails, especially in the monthly or yearly view of the gallery. When users quickly swipe or drag the scroll bar, the images may not be fully decoded or created after the view controls are created, resulting in white blocks on the interface and a poor user experience.

Method used

By stitching multiple thumbnails into a large image and using a small number of view controls to hold these large images, the number of I/O interface calls is reduced, improving rendering and display performance.

Benefits of technology

It reduces or eliminates lag on electronic devices when displaying a large number of thumbnails, improves loading and display performance, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025085685_22012026_PF_FP_ABST
    Figure CN2025085685_22012026_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a picture display method and a related apparatus. The method may comprise: first, when storing thumbnails corresponding to captured or saved pictures, an electronic device stores the thumbnails in the order in which the thumbnails are arranged in a thumbnail display interface. In this way, the electronic device has the capability of querying and acquiring thumbnails in batch. Then, when the electronic device displays the thumbnail display interface, the electronic device can query and acquire the thumbnails in batch. The electronic device can stitch the acquired multiple thumbnails together to obtain a stitched thumbnail, then the electronic device can display the stitched thumbnail by means of a view control. By means of the picture display method provided by the present application, the performance and frame rate of an electronic device loading and displaying a large number of thumbnails can be improved, thereby avoiding or reducing the occurrence of white blocks or stuttering in the process of users browsing through a large number of thumbnails.
Need to check novelty before this filing date? Find Prior Art

Description

Picture display method and related device

[0001] The present application claims priority to the Chinese patent application No. 202410808432.9, filed on June 20, 2024, and entitled "Picture display method and related device", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] The present application relates to the field of electronic devices and electronic technology, and in particular, to a picture display method and related device. BACKGROUND

[0003] An electronic device can display thumbnails corresponding to photos (also referred to as pictures) taken or saved by the electronic device in a thumbnail display interface. In some view scenarios, the electronic device can display a large number of thumbnails at the same time. For example, the electronic device can display a large number of thumbnails in a month view scenario or a year view scenario of a photo gallery.

[0004] Currently, for a plurality of thumbnails displayed in a thumbnail display interface of an electronic device, the electronic device creates a plurality of view controls to respectively carry the plurality of thumbnails. Each thumbnail displayed in the thumbnail display interface occupies a view control. When the electronic device loads and displays a thumbnail, the electronic device creates a view control, acquires a picture resource through an input / output (IO) interface, decodes the picture resource, and renders and displays the view control. When the electronic device needs to load and display a large number of thumbnails, the electronic device needs to create a large number of view controls, and needs to acquire picture resources through the IO interface multiple times, decode the picture multiple times, and render and display the view control multiple times. When the electronic device needs to display a large number of thumbnails in a short time, the operations of rendering and displaying, acquiring picture resources through the IO interface, and decoding the picture of the electronic device compete for the resources of a central processing unit (CPU) of the electronic device. As a result, the time for the electronic device to acquire picture resources, decode the picture, and create a view control becomes longer. When a user performs an operation such as quickly swiping in a thumbnail display interface of a photo gallery for displaying a large number of thumbnails, or dragging a scroll bar, the view control may not be created in time, or the picture may not be decoded in time, resulting in a lag in displaying thumbnails by the electronic device, for example, a large number of white blocks in the thumbnail display interface. In this way, the user experience is poor.

[0005] Therefore, how to reduce or avoid the lag in displaying thumbnails by an electronic device when a large number of thumbnails are displayed by the electronic device is an urgent problem to be solved. SUMMARY

[0006] The application provides a picture display method and related devices. Through the picture display method, the electronic device can reduce or avoid the problem of freezing when displaying a large number of thumbnails.

[0007] In a first aspect, the application provides a picture display method, which can include: an electronic device receiving and responding to a first operation of a user on a gallery application, obtaining a first group of thumbnails, the first group of thumbnails including at least two thumbnails; the electronic device splicing the first group of thumbnails into a first large picture according to a display order; the electronic device rendering the first large picture and displaying a thumbnail display interface of the gallery application, the thumbnail display interface displaying the first large picture.

[0008] The first operation includes any one of an operation of the user opening the gallery application, an operation of the user switching a view scene in the thumbnail display interface, and a sliding operation of the user in the thumbnail display interface.

[0009] Through the picture display method provided in the first aspect, the electronic device can splice the obtained multiple thumbnails to obtain spliced thumbnails, and then the electronic device can display the spliced thumbnails through a view control. The displayed thumbnails in the thumbnail display interface are spliced into one or more large pictures. One view control can carry one large picture. In this way, the electronic device only needs a small number of view controls to display a large number of thumbnails. Moreover, the electronic device can batch query and obtain thumbnails, which can reduce the number of times of calling an IO interface. In this way, the performance and frame rate of the electronic device in loading and displaying a large number of thumbnails can be improved, thereby avoiding or reducing the problem of white blocks and freezing during the user's browsing of a large number of thumbnails.

[0010] In combination with the first aspect, in a possible implementation manner, before displaying the thumbnail display interface of the gallery application, the method can include: the electronic device creating a first view control and carrying the first large picture through the first view control.

[0011] In this way, one view control can carry one large picture, and the electronic device only needs a small number of view controls to display a large number of thumbnails. Therefore, the display performance of the electronic device can be improved.

[0012] In combination with the first aspect, in a possible implementation manner, the method can further include: the electronic device responding to the first operation, obtaining a second group of thumbnails, the second group of thumbnails including at least two thumbnails; the electronic device splicing the second group of thumbnails into a second large picture according to the display order; the electronic device rendering the second large picture and displaying the second large picture in the thumbnail display interface.

[0013] In this way, all the large images displayed in the thumbnail display interface are spliced large images, and a thumbnail display interface only needs a small number of view controls to display a large number of thumbnails, so that the display performance of the electronic device is improved.

[0014] With reference to the first aspect, in a possible implementation, after the second large image is displayed in the thumbnail display interface, the method can further include: receiving, by the electronic device and in response to a second operation, displaying, in the thumbnail display interface, a part of the first large image and all of the second large image, the second operation being an upward swiping operation in the thumbnail display interface.

[0015] In this way, the electronic device can determine which controls to display in the thumbnail display interface and which part of the large image to display in the control based on the second operation. Since the large image carried in the view control is complete, but only a part of the large image is displayed in the display area of the thumbnail display interface due to the user operation, the part not displayed has been loaded and spliced in advance. Therefore, when the user performs the swiping operation, the electronic device can quickly display the part of the large image not displayed in the view control, so that the display performance of the electronic device is improved and the user experience is improved.

[0016] With reference to the first aspect, in a possible implementation, before the second large image is displayed in the thumbnail display interface, the method can further include: creating, by the electronic device, a second view control, and carrying the second large image by the second view control.

[0017] In this way, one view control can carry one large image, and the electronic device only needs a small number of view controls to display a large number of thumbnails, so that the display performance of the electronic device is improved.

[0018] With reference to the first aspect, in a possible implementation, after the thumbnail display interface of the photo gallery application is displayed, the method can further include: receiving, by the electronic device and in response to a third operation, obtaining a third group of thumbnails, the third group of thumbnails including at least two thumbnails; splicing, by the electronic device, the third group of thumbnails into a third large image according to the display order; creating, by the electronic device, a third view control, and carrying the third large image by the third view control; and rendering, by the electronic device, the third large image, and displaying the third large image in the thumbnail display interface.

[0019] In this way, the electronic device only needs a small number of view controls to display a large number of thumbnails.

[0020] With reference to the first aspect, in a possible implementation, the obtaining of the first group of thumbnails can include: obtaining, by the electronic device, the first group of thumbnails from a database, and the storage order of the first group of thumbnails in the database being consistent with the display order of the first group of thumbnails.

[0021] In this way, since the storage order of the first group of thumbnails in the database is consistent with the display order of the first group of thumbnails, the electronic device can read out the first group of thumbnails at one time and in batches. This can reduce the number of times the electronic device calls the input / output interface, improve the performance and frame rate of the electronic device in loading and displaying a large number of thumbnails, and save power consumption of the electronic device.

[0022] With reference to the first aspect, in a possible implementation, the electronic device splices the first group of thumbnails into one large image according to the display order can include: the electronic device applies for a first memory; and the database of the electronic device sequentially fills the first group of thumbnails into the first memory according to the display order, to splice one large image in the first memory.

[0023] The first memory is a shared memory.

[0024] In this way, other processes of the electronic device, for example, a rendering process, can read the large image across processes, which can improve rendering performance and save power consumption of the electronic device.

[0025] With reference to the first aspect, in a possible implementation, the electronic device renders the first large image can include: the rendering process of the electronic device reads the first large image from the first memory and renders the first large image. In this way, the rendering process can read the large image across processes, which can improve rendering performance and save power consumption of the electronic device.

[0026] With reference to the first aspect, in a possible implementation, the database stores metadata of the first group of thumbnails, and the metadata includes a date and time corresponding to the first group of thumbnails and an identity ID. In this way, the electronic device can distinguish different thumbnails through the date and time and the ID corresponding to the thumbnails.

[0027] With reference to the first aspect, in a possible implementation, the first group of thumbnails includes a first thumbnail, the date and time corresponding to the first thumbnail is a first date and time, the ID corresponding to the first thumbnail is a first ID, the first date and time is a date and time at which the electronic device saves the first thumbnail, and the first ID is a number generated by the electronic device to identify the first thumbnail when the electronic device saves the first thumbnail. In this way, the electronic device can distinguish different thumbnails through the date and time and the ID corresponding to the thumbnails.

[0028] With reference to the first aspect, in a possible implementation, obtaining the first group of thumbnails can include: the electronic device obtains metadata of the first group of thumbnails; the electronic device obtains a first query range based on the date and time and the ID in the metadata of the first group of thumbnails; and the electronic device obtains the first group of thumbnails in the first query range from the database at one time based on the first query range.

[0029] In this way, the electronic device can read multiple thumbnails at a time, can reduce the number of times of calling the input / output interface, can improve the performance and frame rate of the electronic device in loading and displaying a large number of thumbnails, and can save the power consumption of the electronic device.

[0030] With reference to the first aspect, in a possible implementation manner, the electronic device can obtain the query range based on the date and time and the ID in the metadata of the first set of thumbnails, which can include: the electronic device assembles the date and time and the ID of the first set of thumbnails to obtain multiple strings, the number of the multiple strings being equal to the number of the first set of thumbnails; the electronic device determines the maximum value and the minimum value in the multiple strings, and sets the first query range based on the maximum value and the minimum value. In this way, the electronic device can determine the query range of the thumbnails through the maximum value and the minimum value, and obtain all the thumbnails in the query range.

[0031] With reference to the first aspect, in a possible implementation manner, the third operation is a sliding operation, and the electronic device can obtain the third set of thumbnails, which can include: the electronic device determines the date and time and the ID of the third set of thumbnails based on the third operation; the electronic device determines the second query range of the third set of thumbnails based on the date and time and the ID of the third set of thumbnails; and the electronic device obtains the third set of thumbnails in the second query range from the database at a time based on the second query range.

[0032] In this way, the electronic device can determine which thumbnails to display based on the operation, and set the query range according to the metadata of the thumbnails to be displayed. Thus, the electronic device can obtain the thumbnails in the query range in batches at a time.

[0033] With reference to the first aspect, in a possible implementation manner, the electronic device can obtain the first set of thumbnails, which can include: the electronic device assigns the first view control to carry the first set of thumbnails; and the electronic device sends a thumbnail loading request to the database through the first view control, the thumbnail loading request being used to obtain the first set of thumbnails from the database. In this way, the electronic device can request to load the thumbnails to be carried by the view control through the view control.

[0034] With reference to the first aspect, in a possible implementation manner, the number of view controls required in the thumbnail display interface is determined based on the total number of thumbnails stored by the electronic device and the number of thumbnails read in batches. In this way, the electronic device can determine the number of view controls required in the thumbnail display interface.

[0035] With reference to the first aspect, in a possible implementation manner, before the electronic device receives and responds to the first operation of the user for the gallery application to acquire the first set of thumbnails, the method further can include: the electronic device acquiring a first picture; the electronic device downsampling the first picture to obtain a thumbnail of the first picture; the electronic device saving a date and time and an ID corresponding to the thumbnail of the first picture; and the electronic device saving the thumbnail of the first picture to the database according to the sorting of the date and time and the ID corresponding to the thumbnail of the first picture.

[0036] In this way, since the storage order of the thumbnail is consistent with the display order, the electronic device has the capability of batch acquiring thumbnails.

[0037] With reference to the first aspect, in a possible implementation manner, the electronic device saving the thumbnail of the first picture to the database according to the sorting of the date and time and the ID corresponding to the thumbnail of the first picture can include: the electronic device performing texture compression on the thumbnail of the first picture to obtain texture data; and the electronic device saving the texture data to the database according to the sorting of the date and time and the ID corresponding to the thumbnail of the first picture.

[0038] In this way, since the texture data can be directly sent to the GPU without decoding, the decoding time of the electronic device is saved, and the power consumption of the electronic device is saved.

[0039] The second aspect provides an electronic device, which can include a first application, a processing module, a graphics subsystem, and a database, where the database is configured to: store thumbnails;

[0040] The first application can be configured to: receive and respond to a first operation of a user for a gallery application to acquire a first set of thumbnails, the first set of thumbnails including at least two thumbnails.

[0041] The processing module can be configured to: splice the first set of thumbnails into a first large picture according to a display order.

[0042] The graphics subsystem can be configured to: render the first large picture.

[0043] The first application can be configured to: display a thumbnail display interface of the gallery application, and the thumbnail display interface displays the first large picture.

[0044] The first operation can include any one of an operation of the user opening the first application, an operation of the user switching a view scene in the thumbnail display interface, and a sliding operation of the user in the thumbnail display interface.

[0045] The first application can include any one of a gallery application, a file management application, and a picture selection application.

[0046] In this way, the electronic device can splice the plurality of thumbnails to obtain a spliced thumbnail, and then display the spliced thumbnail through the view control. The displayed thumbnails in the thumbnail display interface are spliced into one or more large images. One view control can carry one large image. In this way, the electronic device can display a large number of thumbnails by using only a small number of view controls. In addition, the electronic device can batch query and obtain thumbnails, and the number of times of calling the IO interface can be reduced. In this way, the performance and frame rate of the electronic device in loading and displaying a large number of thumbnails can be improved, so that the problems of white blocks and lagging during user browsing of a large number of thumbnails can be avoided or reduced.

[0047] With reference to the second aspect, in a possible implementation manner, the first application can further include: creating the first view control, and carrying the first large image through the first view control.

[0048] In this way, one view control can carry one large image, and the electronic device can display a large number of thumbnails by using only a small number of view controls. Therefore, the display performance of the electronic device can be improved.

[0049] With reference to the second aspect, in a possible implementation manner, the processing module can be further configured to: in response to the first operation, acquire a second group of thumbnails, the second group of thumbnails including at least two thumbnails; splice the second group of thumbnails into a second large image according to the display order; and

[0050] The graphics subsystem can be further configured to: render the second large image.

[0051] The first application can be further configured to: display the second large image in the thumbnail display interface.

[0052] In this way, all the images displayed in the thumbnail display interface are spliced large images, and one thumbnail display interface can display a large number of thumbnails by using only a small number of view controls. Therefore, the display performance of the electronic device can be improved.

[0053] With reference to the second aspect, in a possible implementation manner, the first application can be further configured to: receive and respond to a second operation to display, in the thumbnail display interface, part of the content of the first large image and all the content of the second large image, the second operation being an operation of swiping up in the thumbnail display interface.

[0054] In this way, the electronic device can determine which controls to display in the thumbnail display interface and which part, a part or the whole, of the large image to display in the control based on the second operation. Since the large image carried in the view control is complete, but only a part of the large image is displayed in the display area of the thumbnail display interface due to the user operation. Since the part not displayed has been loaded and spliced in advance, when the user performs the sliding operation, the electronic device can display the part of the large image not displayed in the view control more quickly. Thus, the display performance of the electronic device can be improved, and the user experience can be improved.

[0055] With reference to the second aspect, in a possible implementation manner, the first application can further be configured to: create, by the electronic device, a second view control, and carry, by the electronic device, a second large image in the second view control.

[0056] In this way, one view control can carry one large image, and the electronic device can display a large number of thumbnails by using only a small number of view controls. Thus, the display performance of the electronic device can be improved.

[0057] With reference to the second aspect, in a possible implementation manner, the first application can further be configured to: receive, by the electronic device, and in response to a third operation, a third group of thumbnails, the third group of thumbnails including at least two thumbnails;

[0058] The processing module can be further configured to: splice the third group of thumbnails into a third large image according to the display order;

[0059] The first application can be further configured to: create a third view control, and carry the third large image in the third view control;

[0060] The graphics subsystem can be further configured to: render the third large image;

[0061] The first application can be further configured to: display the third large image in the thumbnail display interface.

[0062] In this way, the electronic device can display a large number of thumbnails by using only a small number of view controls.

[0063] With reference to the second aspect, in a possible implementation manner, the first application can further be configured to: obtain, from a database, the first group of thumbnails, and a storage order of the first group of thumbnails in the database is consistent with a display order of the first group of thumbnails.

[0064] In this way, since the storage order of the first group of thumbnails in the database is consistent with the display order of the first group of thumbnails, the electronic device can read the first group of thumbnails at one time and in batches. Thus, the number of times of calling the input / output interface by the electronic device can be reduced, the performance and frame rate of the electronic device in loading and displaying a large number of thumbnails can be improved, and the power consumption of the electronic device can be saved.

[0065] With reference to the second aspect, in a possible implementation manner, the database can be further configured to apply the first memory;

[0066] The database can be further configured to fill the first group of thumbnails into the first memory in the display order one by one, and splice a large image in the first memory.

[0067] The first memory is a shared memory.

[0068] In this way, other processes of the electronic device, for example, a rendering process, can read the large image across processes, which can improve rendering performance and save power consumption of the electronic device.

[0069] With reference to the second aspect, in a possible implementation manner, the graphics subsystem can be further configured to read the first large image from the first memory and render the first large image. In this way, the graphics subsystem can read the large image across processes, which can improve rendering performance and save power consumption of the electronic device.

[0070] With reference to the second aspect, in a possible implementation manner, the database stores metadata of the first group of thumbnails, and the metadata includes a date and time corresponding to the first group of thumbnails and an identity ID. In this way, the electronic device can distinguish different thumbnails by using the date and time and the ID corresponding to the thumbnails.

[0071] With reference to the second aspect, in a possible implementation manner, the first group of thumbnails includes a first thumbnail, the first thumbnail corresponds to a first date and time, the first thumbnail corresponds to a first ID, the first date and time is a date and time at which the electronic device saves the first thumbnail, and the first ID is a number generated by the electronic device to identify the first thumbnail when the electronic device saves the first thumbnail. In this way, the electronic device can distinguish different thumbnails by using the date and time and the ID corresponding to the thumbnails.

[0072] With reference to the second aspect, in a possible implementation manner, the electronic device can further include a media library and a distributed data management module, and the media library can be configured to acquire metadata of the first group of thumbnails, and send a thumbnail query instruction to the distributed data management module, the thumbnail query instruction carrying the metadata of the first group of thumbnails.

[0073] The distributed data management module can be configured to receive the query instruction, and acquire a first query range based on the date and time and the ID in the metadata of the first group of thumbnails carried in the query instruction; and acquire the first group of thumbnails in the first query range from the database at a time based on the first query range.

[0074] In this way, the electronic device can read multiple thumbnails at a time, which can reduce the number of times of calling an input / output interface, improve the performance and frame rate of the electronic device in loading and displaying a large number of thumbnails, and save power consumption of the electronic device.

[0075] With reference to the second aspect, in a possible implementation manner, the distributed data management module can be further configured to: assemble the date and time and the ID of the first group of thumbnails to obtain a plurality of strings, a quantity of the plurality of strings being equal to a quantity of the first group of thumbnails; and determine a maximum value and a minimum value in the plurality of strings, and set the first query range based on the maximum value and the minimum value. In this way, the electronic device can determine the query range of the thumbnails through the maximum value and the minimum value, and obtain all the thumbnails in the query range.

[0076] With reference to the second aspect, in a possible implementation manner, the third operation is a sliding operation, and the media library can be further configured to: determine the date and time and the ID of the third group of thumbnails based on the third operation.

[0077] The distributed data management module can be further configured to: determine a second query range of the third group of thumbnails based on the date and time and the ID of the third group of thumbnails; and obtain the third group of thumbnails in the second query range from the database at a time based on the second query range.

[0078] In this way, the electronic device can determine which thumbnails to display based on the operation, and set the query range according to the need to display the metadata of the thumbnails. Thus, the electronic device can obtain the thumbnails in the query range at a time in batches.

[0079] With reference to the second aspect, in a possible implementation manner, the first application can be further configured to: assign the first view control to carry the first group of thumbnails; and send, by the first view control, a thumbnail loading request to the database, the thumbnail loading request being used to obtain the first group of thumbnails from the database. In this way, the electronic device can request to load the thumbnails required to be carried by the view control through the view control.

[0080] With reference to the second aspect, in a possible implementation manner, a quantity of the view controls required in the thumbnail display interface is determined according to a total quantity of the thumbnails stored by the electronic device, and a quantity of the thumbnails read at a time in batches. In this way, the electronic device can determine the quantity of the view controls required in the thumbnail display interface.

[0081] With reference to the second aspect, in a possible implementation manner, the electronic device can further include a second application, and the second application can be configured to: obtain the first picture.

[0082] The media library can be further configured to: downsample the first picture to obtain a thumbnail of the first picture.

[0083] The media library can be further configured to: instruct the distributed data management module to save the date and time and the ID corresponding to the thumbnail of the first picture.

[0084] The distributed data management module can also be configured to save the thumbnail of the first picture to the database according to the sorting of the date and time and the ID corresponding to the thumbnail of the first picture.

[0085] In this way, since the storage order of the thumbnail is consistent with the display order, the electronic device has the capability of batch obtaining the thumbnail.

[0086] In combination with the second aspect, in a possible implementation manner, the media library can also be configured to perform texture compression on the thumbnail of the first picture by the electronic device to obtain texture data.

[0087] The distributed data management module can also be configured to save the texture data to the database according to the sorting of the date and time and the ID corresponding to the thumbnail of the first picture.

[0088] In this way, since the texture data can be directly sent to the GPU without decoding, the decoding time of the electronic device is saved, and the power consumption of the electronic device is saved.

[0089] In the third aspect, the present application provides an electronic device, which can include one or more processors, one or more display screens, and a memory, the one or more display screens, the memory, and the one or more processors are coupled, and the memory stores code, when the code is executed by the processor, the electronic device executes the method in any possible implementation manner of the first aspect.

[0090] In the fourth aspect, the present application provides a computer readable storage medium, which includes computer instructions, when the computer instructions are executed on a computer, the computer executes the method in any possible implementation manner of the first aspect.

[0091] In the fifth aspect, the present application provides a computer program product, when the computer program product is executed on a computer, the computer executes the method in any possible implementation manner of the first aspect.

[0092] In the sixth aspect, the present application provides a chip or chip system, which is applied to an electronic device, and includes a processing circuit and an interface circuit, the interface circuit is configured to receive code instructions and transmit the code instructions to the processing circuit, and the processing circuit is configured to execute the code instructions to execute the method in any possible implementation manner of the first aspect.

[0093] It can be understood that the electronic device provided in the third aspect, the computer readable storage medium provided in the fourth aspect, the computer program product provided in the fifth aspect, and the chip or chip system provided in the sixth aspect are all configured to execute the method provided in the present application. Therefore, the beneficial effects that can be achieved are referred to the beneficial effects in the corresponding method, which will not be described herein. BRIEF DESCRIPTION OF DRAWINGS

[0094] FIG. 1 is a schematic diagram of a thumbnail display interface in a day view scenario according to an embodiment of the present application;

[0095] FIG. 2 is a schematic diagram of a thumbnail display interface in a month view scenario according to an embodiment of the present application;

[0096] FIG. 3 is a schematic diagram of a thumbnail display interface in a year view scenario according to an embodiment of the present application;

[0097] FIG. 4 is a schematic diagram of a thumbnail display interface with white blocks in a year view scenario according to an embodiment of the present application;

[0098] FIG. 5A is a schematic diagram of the structure of an electronic device according to an embodiment of the present application;

[0099] FIG. 5B is a software structure block diagram of an electronic device according to an embodiment of the present application;

[0100] FIG. 5C is a software structure block diagram of an electronic device according to an embodiment of the present application;

[0101] FIG. 6 is a flowchart of a process of saving thumbnails by an electronic device 100 according to an embodiment of the present application;

[0102] FIG. 7 is a schematic diagram of saving thumbnails in order by an electronic device according to an embodiment of the present application;

[0103] FIG. 8 is a flowchart of a picture display method according to an embodiment of the present application;

[0104] FIG. 9A is a schematic diagram of view controls included in a thumbnail display interface according to an embodiment of the present application;

[0105] FIG. 9B is a schematic diagram of a display area of a thumbnail display interface displaying view controls according to an embodiment of the present application;

[0106] FIG. 9C is a schematic diagram of a display area of a thumbnail display interface displaying view controls according to an embodiment of the present application;

[0107] FIG. 9D is a schematic diagram of a display area of a thumbnail display interface displaying view controls according to an embodiment of the present application;

[0108] FIG. 10 is a schematic diagram of splicing thumbnails according to an embodiment of the present application;

[0109] FIG. 11 is a flowchart of a picture display method according to an embodiment of the present application. DETAILED DESCRIPTION

[0110] In the following, the technical solutions in the embodiments of the present application will be described clearly and completely with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all of them. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of the present application.

[0111] The terms used in the following embodiments of the present application are only for the purpose of describing the specific embodiments, and are not intended to be limiting to the present application. As used in the specification and the appended claims of the present application, the singular forms “a,” “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. The terms “first,” “second,” and the like, are used only to describe the different objects, and cannot be understood as indicating or implying relative importance or implying the number of the indicated technical features. Thus, the features defined with “first,” “second” can explicitly or implicitly include one or more of the features. “First” and “second” are used to distinguish different objects, rather than to describe a specific order of the objects. For example, the first object and the second object are used to distinguish different objects, rather than to describe a specific order of the objects.

[0112] In the description of the embodiments of the present application, the meaning of “a plurality of” is two or more, unless otherwise specified. For example, a plurality of processing units refers to two or more processing units; a plurality of systems refers to two or more systems.

[0113] In the embodiments of the present application, the words “exemplary” or “for example” are used to mean serving as an example, instance, or illustration. Any embodiment or aspect described in the embodiments of the present application as “exemplary” or “for example” should not be construed as preferred or advantageous over other embodiments or aspects. Rather, the use of “exemplary” or “for example” is intended to present concepts in a concrete manner.

[0114] The term “and / or” in the present application is only a description of the association relationship of the associated objects, which means that there can be three relationships. For example, A and / or B can represent three cases: A exists alone, A and B exist together, and B exists alone.

[0115] The term "user interface (UI)" in the embodiments of the present application is a medium interface for interaction and information exchange between an application program or an operating system and a user, which realizes conversion between an internal form of information and a form acceptable by the user. The user interface is source code written in a specific computer language such as Java, extensible markup language (XML), and the like. The interface source code is parsed and rendered on an electronic device, and finally presented as content recognizable by the user. A commonly used form of the user interface is a graphic user interface (GUI), which refers to a user interface related to computer operation displayed in a graphic manner. It can be a visual interface element such as text, an icon, a button, a menu, a tab, a text box, a dialog box, a status bar, a navigation bar, a Widget, and the like displayed in a display screen of the electronic device.

[0116] In order to better understand the technical solutions provided in the present application, before the technical solutions of the present application are described, first, the electronic device 100 with the photo gallery or album function to which the present application is applicable is briefly introduced in conjunction with the accompanying drawings. In the embodiments of the present application, the electronic device 100 can be referred to as a terminal or a user equipment (UE), and the embodiments of the present application do not limit this. The electronic device 100 involved in the present application can include but is not limited to a mobile phone, a tablet computer, a notebook computer, a palm computer, a mobile internet device (MID), a wearable device, a virtual reality (VR) device, an augmented reality (AR), a vehicle-mounted device, and the like. The embodiments of the present application do not limit the specific form or type of the electronic device 100.

[0117] Currently, the electronic device 100 displays a thumbnail display interface in different view scenes in the photo gallery application. For example, the electronic device 100 can display thumbnail display interfaces in scenes such as a day view, a month view, and a year view in the photo gallery application. In the electronic device 100, a user can preview thumbnails presented in chronological order. The user can also select to preview thumbnails in the year, month, and day dimensions. The preview views in the year, month, and day dimensions can be referred to as a year view, a month view, and a day view, respectively. The thumbnail display interfaces in different view scenes display thumbnails of different sizes and different orders of magnitude, and different views can be jumped between each other, so that the user can quickly find the corresponding pictures.

[0118] FIG. 1 illustrates a thumbnail display interface 101 in a day view scenario of an electronic device 100. As shown in FIG. 1, the thumbnail display interface 101 can be used to display thumbnails of photos taken on a specific day. The thumbnail display interface 101 can also include a textual prompt 102. For example, the textual prompt 102 can be "February 23, 2023", indicating that the thumbnails of the photos displayed in the thumbnail display interface 101 correspond to photos taken or saved on "February 20, 2023". The thumbnails of the photos displayed in the thumbnail display interface 101 can include a thumbnail 104 corresponding to photo 1.

[0119] Optionally, the electronic device 100 can arrange the thumbnails of the photos taken or saved on "February 20, 2023" in the thumbnail display interface 101 in a distribution relationship of 8 rows by 4 columns.

[0120] Optionally, the user can also swipe up or down in the thumbnail display interface 101 to view thumbnails of photos (or images) taken or saved on other dates.

[0121] As shown in FIG. 1, the thumbnail display interface 101 can also include a view switching control 103. The view switching control 103 is used to switch between different view scenarios. For example, the view switching control 103 can include a day view control 103a, a month view control 103b, and a year view control 103c. The day view control 103a is currently in a selected state, indicating that the electronic device 100 currently displays a thumbnail display interface in a day view scenario. The month view control 103b is used to instruct the electronic device 100 to switch to display a thumbnail display interface in a month view scenario. The year view control 103c is used to instruct the electronic device 100 to switch to display a thumbnail display interface in a year view scenario.

[0122] In some possible examples, the user can click the month view control 103b. In response to the user operation, the electronic device 100 can display a thumbnail display interface in a month view scenario.

[0123] FIG. 2 illustrates a thumbnail display interface 200 in a month view scenario of an electronic device 100. As shown in FIG. 2, the thumbnail display interface 200 can be used to display thumbnails of photos taken in a specific month. The thumbnail display interface 200 can also include a textual prompt 201. For example, the textual prompt 201 can be "February 2023", indicating that the thumbnails of the photos displayed in the thumbnail display interface 200 correspond to photos taken or saved in "February 2023". The thumbnails of the photos displayed in the thumbnail display interface 200 can include a thumbnail 202 corresponding to photo 1.

[0124] Optionally, the electronic device 100 can arrange the thumbnails corresponding to the photos taken or saved in February 2023 in a distribution relationship of 16 rows and 8 columns in the thumbnail display interface 200.

[0125] Optionally, the user can also swipe up or down in the thumbnail display interface 200 to view thumbnails corresponding to photos taken or saved in other months.

[0126] As shown in FIG. 2, the thumbnail display interface 200 can also include the view switching control 103. Currently, the month view control 103b in the view switching control 103 is in a selected state, indicating that the electronic device 100 currently displays the thumbnail display interface in the month view scenario. For the view switching control 103, refer to the description of FIG. 1 above, which will not be repeated here.

[0127] In some possible examples, the user can click the year view control 103c. In response to the user operation, the electronic device 100 can display a thumbnail display interface in a year view scenario.

[0128] FIG. 3 exemplarily shows a thumbnail display interface 300 of the electronic device 100 in a year view scenario. As shown in FIG. 3, the thumbnail display interface 300 can be used to display thumbnails of photos taken in a specific year. The thumbnail display interface 300 can also include a text prompt 301. For example, the text prompt 301 can be “2023”, indicating that the thumbnails of the photos displayed in the thumbnail display interface 300 are taken or saved in “2023”. The thumbnail display interface 300 can display thumbnails of photos, including a thumbnail 302 corresponding to photo 1.

[0129] Optionally, the electronic device 100 can arrange the thumbnails corresponding to the photos taken or saved in 2023 in a distribution relationship of 32 rows and 16 columns in the thumbnail display interface 300.

[0130] Optionally, the user can also swipe up or down in the thumbnail display interface 300 to view thumbnails corresponding to photos taken or saved in other years.

[0131] As shown in FIG. 3, the thumbnail display interface 300 can also include the view switching control 103. Currently, the year view control 103c in the view switching control 103 is in a selected state, indicating that the electronic device 100 currently displays the thumbnail display interface in the year view scenario. For the view switching control 103, refer to the description of FIG. 1 above, which will not be repeated here.

[0132] In some possible examples, as the number of thumbnails displayed in the thumbnail display interface gradually increases from the day view scene to the year view scene, and the size of the display screen of the electronic device 100 is unchanged, the size of the thumbnails displayed in the thumbnail display interface gradually decreases from the day view scene to the year view scene. For example, the size of the thumbnail of the same photo displayed in the thumbnail display interface in the month view scene is smaller than the size of the thumbnail of the same photo displayed in the thumbnail display interface in the day view scene. The size of the thumbnail of the same photo displayed in the thumbnail display interface in the year view scene is smaller than the size of the thumbnail of the same photo displayed in the thumbnail display interface in the month view scene. For example, the size of the thumbnail 302 corresponding to the photo 1 in the year view scene is smaller than the size of the thumbnail 202 corresponding to the photo 1 in the month view scene. The size of the thumbnail 202 corresponding to the photo 1 in the month view scene is smaller than the size of the thumbnail 104 corresponding to the photo 1 in the day view scene.

[0133] In the embodiments of the present application, the number of thumbnails displayed by the electronic device 100 in the day view scene, the month view scene, and the year view scene is not limited. It can be understood that the number of thumbnails that can be displayed in the thumbnail display interface of the number of thumbnails displayed by the electronic device 100 in the day view scene, the month view scene, and the year view scene is related to the size of the display screen of the electronic device 100. The larger the size of the display screen of the electronic device 100, the more thumbnails that can be displayed in the thumbnail display interface of the number of thumbnails displayed by the electronic device 100 in the day view scene, the month view scene, and the year view scene.

[0134] For example, in the year view scene, when the user performs a finger touch and swipe up and down in the thumbnail display interface (for example, the thumbnail display interface 300 shown in FIG. 3) in the year view scene, the view control for displaying the pictures in the thumbnail display interface receives a touch event, and then the corresponding display area requests to refresh the thumbnails arranged in time reverse order one by one. The process of requesting to refresh includes reading of thumbnail resources, picture decoding, drawing, and rendering, and finally the thumbnails are displayed in the corresponding display area one by one.

[0135] Currently, the number of thumbnails that the electronic device 100 can display in the month view scene and the year view scene is much more than the number of thumbnails that the electronic device 100 can display in the day view scene. When the electronic device 100 needs to load and display a large number of thumbnails, the electronic device 100 needs to create a large number of view controls, and needs to call the IO interface multiple times to obtain picture resources, and perform multiple picture decoding and multiple rendering and display of the view controls. When the electronic device 100 needs to display a large number of thumbnails in a short time, the operations of the electronic device 100, such as rendering and display, calling the IO interface to obtain picture resources, and decoding pictures, compete for the CPU resources of the electronic device 100. As a result, the time for the electronic device 100 to obtain picture resources, decode pictures, and create view controls becomes longer. When the user quickly slides or drags a scroll bar in the thumbnail display interface of the gallery for displaying a large number of thumbnails, the situation that the view control is created but the picture is not decoded, or the view control is not created in time, occurs, so that the electronic device displays the thumbnails with lag, for example, a large number of white blocks appear in the thumbnail display interface. For the scene of displaying a large number of thumbnails in the month view scene and the year view scene, taking the year view scene as an example, when the user quickly slides or drags a scroll bar in the thumbnail display interface 300 in the year view scene, a large number of white blocks appear in the thumbnail display interface. As shown in FIG. 4, white blocks appear in the area 401 in the thumbnail display interface 300. In this way, the user experience is poor.

[0136] To solve the problem that white blocks and lag occur in the process in which the user browses thumbnails in the scene of displaying a large number of thumbnails by the electronic device 100, an embodiment of the present application provides a picture display method, which can include the following steps. First, the electronic device 100 stores thumbnails corresponding to pictures that are photographed or saved according to the arrangement order of the thumbnails in a thumbnail display interface when storing the thumbnails. In this way, the electronic device 100 has the ability to batch query and obtain thumbnails. Then, when the electronic device displays the thumbnail display interface, the electronic device 100 can batch query and obtain thumbnails. The electronic device 100 can splice a plurality of obtained thumbnails to obtain spliced thumbnails, and then the electronic device 100 can display the spliced thumbnails through a view control.

[0137] By the picture display method provided in this application, the displayed thumbnails in the thumbnail display interface are spliced into one or more large pictures. One view control can carry one large picture. In this way, the electronic device 100 only needs a small number of view controls (for example, 1 or 2, etc.) to display a large number of thumbnails. Moreover, the electronic device 100 can query and acquire the thumbnails in batches, which can reduce the number of times of calling the IO interface. In this way, the performance and frame rate of the electronic device in loading and displaying a large number of thumbnails can be improved, so that the problems of white blocks and lagging during the user's browsing of a large number of thumbnails can be avoided or reduced.

[0138] It should be noted that the thumbnails involved in this application can be thumbnails corresponding to pictures, or thumbnails corresponding to video files, audio files, etc. Hereinafter, the storage and display process of the thumbnails corresponding to pictures will be described by taking pictures as an example. It can be understood that the thumbnails of video files, audio files, etc. can refer to the storage and display process of the thumbnails corresponding to pictures, which will not be described herein again.

[0139] Next, an exemplary electronic device 100 provided by the embodiments of the present application will be introduced.

[0140] FIG. 5A is a structural schematic diagram of the electronic device 100 provided by the embodiments of the present application.

[0141] The embodiments will be described in detail below by taking the electronic device 100 as an example. It should be understood that the electronic device 100 can have more or fewer components than those shown in the figure, can combine two or more components, or can have a different component configuration. The various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.

[0142] The electronic device 100 can 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, a headset interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 can include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0143] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can include more or fewer components than shown, or combine certain components, or split certain components, or different arrangement of components. The components shown can be implemented in hardware, software, or a combination of software and hardware.

[0144] The processor 110 can include one or more processing units, for example: the processor 110 can include 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 / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices, or can be integrated in one or more processors.

[0145] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching instructions and executing instructions.

[0146] The processor 110 can also include a memory that stores instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The cache memory can hold instructions or data that the processor 110 has recently used or is likely to use again. If the processor 110 needs to use the instructions or data again, it can be retrieved directly from the cache memory. This avoids repeated accesses to the main memory, reducing the latency of the processor 110 and thus improving the efficiency of the system.

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

[0148] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 can include multiple sets of I2C buses. The processor 110 can be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example, the processor 110 can be coupled to the touch sensor 180K through an I2C interface, enabling the processor 110 and the touch sensor 180K to communicate through the I2C bus interface and implement the touch function of the electronic device 100.

[0149] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple sets of I2S buses. The processor 110 can be coupled to the audio module 170 through the I2S bus, enabling communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can deliver audio signals to the wireless communication module 160 through the I2S interface, enabling the function of answering a phone call through a Bluetooth headset.

[0150] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 can be coupled with the wireless communication module 160 through a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, enabling the function of answering a phone call through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0151] The UART interface is a universal serial bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is usually used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface, enabling Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, enabling the function of playing music through a Bluetooth headset.

[0152] The MIPI interface can be used to connect the processor 110 and peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes the camera serial interface (CSI), the display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate through the CSI interface, enabling the camera function of the electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface, enabling the display function of the electronic device 100.

[0153] The GPIO interface can be configured through software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 and the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0154] The SIM interface can be used to communicate with the SIM card interface 195, enabling the function of transmitting data to the SIM card or reading data in the SIM card.

[0155] The USB interface 130 is an interface conforming to the USB standard specification, and 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 a peripheral device. It can also be used to connect a headset to play audio through the headset. The interface can also be used to connect other electronic devices, such as AR devices, etc.

[0156] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a structural limitation of the electronic device 100. In some other embodiments of the present application, the electronic device 100 can also use different interface connection methods or a combination of multiple interface connection methods.

[0157] The charging management module 140 is configured to receive charging input from a charger. The charger can be a wireless charger or a wired charger.

[0158] The power management module 141 is configured to connect the battery 142 and the charging management module 140 to the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, and the wireless communication module 160, etc.

[0159] The wireless communication function of the electronic device 100 can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor, etc.

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

[0161] The mobile communication module 150 can provide a solution for wireless communication including 2G / 3G / 4G / 5G, etc. applied to the electronic device 100. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform filtering, amplification, etc. on the received electromagnetic waves, and transfer the same to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor, and radiate the same as electromagnetic waves through the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be disposed in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be disposed in the same device as at least part of the modules of the processor 110.

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

[0163] The wireless communication module 160 can provide a solution for wireless communication including wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc. applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives an electromagnetic wave via the antenna 2, frequency-modulates and filters the electromagnetic wave signal, and transmits the processed signal to the processor 110. The wireless communication module 160 can also receive a signal to be transmitted from the processor 110, frequency-modulate it, amplify it, and radiate it as an electromagnetic wave via the antenna 2.

[0164] In some embodiments, the antenna 1 and the mobile communication module 150 of the electronic device 100 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the electronic device 100 can communicate with a network and other devices through wireless communication technology. The wireless communication technology can include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS can 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 systems (SBAS).

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

[0166] The display screen 194 is configured to display images, videos, and the like. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light emitting diodes (QLED), or the like. In some embodiments, the electronic device 100 can include one or N display screens 194, where N is a positive integer greater than 1.

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

[0168] The ISP is configured to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing to convert it into an image visible to the naked eye. The ISP can also optimize the noise, brightness, and color of the image. The ISP can also optimize the exposure, color temperature, and other parameters of the shooting scene. In some embodiments, the ISP can be disposed in the camera 193.

[0169] The camera 193 is configured to capture still images or videos. An object generates an optical image through a lens and projects it onto a photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then transmitted to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, the electronic device 100 can include one or N cameras 193, where N is a positive integer greater than 1.

[0170] The digital signal processor is used to process digital signals, in addition to being able to process digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.

[0171] The video codec is used to compress or decompress digital video. The electronic device 100 can support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.

[0172] The NPU is a neural-network (NN) calculation processor, which can quickly process input information by drawing on the structure of a biological neural network, such as drawing on the transmission mode between human brain neurons, and can also constantly self-learn. Through the NPU, the electronic device 100 can realize intelligent cognition applications such as image recognition, face recognition, voice recognition, text understanding, etc.

[0173] The external memory interface 120 can be used to connect an external storage card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external storage card communicates with the processor 110 through the external memory interface 120 to realize data storage functions. For example, music, video, etc. Files are saved in the external storage card.

[0174] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various function applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application required by a function (such as a face recognition function, a fingerprint recognition function, a mobile payment function, etc.), etc. The data storage area can store data created during the use of the electronic device 100 (such as face information template data, fingerprint information template, etc.). In addition, the internal memory 121 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0175] The electronic device 100 can realize audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor, etc. For example, music playing, recording, etc.

[0176] The audio module 170 is configured to convert digital audio information into an analog audio signal output, and to convert an analog audio input into a digital audio signal. The audio module 170 can also be configured to encode and decode audio signals. In some embodiments, the audio module 170 can be disposed in the processor 110, or some of the functional modules of the audio module 170 can be disposed in the processor 110.

[0177] The speaker 170A, also referred to as a "loudspeaker", is configured to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0178] The receiver 170B, also referred to as a "earpiece", is configured to convert an audio electrical signal into a sound signal. When the electronic device 100 receives a call or a voice message, the user can listen to the voice by holding the receiver 170B close to the ear.

[0179] The microphone 170C, also referred to as a "microphone", "transducer", is configured to convert a sound signal into an electrical signal. When making a call or sending a voice message, the user can make a sound by holding the mouth close to the microphone 170C, and input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, in addition to collecting sound signals, noise reduction functions can also be realized. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C, to realize the collection of sound signals, noise reduction, and also to identify the source of the sound, to realize the directional recording function, etc.

[0180] The earphone interface 170D is configured to connect a wired earphone. The earphone interface 170D can be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0181] The pressure sensor 180A is configured to sense a pressure signal and convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194. The pressure sensor 180A can be of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, etc. The capacitive pressure sensor can include at least two parallel plates of conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure based on the change in capacitance. When a touch operation is applied to the display screen 194, the electronic device 100 detects the intensity of the touch operation based on the pressure sensor 180A. The electronic device 100 can also calculate the position of the touch based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation instructions. For example, when a touch operation with a touch operation intensity less than a first pressure threshold is applied to a short message application icon, an instruction to view a short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold is applied to the short message application icon, an instruction to create a new short message is executed.

[0182] The gyroscope sensor 180B can be configured to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake photography. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of shaking of the electronic device 100, calculates the distance that the lens module needs to compensate based on the angle, and lets the lens offset the shaking of the electronic device 100 by reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and motion sensing game scenarios.

[0183] The barometric pressure sensor 180C is configured to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude based on the air pressure value measured by the barometric pressure sensor 180C, and assists in positioning and navigation.

[0184] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can detect the opening and closing of a flip cover by using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover based on the magnetic sensor 180D. Further, based on the detected opening and closing state of the cover or the flip cover, the electronic device 100 can set a feature such as automatic unlocking of the flip cover.

[0185] The acceleration sensor 180E can detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). When the electronic device 100 is stationary, the acceleration sensor 180E can detect the magnitude and direction of gravity. The acceleration sensor 180E can also be used to identify the attitude of the electronic device, and can be applied to landscape / portrait screen switching, pedometers, etc.

[0186] Distance sensor 180F is configured to measure distance. Electronic device 100 can measure distance by infrared or laser. In some embodiments, electronic device 100 can utilize distance sensor 180F to measure distance for fast focusing when taking a picture.

[0187] Proximity light sensor 180G can include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode can be an infrared light emitting diode. Electronic device 100 emits infrared light outwardly through the light emitting diode. Electronic device 100 detects infrared reflected light from nearby objects using the photodiode. When sufficient reflected light is detected, electronic device 100 can determine that there is an object near electronic device 100. When insufficient reflected light is detected, electronic device 100 can determine that there is no object near electronic device 100. Electronic device 100 can utilize proximity light sensor 180G to detect that a user is holding electronic device 100 close to the ear for a phone call, so as to automatically turn off the screen to save power. Proximity light sensor 180G can also be used for automatic unlocking and locking of the screen in a holster mode or a pocket mode.

[0188] Ambient light sensor 180L is configured to sense ambient light brightness. Electronic device 100 can adaptively adjust the brightness of display screen 194 according to the sensed ambient light brightness. Ambient light sensor 180L can also be used to automatically adjust white balance when taking a picture. Ambient light sensor 180L can also cooperate with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent accidental touch.

[0189] Fingerprint sensor 180H is configured to collect a fingerprint. Electronic device 100 can utilize the collected fingerprint characteristics to implement fingerprint unlocking, access application lock, fingerprint picture taking, fingerprint call answering, and the like.

[0190] Temperature sensor 180J is configured to detect temperature. In some embodiments, electronic device 100 utilizes the temperature detected by temperature sensor 180J to implement temperature processing strategies. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, electronic device 100 implements performance reduction of a processor located near temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, electronic device 100 heats battery 142 to avoid abnormal shutdown of electronic device 100 caused by low temperature. In other embodiments, when the temperature is lower than yet another threshold, electronic device 100 implements voltage boosting of the output voltage of battery 142 to avoid abnormal shutdown caused by low temperature.

[0191] Touch sensor 180K, also called "touch panel". Touch sensor 180K can be disposed on display screen 194, and touch screen, also called "touch panel", is composed of touch sensor 180K and display screen 194. Touch sensor 180K is used to detect touch operation applied on or near it. Touch sensor 180K can transmit detected touch operation to application processor to determine touch event type. Visual output related to touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K can also be disposed on the surface of electronic device 100, which is different from the position of display screen 194.

[0192] Keys 190 include power on key, volume key, etc. Keys 190 can be mechanical keys. They can also be touch keys. Electronic device 100 can receive key input and generate key signal input related to user settings and function control of electronic device 100.

[0193] Motor 191 can generate vibration prompt. Motor 191 can be used for incoming call vibration prompt, and also can be used for touch vibration feedback. For example, touch operation applied on different applications (such as taking pictures, playing audio, etc.) can correspond to different vibration feedback effects. Touch operation applied on different regions of display screen 194 can also correspond to different vibration feedback effects. Different application scenarios (such as time reminder, receiving information, alarm, game, etc.) can also correspond to different vibration feedback effects. Touch vibration feedback effect can also support customization.

[0194] Indicator 192 can be indicator light, which can be used to indicate charging state, power change, and also can be used to indicate messages, missed calls, notifications, etc.

[0195] SIM card interface 195 is used to connect SIM card. SIM card can be inserted into or pulled out of SIM card interface 195 to realize contact and separation with electronic device 100. Electronic device 100 can support one or N SIM card interfaces, N is a positive integer greater than 1. SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card, etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. SIM card interface 195 can also be compatible with different types of SIM cards. SIM card interface 195 can also be compatible with external storage cards. Electronic device 100 interacts with network through SIM card to realize functions such as call and data communication.

[0196] FIG. 5B is a software structure block diagram of electronic device 100 according to an embodiment of the present application.

[0197] The layered architecture divides software into several layers, each of which has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the system is divided from top to bottom into an application layer, a framework and system service layer, and a kernel layer.

[0198] The application layer can include a series of application packages. In some examples, the application layer can also be referred to as an application program layer.

[0199] As shown in FIG. 5B, the application package can include camera, gallery, file management, desktop, photo picker, and the like applications (which can also be referred to as applications).

[0200] The camera can take images. The desktop can be used to display icons of installed applications in the electronic device 100. The gallery, file management, and photo picker, and the like applications can be used to display thumbnails. Hereinafter, the gallery application loading and displaying thumbnails is taken as an example for illustration. In the embodiments of the present application, the gallery application can also be referred to as the gallery.

[0201] Optionally, in some examples, the gallery can be used to display a thumbnail display interface. The thumbnail display interface is used to display thumbnails of a plurality of photos acquired by the electronic device 100.

[0202] The gallery can also be used to determine the preview specification (for example, the number of thumbnails that can be displayed, and the performance parameters that can support batch query of thumbnails) of the thumbnail display interface according to the UI interface display rules provided by the UI framework, and the number of view controls required to layout the thumbnail display interface. Then, the gallery application can calculate the thumbnails that need to be displayed by each view control in the thumbnail display interface according to the thumbnails to be displayed, and acquire the metadata information set of the thumbnails. The gallery application can also assemble the metadata information according to the order of displaying the thumbnails in the thumbnail display interface to obtain key information. The display module can also request to load and display batch thumbnails according to the key information and layout distribution information of the plurality of thumbnails.

[0203] The framework layer provides application programming interfaces (APIs) and programming frameworks for the applications of the application layer. The framework layer can include some pre-defined functions.

[0204] Optionally, in a possible implementation, the APIs and programming frameworks provided by the framework layer can support multiple languages, such as C, C++, Java, JS, and the like programming languages.

[0205] As shown in FIG. 5B, the framework layer can further include a UI framework, which can provide UI components and interface layout calculation capabilities, UI interaction capabilities, and the like for applications in the electronic device, such as a gallery.

[0206] As shown in FIG. 5B, the framework layer can include a loading framework. The loading framework can include a reading module and a splicing module. The reading module can be configured to read picture data in batches based on metadata information of thumbnails that can be displayed by each view control and layout distribution information.

[0207] The splicing module can be configured to splice multiple thumbnails read by the reading module into one large picture according to the layout distribution information of the thumbnail display interface.

[0208] The splicing module can further be configured to decode the super-compressed texture data of the read thumbnails into texture data.

[0209] As shown in FIG. 5B, the framework layer can further include a graphics subsystem. The graphics subsystem can have texture object packaging capabilities, for example, the graphics subsystem can package texture data into a bitmap and store it in shared memory.

[0210] The graphics subsystem can also have texture rendering and display capabilities, for example, the graphics subsystem can render the large picture obtained by splicing the splicing module, and send the rendered large picture to the thumbnail display interface of the gallery.

[0211] The system service layer is a core capability set of the operating system of the electronic device 100. The system service layer can provide services to the application layer through the framework layer.

[0212] As shown in FIG. 5B, the system service layer can include a media library, which can be configured to provide services for accessing and obtaining media resources (such as pictures, videos, audio, files, and the like) in the electronic device to the application layer. The media library can further include a data processing module and a data storage module. The data processing module can process videos or pictures taken by the electronic device to obtain thumbnails corresponding to the videos or pictures. The data storage module can be configured to send a storage command, which can be configured to instruct the distributed data management module to store the thumbnails.

[0213] As shown in FIG. 5B, the system service layer can further include a texture algorithm, which can include a texture compression algorithm, a texture super-compression algorithm, and a texture splicing algorithm.

[0214] The data processing module in the media library can invoke the texture compression algorithm to compress the thumbnails into texture data, and then invoke the texture super-compression algorithm to compress the texture data into super-compressed texture data (or referred to as texture super-compressed data, or super-compressed data, and the like).

[0215] After the stitching module obtains the super-compressed texture data corresponding to the thumbnail, the stitching module can call a texture super-compression algorithm to decode the super-compressed texture data into texture data, and then call a texture stitching algorithm to stitch the texture data of multiple thumbnails into a large texture image.

[0216] As shown in FIG. 5B, the system service layer can further include a distributed data management module. The distributed data management module can include an owner / visitor database module, a key-value database (KVDB) management module, and a relational database management module.

[0217] The owner / visitor database module can be used to manage access permissions of a database. An owner of the database can directly read data in the database and write data in the database.

[0218] The KVDB management module can be used to store thumbnails based on storage instructions of a media library. Specifically, the KVDB management module can store texture data corresponding to thumbnails in a year view scene or a month view scene generated by the media library in a thumbnail database file. The thumbnail database can be implemented as a KVDB. The KVDB management module can store texture data corresponding to thumbnails in a day view scene generated by the media library in a thumbnail file.

[0219] The kernel layer can include one or more kernel subsystems. The kernel subsystems can provide basic kernel capabilities for the upper layer, including process / thread management, memory management, file system, and the like.

[0220] As shown in FIG. 5B, the kernel layer can include a file system module. The file system module can be used to store media resources in the electronic device 100. The file system module can include a plurality of files. The plurality of files can include a thumbnail database file used to store thumbnails in a year view scene or a month view scene, a metadata database file used to store metadata, and a thumbnail file used to store thumbnails in a day view scene.

[0221] As shown in FIG. 5B, the kernel layer can further include a sandbox management module. The sandbox management module can be used to provide sandbox isolation for applications.

[0222] Hereinafter, the thumbnail database file is referred to as a thumbnail database.

[0223] With reference to the software structure block diagram of the electronic device 100 provided in FIG. 5B, FIG. 5C shows the related module interaction and the specific data flow when the electronic device saves and loads the thumbnail. In FIG. 5C, the application 1 can acquire a picture and request to save the picture and the thumbnail corresponding to the picture. The application 2 can request to load and display the thumbnail. The application 1 can be any application in the electronic device 100 that can acquire and save a picture, for example, a camera. The application 2 can be any application in the electronic device 100 that can display a thumbnail, for example, a gallery, a file management, a picture selection, and the like. Hereinafter, the application 1 is taken as a camera and the application 2 is taken as a gallery as an example for illustration. It can be understood that the application 1 and the application 2 are not specifically limited in the embodiments of the present application.

[0224] As shown in FIG. 5C, the electronic device 100 saving the thumbnail and displaying the thumbnail in the gallery can include the following steps:

[0225] Steps 1-3: Saving the thumbnail.

[0226] 1. The electronic device 100 receives and responds to the operation of the camera application, the electronic device 100 takes a picture and transmits the taken picture to the media library.

[0227] The user can click the shooting control in the shooting interface of the camera application, and the camera of the electronic device 100 can take a picture in response to the user operation. The electronic device 100 can transmit the picture taken by the camera to the media library.

[0228] In some possible examples, the electronic device 100 can first transmit the picture taken by the camera to the camera application, process the taken picture through the related algorithm of the camera application, and then transmit the picture processed by the camera application to the media library. The embodiments of the present application are not limited in this regard.

[0229] 2. The data processing module in the media library processes the taken picture and sends the processed picture data to the file system module.

[0230] The media library can generate the thumbnail A2 corresponding to the taken picture A1 based on the taken picture A1, and then process the thumbnail A2 through the data processing module to obtain the texture data A3. Then, the media library can send a storage instruction to instruct the distributed data management module to transmit the texture data A3 to the thumbnail database in the file system module.

[0231] For example, the media library can compress the taken picture A1 to obtain the thumbnail A2 corresponding to the picture. The embodiments of the present application are not limited in the way of generating the thumbnail A2 corresponding to the picture A1.

[0232] Optionally, in a possible implementation, when the electronic device 100 displays a browser application or a communication application, in response to an operation of the user saving a picture B1 displayed in an application interface of the browser application or the communication application, the electronic device 100 can download the picture B1. Then, the electronic device 100 can transmit the downloaded picture B1 to the media library. The media library can generate a thumbnail B2 corresponding to the picture B1, and process the thumbnail to obtain texture data B3. Then, the media library can transmit the texture data B3 to the thumbnail database in the file system module.

[0233] ③. The distributed data management module stores the picture data in order to the file system module.

[0234] The distributed data management module can store the texture data obtained by processing the thumbnail in the file system module based on the storage instruction sent by the media library.

[0235] In a possible implementation, the distributed data management module can store the texture data in the thumbnail database in the file system module. In some examples, the thumbnail database can be implemented as a key-value database (KVDB). The KVDB can store or index data based on key-value pairs of data.

[0236] Further, in a possible implementation, the distributed data management module can also store the texture data corresponding to the thumbnail in the KVDB in order according to the preview order of the thumbnail in the thumbnail display interface. In this way, the KVDB can provide the ability to query the texture data of the thumbnail according to the range.

[0237] In a possible implementation, the media library can also instruct the distributed data management module to send the photographed picture to the file system module. The file system module can store the photographed picture.

[0238] For storage of the texture picture obtained by processing the thumbnail, refer to the description of FIG. 6 below, which will not be described here in detail.

[0239] Steps 4-7: Display the thumbnail.

[0240] ④. The gallery issues a picture loading request to the loading framework.

[0241] When the user opens the gallery, or when the user slides in the thumbnail display interface of the gallery, the gallery can issue a picture loading request to the loading framework in the framework layer.

[0242] ⑤. The reading module in the loading framework reads the picture data.

[0243] The reading module in the loading framework can obtain picture data from the media library based on an application-issued picture loading request. Then, the media library can read the picture data from the database of the file system module based on the picture loading request.

[0244] In a possible implementation, the picture data read by the reading module is the texture data corresponding to the thumbnail. The texture data does not need to be decoded and can be directly sent to the display.

[0245] Further, the reading module can read picture data in batches, that is, texture data corresponding to multiple thumbnails can be obtained at a time.

[0246] ⑥. The reading module transmits the read picture data to the splicing module.

[0247] The reading module can transmit the read picture data, that is, the texture data, to the splicing module.

[0248] ⑦. The splicing module splices the read picture data and sends the spliced large picture to the graphics subsystem.

[0249] The splicing module can splice the read picture data to obtain spliced picture data. In some examples, the spliced picture data is referred to as large picture data or a large picture.

[0250] The splicing module can transmit the spliced picture data to the graphics subsystem.

[0251] ⑧. The graphics subsystem renders the large picture and sends the rendered large picture to the gallery.

[0252] The graphics subsystem can render the spliced picture data to obtain a rendered large picture. After receiving the rendered large picture, the display module in the gallery can send the rendered large picture to the display.

[0253] For how the electronic device 100 loads and displays the thumbnail, refer to the description of FIG. 8 below, which will not be repeated here.

[0254] The specific process in which the electronic device 100 saves the thumbnail in the embodiment of the present application is described below.

[0255] FIG. 6 exemplarily shows a flowchart of saving a thumbnail by the electronic device 100 in the embodiment of the present application. As shown in FIG. 6, saving a thumbnail by the electronic device 100 can include the following steps:

[0256] S601. The electronic device 100 saves picture 1 to the media library.

[0257] The picture 1 can be captured by a camera of the electronic device 100 or downloaded by the electronic device 100 based on a save operation of a user. Embodiments of the present application do not limit this.

[0258] In some examples, the picture 1 can also be referred to as an original picture.

[0259] The electronic device 100 can save the picture 1 to the media library based on a capture operation of a user or a save operation of a user clicking.

[0260] In some examples, the picture 1 obtained by the electronic device 100 can be in an RGBX format. Then, the electronic device 100 can encode the picture 1 into binary data in a joint photographic experts group (JPEG) format and store the binary data in the JPEG format to the media library. The binary data in the JPEG format can be source data or referred to as source data of the picture 1.

[0261] S602. The electronic device 100 creates metadata of the picture 1, and the metadata of the picture 1 includes uniform resource locator (URL) information, date and time information, and identity information of the picture 1.

[0262] When saving the picture 1 to the media library, the electronic device 100 can create metadata of the picture 1, and the metadata of the picture 1 can include one or more of the following: a uniform resource locator (URL) of the picture 1, date and time information, and identity information.

[0263] In embodiments of the present application, the electronic device 100 can create metadata corresponding to a picture when saving the picture. Then, the electronic device 100 can store the created metadata to a metadata database. The metadata of the picture is used to describe attribute information of the picture, for example, to indicate a storage location, a file name, a picture size, an occupied space, a creation time, an identity, and the like of the picture. The electronic device 100 can find the corresponding picture and a thumbnail corresponding to the picture based on the metadata of the picture.

[0264] The electronic device 100 can have one metadata database and one thumbnail database. The metadata database can be used to store metadata, and the thumbnail database can be used to store texture data corresponding to a thumbnail. In some examples, the thumbnail data can be implemented as a key-value database (KVDB). Hereinafter, the thumbnail database is taken as an example of the key-value database (KVDB).

[0265] The metadata can include one or more of a uniform resource locator, date and time information, and identity information. The uniform resource locator can be used to indicate the storage location of the picture corresponding to the metadata. The date and time information can be used to indicate the time (also referred to as the creation time) at which the electronic device 100 obtains the picture. The identity information is a unique identifier of the picture, and can be used to distinguish two pictures when other attribute information (for example, the storage location, the creation time, the file name, the picture size, the occupied space, and the creation time) of the two pictures is the same.

[0266] In some examples, the URL can also be referred to as a link. The electronic device 100 can find the storage location of the source data of the picture 1 based on the URL in the metadata of the picture 1, and obtain the source data of the picture 1 based on the URL.

[0267] The date and time information datetime of the picture 1 can include the date and time at which the electronic device 100 captures or downloads the picture 1. For example, the date at which the electronic device 100 captures the picture 1 is February 20, 2023, and the time is 08:30:45. The date and time information of the picture 1 created by the electronic device 100 can be “20230220_083045”. That is, the format of the date and time information created by the electronic device 100 can be “year-month-day_hour-minute-second”. It can be understood that the format of the date and time information is not limited in the embodiments of the present application.

[0268] The metadata of the picture 1 can also include the identity information of the picture. For example, the identity information of the picture 1 can be the primary key ID corresponding to the picture 1. Alternatively, the primary key ID of the picture 1 can be composed of numbers, for example, the primary key ID of the picture 1 can be 1. It can be understood that the primary key ID of each picture saved in the electronic device 100 is different.

[0269] In a possible implementation, the electronic device 100 generates the primary key ID of the picture saved in the electronic device 100 in a sequentially increasing manner. That is, the more recent the date and time of the picture saved in the electronic device 100, the greater the value of the primary key ID corresponding to the picture. For example, the date at which the electronic device 100 captures the picture 1 is February 20, 2023, and the time is 08:30:45. The primary key ID corresponding to the picture 1 can be 10. The primary key ID of the next picture 2 saved by the electronic device 100 after the picture 1 can be increased by a first value based on the primary key ID of the picture 1. For example, the first value is 1, that is, the primary key ID of the picture 2 can be 11.

[0270] The embodiments of the present application do not limit the primary key ID of the picture 1. The embodiments of the present application also do not limit the specific value of the first value.

[0271] S603. The electronic device 100 generates the thumbnail 1 of the picture 1.

[0272] The electronic device 100 can generate the thumbnail 1 of the picture 1. Illustratively, the electronic device 100 can down-sample the picture 1 to obtain the thumbnail 1. The thumbnail 1 has a size smaller than that of the picture 1.

[0273] In a possible implementation, referring to FIG. 5B, the media library of the electronic device 100 can include a data processing module. The electronic device 100 can also down-sample the picture 1 to obtain the thumbnail 1 of the picture 1 through the data processing module.

[0274] When the picture 1 is obtained by the electronic device 100, the electronic device 100 can generate the thumbnail corresponding to the picture 1 at the same time when the picture 1 is obtained. When the picture 1 is obtained by the electronic device 100, the electronic device 100 can generate the thumbnail 1 of the picture 1 after the picture 1 is downloaded and the gallery is opened by the user.

[0275] It can be understood that in the metadata database, metadata corresponding to the original picture (e.g., the picture 1) can be included, and metadata corresponding to the thumbnail (e.g., the thumbnail 1) can also be included.

[0276] S604. The electronic device 100 encodes the thumbnail 1 to obtain the texture data 1.

[0277] The electronic device 100 can encode the thumbnail 1 to obtain the texture data 1. The texture data 1 can support direct display, that is, the electronic device 100 does not need to be decoded before obtaining the texture data 1 for display.

[0278] In a possible implementation, the electronic device 100 can use adaptive scalable texture compression (ASTC) to encode the thumbnail to obtain binary data in the ASTC format. The binary data in the ASTC format can also be referred to as texture data.

[0279] In a possible implementation, referring to FIG. 5B, the media library of the electronic device 100 can include a data processing module. The electronic device 100 can also use the data processing module to encode the thumbnail 1 using ASTC to obtain binary data in the ASTC format corresponding to the thumbnail 1 (which can be referred to as the texture data 1).

[0280] Compared with the binary data in the JPEG format, the binary data in the ASTC format can be directly displayed without decoding. Before being displayed, the binary data in the JPEG format needs to be decoded by the electronic device 100. In this way, when the electronic device 100 stores the thumbnail in the binary data in the ASTC format, the electronic device 100 can directly display the thumbnail without decoding after obtaining the binary data in the ASTC format corresponding to the thumbnail, so that the display frame rate of the electronic device 100 can be improved.

[0281] In S605, the electronic device 100 saves the texture data 1 into the database, and the key information of the texture data 1 in the database includes the date and time information and the identity information of the picture 1.

[0282] In some possible implementation, the electronic device 100 saves the texture data corresponding to the plurality of thumbnails into the database according to the display order of the plurality of thumbnails. The plurality of thumbnails include the thumbnail 1, and the texture data corresponding to the plurality of thumbnails include the texture data 1. The electronic device 100 saves the texture data 1 corresponding to the thumbnail 1 into the database according to the display order of the thumbnail 1, and the key information of the texture data 1 in the database includes the date and time information and the identity information of the picture 1.

[0283] In some possible implementation, the electronic device 100 determines the display order of the thumbnails based on the date and time information of the plurality of thumbnails. The electronic device 100 can display the thumbnail with earlier date and time before the thumbnail with later date and time.

[0284] Further, in a possible implementation, the electronic device 100 can display the thumbnail with earlier date and time before the thumbnail with later date and time, which can include that the electronic device 100 can display the thumbnail with earlier date and time in the row above the thumbnail with later date and time. Alternatively, for example, the electronic device 100 can display the thumbnail with earlier date and time in the same row as the thumbnail with later date and time, but the position of the thumbnail with earlier date and time is before the thumbnail with later date and time. For example, the electronic device 100 arranges the thumbnails from left to right, and then the thumbnail with earlier date and time is displayed in the same row as the thumbnail with later date and time, and the position of the thumbnail with earlier date and time is before the thumbnail with later date and time, that is, the thumbnail with earlier date and time is displayed in the same row as the thumbnail with later date and time, and the thumbnail with earlier date and time is on the left side of the thumbnail with later date and time.

[0285] For example, the date and time of the original picture corresponding to the thumbnail 1 (i.e., the picture 1) is "2023-02-20 08:30:45", and the date and time of the original picture corresponding to the thumbnail 2 is "2023-02-20 09:30:45". That is, the time when the electronic device 100 acquires the original picture of the thumbnail 2 is later than the time when the electronic device 100 acquires the original picture of the thumbnail 1. Then, the electronic device 100 displays the thumbnail 2 in the same row as the thumbnail 1, and the thumbnail 2 is located on the left side of the thumbnail 1; or the electronic device 100 displays the thumbnail 1 in the next row of the thumbnail 2. When the electronic device 100 does not acquire other pictures within the date and time of acquiring the original picture of the thumbnail 1 to the date and time of acquiring the original picture of the thumbnail 2. Then, if the thumbnail 2 and the thumbnail 1 are displayed in the same row, the thumbnail 2 is adjacent to the left side of the thumbnail 1; if the thumbnail 2 and the thumbnail 1 are not in the same row, the thumbnail 2 can be displayed on the right side of the last row, and the thumbnail 1 can be displayed on the left side of the next row.

[0286] Alternatively, in another possible implementation, the electronic device 100 determines the display order of the thumbnails based on the date and time order of the plurality of thumbnails and the primary key ID order corresponding to the plurality of thumbnails. In the case where the electronic device 100 determines the display order of the thumbnails based on the date and time information and the primary key ID, the electronic device 100 can store the texture data corresponding to the thumbnails in descending order of the date and time and the primary key ID.

[0287] Exemplarily, as shown in FIG. 7, the electronic device 100 displays the thumbnails according to the date time datetime and the primary key ID, and the date time is arranged in descending order, and the primary key ID is arranged in descending order. The string composed of the date time and the primary key ID of the first thumbnail in the first row of the thumbnail display interface displayed by the electronic device 100 is "20230201000102_768". The string "20230201000102_768" indicates that the date time corresponding to the first thumbnail is "2023-02-01 00:01:02", and the primary key ID corresponding to the first thumbnail is "768". The string composed of the date time and the primary key ID of the last thumbnail in the first row of the thumbnail display interface displayed by the electronic device 100 is "20230201000101_753". The string "20230201000101_753" indicates that the date time corresponding to the last thumbnail is "2023-02-01 00:01:01", and the primary key ID corresponding to the last thumbnail is "753". The string composed of the date time and the primary key ID of the first thumbnail in the second row of the thumbnail display interface displayed by the electronic device 100 is "20230201120101_752". The string "20230201120101_752" indicates that the date time corresponding to the first thumbnail is "2023-02-01 12:01:01", and the primary key ID corresponding to the first thumbnail is "752". The string composed of the date time and the primary key ID of the last thumbnail in the second row of the thumbnail display interface displayed by the electronic device 100 is "20230130120101_737". The string "20230130120101_737" indicates that the date time corresponding to the last thumbnail is "2023-01-30 12:01:01", and the primary key ID corresponding to the last thumbnail is "737".

[0288] That is, the date time of the 16 thumbnails in the first row is arranged in descending order, and the primary key ID is arranged in descending order from "768" to "753" in turn. Then, when the electronic device 100 generates the thumbnails in the first row and stores them into the database, the 16 thumbnails in the first row are also stored into the storage thumbnail database in turn according to the display order. The date time of the 16 thumbnails in the second row is arranged in descending order, and the primary key ID is arranged in descending order from "752" to "737" in turn. The 16 thumbnails in the second row are also stored into the thumbnail database in turn according to the display order. The position of the first thumbnail in the second row in the thumbnail database is adjacent to the position of the last thumbnail in the 16 thumbnails in the first row in the thumbnail database.

[0289] Exemplarily, the database can be a KVDB. That is, the storage order of the plurality of thumbnails in the database is consistent with the display order of the plurality of thumbnails in the thumbnail display interface.

[0290] It can be understood that the date and time and the primary key of the first thumbnail in the first row and the second row of thumbnails shown in FIG. 7 are only examples, and the date and time and the primary key of the last thumbnail in the first row and the second row of thumbnails shown in FIG. 7 are also only examples. The display order of the thumbnails in the thumbnail display interface is embodied by the date and time and the primary key of the first thumbnail and the date and time and the primary key of the last thumbnail in the first row and the second row of thumbnails shown in FIG. 7.

[0291] In a possible implementation, the corresponding key information of the thumbnail in the database can be a datetime_id string composed of the date and time and the primary key ID of the thumbnail. When storing the thumbnail, the electronic device 100 stores the thumbnail in order according to the datetime_id string of the thumbnail. In this way, the database KVDB in the electronic device 100 that stores the thumbnail provides the capability of querying a batch of thumbnails according to a range. For example, the gallery application can initiate a request for reading thumbnails, and the request carries the maximum value max and the minimum value min of the key information. The KVDB can return all thumbnails with key information in the range from min to max. It can be understood that if the KVDB stores the texture data of the thumbnail, the KVDB can return the texture data of all thumbnails with key information in the range from min to max. If the KVDB stores the decoded thumbnail, the KVDB can return all decoded thumbnails with key information in the range from min to max.

[0292] In the embodiment of the present application, the KVDB can store the texture data of the thumbnail, and can also store the decoded thumbnail, which is not limited in the embodiment of the present application.

[0293] In a possible implementation, the electronic device 100 can store the plurality of thumbnails in order according to the display order in the KVDB through the data storage service in the distributed data management.

[0294] Based on the above-described storage manner of the thumbnail, the process of reading and displaying the thumbnail when the electronic device displays the thumbnail will be specifically introduced below.

[0295] FIG. 8 exemplarily shows a flowchart of a picture display method provided by the embodiment of the present application. As shown in FIG. 8, the picture display method provided by the embodiment of the present application can include the following steps:

[0296] S801. In response to a user operation on the gallery application, the gallery application of the electronic device 100 acquires all metadata, which includes one or more of a uniform resource locator, date and time information, and identity information.

[0297] The user operation on the gallery application can include an operation of starting the gallery application, a view scene switching operation performed by the user in the gallery application, which can include any one of an operation of switching from a day view scene to a month view scene or a year view scene, an operation of switching from a month view scene to a day view scene or a year view scene, an operation of switching from a year view scene to a day view scene or a month view scene, and the like. For example, the user can click the month view control 103b or the year view control 103c in the thumbnail display interface 101 shown in FIG. 1. For another example, the user can click the day view control 103a or the year view control 103c in the thumbnail display interface 200 shown in FIG. 2. For yet another example, the user can click the day view control 103a or the month view control 103b in the thumbnail display interface 300 shown in FIG. 3.

[0298] It can be understood that the present application does not specifically limit the user operation on the gallery application.

[0299] The electronic device 100 can receive a user operation on the gallery application, and in response to the operation, the gallery application of the electronic device 100 can acquire all metadata stored in the metadata database in the electronic device 100. Each picture acquired by the electronic device 100 has corresponding metadata. The metadata of the picture is used to describe the attribute information of the picture, for example, to indicate the storage location, the file name, the picture size, the occupied space, the creation time, the identity, and the like of the picture. The electronic device 100 can find the corresponding picture and the thumbnail corresponding to the picture based on the metadata of the picture.

[0300] The electronic device 100 can have one metadata database and one thumbnail database. The metadata database can be used to store metadata, and the thumbnail database can be used to store texture data corresponding to thumbnails. In some examples, the thumbnail data can be implemented as a key-value database (KVDB).

[0301] The metadata can include one or more of a uniform resource locator, date and time information, and identity information. The uniform resource locator can be used to indicate the storage location of the picture corresponding to the metadata. The date and time information can be used to indicate the time (also referred to as the creation time) at which the electronic device 100 acquires the picture. The identity information is the unique identity of the picture, and when other attribute information (for example, the storage location, the creation time file name, the picture size, the occupied space, the creation time, and the like) of two pictures are the same, the two pictures can be distinguished by the identity information.

[0302] S802. Electronic device 100 assembles all metadata to obtain multiple assembly information.

[0303] Electronic device 100 can assemble all metadata, for example, combine date and time information and identity information in the metadata into a string; then, electronic device 100 can obtain the assembly information of each metadata.

[0304] In some possible implementations, since the key information in the KVDB storing thumbnails is a string composed of the date and time information and the primary key ID corresponding to each thumbnail, when electronic device 100 queries the KVDB and reads the corresponding thumbnail, it needs to use the key information to find the thumbnail corresponding to the key information stored in the KVDB. Therefore, electronic device 100 needs to assemble the metadata according to the format of the key information to obtain assembled information. For example, electronic device 100 can assemble the date and time and the primary key ID in the metadata corresponding to each thumbnail into a string in the form of datetime_id. In this way, electronic device 100 can obtain the assembled information corresponding to all thumbnails, and the assembled information of each thumbnail is the date and time and the primary key ID in the data corresponding to that thumbnail assembled into a string in the form of datetime_id. For example, the date and time in the metadata corresponding to thumbnail 1 is "February 20, 2023, 08:30:45", and the primary key ID is 01. The assembled information corresponding to thumbnail 1 could be "20230220083045_01".

[0305] It is understood that the format of the assembled information is consistent with the format of the key information. When the key information of the KVDB is in another format, the electronic device 100 can assemble the metadata to obtain assembled information that is consistent with the format of the key information. This application embodiment does not limit the specific format of the key information.

[0306] In one possible implementation, when a user opens the gallery, the electronic device 100 has already executed steps S801 and S802, meaning it has already acquired and assembled all metadata. Then, when the user switches view scenes within the gallery application, the electronic device 100 does not need to acquire and assemble the metadata again. It can directly use the assembled information obtained when opening the gallery. In other words, the electronic device 100 does not need to execute steps S801 and S802 again.

[0307] S803. Electronic device 100 determines the optimal number of thumbnails for batch reading performance to be m.

[0308] The electronic device 100 can store KVDB, which supports batch reading of thumbnails. The optimal number of thumbnails is m.

[0309] In a possible implementation, the number of the thumbnail images that the KVDB supports to be read in batches is determined by the performance of the storage chip (which can also be referred to as a memory) in the electronic device 100 and / or the performance of the I / O interface. The better the performance of the storage chip and the better the performance of the I / O interface, the more thumbnail images that the electronic device 100 can read in batches from the KVDB, that is, the greater the value of m.

[0310] It can be understood that the maximum number of the thumbnail images that the KVDB supports to be read in batches can also be different for electronic devices with different performance of the storage chip and / or different performance of the I / O interface. That is, the value of m can be different for different electronic devices. The embodiments of the present application do not limit the specific value of m.

[0311] It can be understood that the electronic device 100 is optimal in performance when reading m thumbnail images in batches at a time, but it does not mean that the electronic device 100 can only read m thumbnail images at a time. The number of the thumbnail images that the electronic device 100 reads in batches at a time can be greater than m or less than m.

[0312] S804. The electronic device 100 determines that the total number of the stored thumbnail images is n, and the number of columns of the thumbnail images that the thumbnail image display interface can display is y.

[0313] The electronic device 100 can determine that the total number of the thumbnail images stored in the KVDB is n. It can be understood that in the thumbnail image display interface under any view scene displayed by the electronic device 100, the user can view all the thumbnail images stored in the electronic device 100 through the up and down sliding operations.

[0314] It can be understood that the total number of the thumbnail images stored by the electronic devices of different users can be different. For the electronic device of the same user, the total number of the thumbnail images stored at different times can also be different. The embodiments of the present application do not limit the value of n, that is, the total number of the thumbnail images stored in the electronic device 100.

[0315] The number of columns y of the thumbnail images that the thumbnail image display interface under different view scenes can display can be configured in the system of the electronic device 100. The electronic device 100 can determine the number of columns y of the thumbnail images that the thumbnail image display interface can display from the system configuration. The embodiments of the present application do not limit the specific value of y.

[0316] Although each view scene of the thumbnail display interface can display all the thumbnails stored in the electronic device 100 through the up and down sliding operation of the user, the number of thumbnails that can be displayed in the current display area of the thumbnail display interface in different scenes is different, and the number of columns of thumbnails that can be displayed is also different. The size of the current display area is equal to the size of the display screen.

[0317] For example, the number of thumbnails that can be displayed in the current display area of the thumbnail display interface in the day view scene is less than the number of thumbnails that can be displayed in the current display area of the thumbnail display interface in the month view scene. The number of columns of thumbnails that can be displayed in the current display area of the thumbnail display interface in the day view scene is less than the number of columns of thumbnails that can be displayed in the current display area of the thumbnail display interface in the month view scene. The number of thumbnails that can be displayed in the current display area of the thumbnail display interface in the month view scene is less than the number of thumbnails that can be displayed in the current display area of the thumbnail display interface in the year view scene. The number of columns of thumbnails that can be displayed in the current display area of the thumbnail display interface in the month view scene is less than the number of columns of thumbnails that can be displayed in the current display area of the thumbnail display interface in the year view scene. Referring to the thumbnail display interface 101 in the day view scene shown in FIG. 1, the number of thumbnails that can be displayed in the current display area of the thumbnail display interface 101 is 32, and the 32 thumbnails can be arranged in an 8-row and 4-column distribution relationship. Referring to the thumbnail display interface 200 in the month view scene shown in FIG. 2, the number of thumbnails that can be displayed in the current display area of the thumbnail display interface 200 is 108, and the 108 thumbnails can be arranged in a 16-row and 8-column distribution relationship. Referring to the thumbnail display interface 300 in the year view scene shown in FIG. 3, the number of thumbnails that can be displayed in the current display area of the thumbnail display interface 300 is 512, and the 512 thumbnails can be arranged in a 32-row and 16-column distribution relationship.

[0318] The number of thumbnails that can be displayed in the current display area of the thumbnail display interface of different types of electronic devices 100, and the number of columns are also different. The larger the display screen of the electronic device 100, the more the number of thumbnails that can be displayed in the current display area of the thumbnail display interface of the electronic device 100 and the number of columns of thumbnails. For example, in the case of the size of the display screen of the tablet is larger than the size of the display screen of the mobile phone, the number of thumbnails that can be displayed in the current display area of the thumbnail display interface of the tablet under each view scene and the number of columns are more than the number of thumbnails that can be displayed in the current display area of the thumbnail display interface of the mobile phone under the corresponding view scene. That is, even in the year view scene, the number of thumbnails that can be displayed in the current display area of the thumbnail display interface of the tablet is more than the number of thumbnails that can be displayed in the current display area of the thumbnail display interface of the mobile phone; the number of columns of thumbnails that can be displayed in the current display area of the thumbnail display interface of the tablet is more than the number of columns of thumbnails that can be displayed in the current display area of the thumbnail display interface of the mobile phone.

[0319] In a possible implementation, when the user opens the gallery, the electronic device 100 has already performed step S803, that is, has determined that the batch reading thumbnail performance optimal number of sheets is m. Then, when the user switches the view scene in the gallery application, the electronic device 100 can not need to determine the batch reading thumbnail performance optimal number of sheets again, and can directly use the determination result when opening the gallery. That is, the electronic device 100 does not need to perform step S803 again.

[0320] S805. The electronic device 100 determines, based on m and n, that the number of view controls required in the thumbnail display interface is v, and the number of thumbnails supported by each of the v view controls to display and the distribution relationship of each view control, wherein the v view controls include view control 1, the number of thumbnails supported by the view control 1 to display is k, and the distribution relationship of the view control 1 is x rows y columns.

[0321] The electronic device 100 can determine, based on the total number n of thumbnails stored in the electronic device 100 and the batch reading thumbnail performance optimal number of sheets m, that the number of view controls required in the thumbnail display interface is v. The electronic device 100 also needs to determine the number of thumbnails supported by each of the v view controls to display and the distribution relationship of each view control. The v view controls can include view control 1, the number of thumbnails supported by the view control 1 to display is k, and the distribution relationship of the k thumbnails is x rows y columns.

[0322] In a possible implementation, m is greater than n, then the electronic device 100 can read all the thumbnails in one batch reading. Then, the electronic device 100 only needs to create 1 view control to initiate a request for reading thumbnails. That is, the value of v is 1. For example, if n = 500 and m = 800, then the electronic device 100 only needs to create 1 view control to initiate a request for reading thumbnails, and read 500 thumbnails in one batch. Here, reading thumbnails refers to reading the texture data corresponding to the thumbnails stored in the KVDB.

[0323] In this way, the thumbnail display interface displayed by the electronic device 100 only needs one view control, and when the user slides up and down the thumbnail display interface, the view control has already prepared the thumbnails to be displayed, so that when the user slides up and down the thumbnail display interface, the electronic device 100 can display the thumbnails in the thumbnail display interface more quickly, thereby improving the user experience.

[0324] Further, in a possible implementation, the electronic device 100 can determine the number of rows x needed to be displayed by the view control based on the number of columns of thumbnails that can be displayed by the view control and n. The number of columns of thumbnails that can be displayed by the view control is equal to the number of columns y of thumbnails that can be displayed by the thumbnail display interface. In different view scenarios, the number y of columns of thumbnails that can be displayed in the thumbnail display interface is fixed, and the value of y can be configured by the system. The number of rows needed to be displayed by the view control changes with the number of thumbnails needed to be displayed.

[0325] In some possible examples, x is equal to the upward rounding value of (n / y). Wherein, “ / ” represents a division operator. For example, n = 100 and y = 16, then 100 / 16 = 6.25, and the upward rounding of 6.25 can obtain 7, that is, x = 7.

[0326] Optionally, in another possible implementation, m is less than n, and 1 view control can read m thumbnails in one batch. Then, the electronic device 100 needs to obtain n thumbnails through multiple view controls. The number v of view controls is equal to the upward rounding value of (n / m). For example, n = 512 and m = 200, then n / m = 512 / 200 = 2.56, and the upward rounding of 2.56 can obtain 3. That is, the number v of view controls is equal to 3. That is, the electronic device 100 needs to create 3 view controls to obtain 512 thumbnails.

[0327] Further, in a possible implementation, the electronic device 100 first determines the number of rows x that the view control 1 in the v view controls needs to display. x is equal to the upward rounding value of (m / y). Then the maximum number of thumbnails that the view control 1 can display is x*y. Wherein x*y is greater than or equal to m. The number of rows that other view controls in the v view controls need to display is determined based on n, and the maximum number of thumbnails that the view control 1 can display (i.e. k), and the number of columns of thumbnails that the view control can display.

[0328] For example, taking v equal to 3, n=512, m=200, and y=16 as an example. Then the number of rows x that the view control 1 needs to display is equal to the upward rounding value of (200 / 16=12.5), which is 13. Then the number of thumbnails that the view control 1 can display is 13*16=208. The number of rows p that the view control 2 needs to display is equal to the upward rounding value of (200 / 16=12.5), which is 13. Then the number of thumbnails that the view control 2 can display is 13*16=208. In this way, the view control 1 and the view control 2 can both display 208 thumbnails, and the view control 3 only needs to display the remaining 96 (512-208-208=96) thumbnails. The number of rows q that the view control 3 needs to display is equal to 6 (96 / 16=6).

[0329] It can be understood that for the number of thumbnails k that the view control 1 supports to display, the number of thumbnails that the view control 1 needs to batch read is k. When k is equal to m, the performance of the view control 1 in batch reading thumbnails is optimal. When k is less than m, or greater than m, but the difference between k and m is not large, although the performance of the view control 1 in batch reading thumbnails is not optimal, the impact on the performance is also large.

[0330] For example, taking the number of thumbnails n stored in the electronic device 100 as 768 and m as 256 as an example, then the electronic device 100 can determine that the number of view controls needed is 3 (768 / 256=3). As shown in FIG. 9A, the electronic device 100 can determine that the number of view controls needed for the thumbnail display interface 300 is 3, i.e. the view control 901, the view control 902, and the view control 903. The view control 901 and the view control 902 can be in the current display area of the thumbnail display interface 300, and the view control 903 is not in the current display area of the thumbnail display interface 300. The electronic device 100 needs to determine the number of thumbnails that the view control 901, the view control 902, and the view control 903 support to display, and then also needs to determine the distribution relationship of the view control 901, the view control 902, and the view control 903 respectively. For example, the distribution relationship of the view control 901 is x rows y columns. That is, the view control 901 can display x rows y columns of thumbnails.

[0331] Referring to FIG. 5B, in one possible implementation, the electronic device 100 can create v view controls through the display module in the gallery application.

[0332] S806. The electronic device 100 distributes the plurality of assembly information according to the number of thumbnails supported by the v view controls to determine assembly information corresponding to each view control, wherein the view control 1 corresponds to k assembly information.

[0333] The electronic device 100 can distribute the assembly information of the thumbnails of the electronic device 100 to determine which thumbnails can be displayed by each view control, respectively. For example, the electronic device 100 can divide the assembly information of the thumbnails into v groups, and each view control can display x*y=k thumbnails. Then, the electronic device 100 can distribute the assembly information of the x*y thumbnails with the latest date and time, a total of k assembly information, to the view control 1. The electronic device 100 can distribute the v groups of assembly information to the v view controls in order of display order.

[0334] For example, as shown in FIG. 9B, the electronic device 100 can distribute the assembly information 20230201000102_768 to the assembly information 20230120080102_513, a total of 256 assembly information, to the view control 901, and then the view control 901 can display 256 thumbnails corresponding to the assembly information 20230201000102_768 to the assembly information 20230120080102_513.

[0335] As shown in FIG. 9B, the electronic device 100 can distribute the assembly information 20230118090102_512 to the assembly information 20230101120102_257, a total of 256 assembly information, to the view control 902, and then the view control 902 can display 256 thumbnails corresponding to the assembly information 20230118090102_512 to the assembly information 20230101120102_257.

[0336] As shown in FIG. 9B, the view control 901 and the view control 902 can be displayed in the current display area of the thumbnail display interface 300. The user can slide upwards to view the thumbnails displayed in the view control 903. In response to the operation of the user sliding upwards in the current display area of the thumbnail display interface 300, the electronic device 100 can display the view control 903 in the current display area of the thumbnail display interface 300.

[0337] As shown in FIG. 9C, in response to the upward swiping operation of the user, the electronic device 100 can display, in the current display of the thumbnail display interface 300, a part of the spliced large image carried by the view control 901, the entire spliced large image carried by the view control 902, and a part of the spliced large image carried by the view control 903.

[0338] As shown in FIG. 9D, when the user continues to swipe upward, in response to the swiping operation, the electronic device 100 can display the view control 902 and the view control 903 in the current display area of the thumbnail display interface 300. The electronic device 100 can assign the assembly information 20221218120102_256 to the assembly information 20221010090102_001, a total of 256 assembly information, to the view control 903, and then the view control 903 can display 256 thumbnails corresponding to the assembly information 20221218120102_256 to the assembly information 20221010090102_001.

[0339] S807. The view control 1 in the electronic device 100 initiates a loading request, wherein the loading request carries k assembly information.

[0340] The view control 1 in the electronic device 100 initiates a loading request, wherein the loading request can carry k assembly information.

[0341] Referring to FIG. 5C, in a possible implementation manner, the display module in the electronic device 100 can issue the loading request initiated by the view control 1 to the reading module in the loading framework.

[0342] S808. The electronic device 100 sets a query range based on the k assembly information, and obtains all thumbnails in the query range.

[0343] The electronic device 100 can find the largest datetime_id string and the smallest datetime_id string in the assembly information of the k thumbnails. The largest datetime_id string indicates the assembly information corresponding to the thumbnail with the latest date and time and the largest primary key ID value in the k thumbnail assembly information. The smallest datetime_id string indicates the assembly information corresponding to the thumbnail with the earliest date and time and the smallest primary key ID value in the k thumbnail assembly information.

[0344] For convenience of description, the largest datetime_id string can be recorded as datetime_id(max), and the smallest datetime_id string can be recorded as datetime_id(min).

[0345] Then, the electronic device 100 can set the query range as datetime_id(min)—datetime_id(max). The electronic device 100 can acquire the texture data corresponding to all the thumbnails of the key information in the query range based on the query range.

[0346] Exemplarily, if the maximum datetime_id string in the corresponding assembly information in the k thumbnails is “20240220100000_208” and the minimum datetime_id string is “20230220100000_000”. Then, the query range set by the electronic device 100 is “20230220100000_000”—“20240220100000_208”. The electronic device 100 can acquire the texture data corresponding to all the thumbnails of the key information in the query range according to the query range.

[0347] Referring to FIG. 5C, in one possible implementation, the electronic device 100 can set the query information by loading the reading module in the framework, which can acquire the texture data corresponding to all the thumbnails in the query range from the thumbnail database. Specifically, the reading module can set the query command of the KVDB, which can carry datetime_id(min) and datetime_id(max). After the KVDB receives the query command, it only needs to query twice, once for the location of datetime_id(max), and then again for the location of datetime_id(min). Finally, the KVDB can return the whole block of storage buffer data in the query range to the reading module. The whole block of storage buffer data contains the texture data corresponding to all the thumbnails in the query range.

[0348] Further, in a possible implementation, after the reading module obtains the whole block of storage buffer data, the reading module traverses the buffer content to determine whether the key information of each thumbnail in the buffer falls within the query range of datetime_id(min)—datetime_id(max). If it falls within the query range of datetime_id(min)—datetime_id(max), the texture data corresponding to the thumbnail saved in the buffer is retained. If it does not fall within the query range of datetime_id(min)—datetime_id(max), the texture data corresponding to the thumbnail saved in the buffer is deleted. In turn, the reading module can traverse the key information corresponding to the whole block of buffer data, that is, the key information of the texture data corresponding to all thumbnails in the query range returned by the KVDB. In this way, it can be avoided that the whole block of buffer data returned by the KVDB contains data corresponding to a thumbnail that has been selected for deletion by the user. That is, the user has selected to delete some thumbnails in the thumbnail display interface, and the electronic device 100 has only performed logical deletion on the thumbnails, without performing physical deletion. That is, the electronic device 100 has deleted the metadata corresponding to the thumbnails, but the texture data corresponding to the thumbnails saved in the KVDB has not been deleted in time.

[0349] S809. The electronic device 100 splices the obtained thumbnails according to the distribution relationship x rows y columns to obtain a spliced texture map.

[0350] The electronic device 100 can splice the obtained k thumbnails according to the grouping result to obtain a spliced texture map. That is, the electronic device 100 splices the k thumbnails according to the distribution relationship of the k thumbnails in x rows y columns.

[0351] Specifically, in a possible implementation, the electronic device 100 can obtain the data size singlesize of the first thumbnail in the k thumbnails, the file header size headsize, and the shared memory with an application size of (x*y*singlesize+headsize) (* represents multiplication). The electronic device 100 fills the texture data corresponding to the k thumbnails into the shared memory in turn according to the grouping result of the k thumbnails, and finally obtains a buffer in which the k thumbnails are spliced.

[0352] Exemplarily, as shown in FIG. 10, taking k as 192, i.e., x = 12, y = 16 as an example. The electronic device 100 can obtain the texture data corresponding to the 192 thumbnails from the KVDB. Then, the electronic device 100 can create shared memory with an application size of (12*16*singlesize+headsize). The electronic device 100 can fill the 192 thumbnails into each memory block of the shared memory in sequence according to the grouping result, and finally obtain a buffer with the spliced texture map.

[0353] Referring to FIG. 5B, in a possible implementation, the reading module in the electronic device 100 transmits the obtained k thumbnails to the splicing module, and the splicing module splices the k thumbnails according to the grouping result to obtain the spliced texture map.

[0354] S810. The view control 1 of the electronic device 100 displays the texture map.

[0355] The view control 1 of the electronic device 100 can directly display the spliced texture map without decoding. In this way, the electronic device 100 can display the k thumbnails in the view control 1 more quickly.

[0356] In a possible implementation, the view control 1 of the electronic device 100 can instruct the graphics subsystem to render the spliced texture map. After the graphics subsystem completes the rendering, the view control 1 can display the rendered texture map.

[0357] The electronic device 100 can determine which view controls can be displayed in the current display area of the thumbnail display interface based on the first operation. For example, the electronic device 100 can determine that the view control 1 can be displayed in the current display area of the thumbnail display interface based on the first operation. Then, the view control 1 can determine the query range according to the k assembly information corresponding to the k thumbnails allocated to the view control 1 by the electronic device 100, and obtain the thumbnails in the query range. That is, the view control 1 can obtain the thumbnails and display the spliced thumbnails according to the above steps S807-S810.

[0358] It can be understood that when the electronic device 100 creates multiple view controls, the multiple view controls can obtain and display the k thumbnails according to the process of obtaining and displaying the k thumbnails in the view control 1 in the above steps S807-S810. The specific steps of obtaining and displaying the thumbnails by other view controls in the multiple view controls will not be described herein.

[0359] It can be understood that, taking the year view scene as an example, when the electronic device 100 switches from other view scenes to the year view scene, the electronic device 100 can display the thumbnail display interface in the year view scene according to the above steps S801-S810. When the electronic device 100 determines that the thumbnail display interface in the year view scene contains v view controls, the electronic device 100 has already allocated the number of thumbnails to be displayed by each view control and which thumbnails to be displayed. The electronic device 100 displays only one or more view controls in the current interface of the thumbnail display interface according to the above steps. When the user slides up and down in the thumbnail display interface, the electronic device 100 can determine which view control is displayed in the current interface based on the user sliding operation, and then batch acquires the multiple thumbnails to be displayed in the view control and splices the multiple thumbnails. Then, the electronic device 100 can display the spliced thumbnails. After display, the user can see the displayed thumbnails in the current interface of the thumbnail display interface. That is, when refreshing, each view control in the current interface can acquire and display thumbnails according to the above steps S807-S810 of acquiring and displaying k thumbnails in view control 1. Since the electronic device 100 has already determined the thumbnails to be displayed by each view control, and the electronic device 100 can batch acquire thumbnails when refreshing the display of thumbnails based on the user sliding operation. In this way, the electronic device 100 can display the refreshed thumbnails more quickly, and the display performance of the electronic device 100 can be improved. Thus, the user experience can be improved.

[0360] In addition, since the spliced texture map is stored in the shared memory, and the shared memory can support cross-process transmission, the rendering process can acquire the shared memory with the spliced texture map across processes, without copying between processes, which can reduce the number of memory copies of the electronic device 100, and thus the display performance of the electronic device 100 can be improved.

[0361] By the picture display method provided in the embodiments of the present application, the electronic device 100 stores the thumbnails corresponding to the photographed or saved pictures according to the arrangement order of the thumbnails in the thumbnail display interface when storing the thumbnails. In this way, the electronic device 100 has the capability of batch querying and obtaining the thumbnails. Then, when the electronic device displays the thumbnail display interface, the electronic device 100 can batch query and obtain the thumbnails. The electronic device 100 can splice the obtained multiple thumbnails to obtain spliced thumbnails, and then the electronic device 100 can display the spliced thumbnails through the view control. The displayed thumbnails in the thumbnail display interface are spliced into one or more large pictures. One view control can carry one large picture. In this way, the electronic device 100 can display a large number of thumbnails by using only a small number of view controls (for example, 1 or 2, etc.). Moreover, the electronic device 100 can batch query and obtain the thumbnails, which can reduce the number of times of calling the IO interface. In this way, the performance and frame rate of the electronic device in loading and displaying a large number of thumbnails can be improved, so that the problems of white blocks and lagging during the user's browsing of a large number of thumbnails can be avoided or reduced.

[0362] It can be understood that the picture display method provided in the embodiments of the present application is described by taking the display of thumbnails in the gallery as an example. In the present application, the application capable of displaying thumbnails is not limited, for example, the file management application can also display thumbnails. The process of displaying thumbnails by other applications capable of displaying thumbnails can refer to the process of displaying thumbnails by the gallery application, and the embodiments of the present application will not be described herein again.

[0363] FIG. 11 exemplarily shows a flow diagram of a picture display method provided in the embodiments of the present application. As shown in FIG. 11, the picture display method provided in the embodiments of the present application can include the following steps:

[0364] S1101. The electronic device 100 receives and responds to a first operation of a user on a first application, obtains a first group of thumbnails, and the first group of thumbnails includes at least two thumbnails.

[0365] The first operation can include any one of the operation of the user opening the gallery application, the operation of the user switching the view scene in the thumbnail display interface, and the sliding operation of the user in the thumbnail display interface.

[0366] In a possible implementation, obtaining the first group of thumbnails can include that the electronic device 100 obtains the first group of thumbnails from a database, and the storage order of the first group of thumbnails in the database is consistent with the display order of the first group of thumbnails.

[0367] In a possible implementation, the acquiring the first set of thumbnails can include: the electronic device 100 acquiring metadata of the first set of thumbnails; the electronic device 100 acquiring a first query range based on a date time and an ID in the metadata of the first set of thumbnails; and the electronic device 100 acquiring the first set of thumbnails within the first query range from the database at a time based on the first query range.

[0368] In a possible implementation, the electronic device 100 acquiring the query range based on the date time and the ID in the metadata of the first set of thumbnails can include: the electronic device 100 assembling the date time and the ID of the first set of thumbnails to obtain a plurality of strings, a quantity of the plurality of strings being equal to a quantity of the first set of thumbnails; and the electronic device 100 determining a maximum value and a minimum value in the plurality of strings, and setting the first query range based on the maximum value and the minimum value.

[0369] In a possible implementation, the electronic device acquiring the first set of thumbnails can include: the electronic device 100 assigning a first view control to carry the first set of thumbnails; and the electronic device 100 sending, by the first view control, a thumbnail loading request to the database, the thumbnail loading request being used to acquire the first set of thumbnails from the database. In this way, the electronic device 100 can request to load the thumbnails required to be carried by the view control through the view control.

[0370] In a possible implementation, before the electronic device 100 acquiring the first set of thumbnails in response to the first operation of the user on the gallery application, the method can further include: the electronic device 100 acquiring a first picture; the electronic device 100 performing down sampling on the first picture to obtain a thumbnail of the first picture; the electronic device 100 saving a date time and an ID corresponding to the thumbnail of the first picture; and the electronic device 100 saving the thumbnail of the first picture to the database according to an order of the date time and the ID corresponding to the thumbnail of the first picture.

[0371] With reference to the first aspect, in a possible implementation, the electronic device 100 saving the thumbnail of the first picture to the database according to the order of the date time and the ID corresponding to the thumbnail of the first picture can include: the electronic device 100 performing texture compression on the thumbnail of the first picture to obtain texture data; and the electronic device 100 saving the texture data to the database according to the order of the date time and the ID corresponding to the thumbnail of the first picture.

[0372] The first set of thumbnails can be the k thumbnails of FIG. 8.

[0373] How the electronic device 100 specifically acquires the first set of thumbnails can be specifically refer to the description in steps S801-S808, which will not be repeated here.

[0374] S1102. The electronic device 100 splices the first set of thumbnails into a first large picture according to the display order.

[0375] In a possible implementation, the electronic device 100 splices the first set of thumbnails into a large picture according to the display order can include: the electronic device 100 applies for a first memory; and the database of the electronic device 100 sequentially fills the first set of thumbnails into the first memory according to the display order, and splices a large picture in the first memory.

[0376] The first memory is a shared memory.

[0377] How the electronic device 100 splices the large picture can be referred to the description in step S809, and the large picture spliced can be referred to FIG. 10, which will not be described here.

[0378] S1103. The electronic device 100 renders the first large picture, and displays the thumbnail display interface of the first application, and the thumbnail display interface displays the first large picture.

[0379] In a possible implementation, the electronic device 100 renders the first large picture can include: the rendering process of the electronic device 100 reads the first large picture from the first memory, and renders the first large picture.

[0380] In a possible implementation, before displaying the thumbnail display interface of the gallery application, the method can include: the electronic device 100 creates a first view control, and carries the first large picture through the first view control.

[0381] In a possible implementation, the method can further include: the electronic device 100 acquires a second set of thumbnails in response to a first operation, the second set of thumbnails including at least two thumbnails; the electronic device 100 splices the second set of thumbnails into a second large picture according to the display order; and the electronic device 100 renders the second large picture, and displays the second large picture in the thumbnail display interface.

[0382] In a possible implementation, after displaying the second large picture in the thumbnail display interface, the method can further include: the electronic device 100 receives and responds to a second operation to display a part of the first large picture and all of the second large picture in the thumbnail display interface, the second operation being an operation of swiping up in the thumbnail display interface.

[0383] In a possible implementation, before displaying the second large picture in the thumbnail display interface, the method can further include: the electronic device 100 creates a second view control, and carries the second large picture through the second view control.

[0384] In a possible implementation, after the electronic device 100 displays the thumbnail display interface of the gallery application, the method further includes: the electronic device 100 receives and responds to a third operation to obtain a third set of thumbnails, the third set of thumbnails including at least two thumbnails; the electronic device 100 splices the third set of thumbnails into a third large picture according to a display order; the electronic device 100 creates a third view control and carries the third large picture through the third view control; and the electronic device 100 renders the third large picture and displays the third large picture on the thumbnail display interface.

[0385] In a possible implementation, the third operation is a sliding operation, and obtaining the third set of thumbnails can include: the electronic device 100 determines a date and time and an ID of the third set of thumbnails based on the third operation; the electronic device 100 determines a second query range of the third set of thumbnails based on the date and time and the ID of the third set of thumbnails; and the electronic device 100 obtains the third set of thumbnails within the second query range from the database at a time based on the second query range.

[0386] The first view control can be the view control 901 in FIG. 9A, the second view control can be the view control 902 in FIG. 9A, and the third view control can be the view control 903 in FIG. 9A.

[0387] The step S1103 can refer to the description in the above step S810, and details are not described herein.

[0388] According to the picture display method provided in the embodiments of the present application, when the electronic device 100 stores thumbnails corresponding to pictures taken or saved, the electronic device 100 stores the thumbnails according to the arrangement order of the thumbnails in the thumbnail display interface. In this way, the electronic device 100 has the capability of batch querying and obtaining thumbnails. Then, when the electronic device displays the thumbnail display interface, the electronic device 100 can batch query and obtain the thumbnails. The electronic device 100 can splice the obtained multiple thumbnails to obtain spliced thumbnails, and then the electronic device 100 can display the spliced thumbnails through a view control. The displayed thumbnails in the thumbnail display interface are spliced into one or more large pictures. One view control can carry one large picture. In this way, the electronic device 100 can display a large number of thumbnails by using only a small number of view controls (for example, one or two, etc.). Moreover, the electronic device 100 can batch query and obtain thumbnails, which can reduce the number of times of calling an IO interface. In this way, the performance and frame rate of the electronic device in loading and displaying a large number of thumbnails can be improved, so that the problems of white blocks and lagging during the user's browsing of a large number of thumbnails can be avoided or reduced.

[0389] The embodiment of the present application further provides a computer readable storage medium, which stores computer program codes, and when the computer program codes are executed by the processor, the communication device executes the method in any of the foregoing embodiments.

[0390] The embodiment of the present application further provides a computer program product, which, when running on a computer, causes the computer to execute the method in any of the foregoing embodiments.

[0391] The above-described embodiments are only used to illustrate the technical solutions of the present application, but not limit the present application; even though the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

[0392] In the foregoing embodiments, according to the context, the term "when" can be interpreted as meaning "if" or "after" or "in response to determining" or "in response to detecting". Similarly, according to the context, the phrase "upon determining" or "if detecting (the stated condition or event)" can be interpreted as meaning "if determining" or "in response to determining" or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)".

[0393] In the foregoing embodiments, all or some of the steps can be implemented by using software, hardware, firmware or any combination thereof. When implemented by using software, the steps can be implemented by using one or combination of programs, instructions, codes, commands and the like. The programs can be stored in one or more computer program products and transmitted to computers by using computer readable media, such as computer program products, hard disks, U-disk, ROM, RAM, PROM, EPROM, EEPROM or FLASH, CD-ROM, CD-R, CD-RW, DVD, Blu-ray Disc, magnetic tapes, floppy disks, optical data storage devices, carrier waves, or any other computer readable medium or data carrier.

[0394] Those skilled in the art can understand that all or part of the processes in the above-mentioned method embodiments can be implemented by a computer program instructing relevant hardware to complete, the program can be stored in a computer readable storage medium, and the program can include the processes of the above-mentioned method embodiments when executed. The aforementioned storage medium includes ROM or random storage memory RAM, magnetic disc or optical disc, and various storage medium capable of storing program codes.

Claims

1. A picture display method characterized by, The method comprises: The electronic device receives and responds to a first operation of a user for a gallery application, obtains a first set of thumbnails, the first set of thumbnails comprising at least two thumbnails; The electronic device splices the first set of thumbnails into a first large picture according to a display order; The electronic device renders the first large picture and displays a thumbnail display interface of the gallery application, and the thumbnail display interface displays the first large picture.

2. The method of claim 1, wherein, Before displaying the thumbnail display interface of the gallery application, the method further comprises: The electronic device creates a first view control and carries the first large picture through the first view control.

3. The method of claim 2, wherein, The method further comprises: The electronic device obtains a second set of thumbnails in response to the first operation, the second set of thumbnails comprising at least two thumbnails; The electronic device splices the second set of thumbnails into a second large picture according to a display order; The electronic device renders the second large picture and displays the second large picture in the thumbnail display interface.

4. The method of claim 3, wherein, After displaying the second large picture in the thumbnail display interface, the method further comprises: The electronic device receives and responds to a second operation to display a part of the content of the first large picture and all the content of the second large picture in the thumbnail display interface, the second operation being an upward swipe operation in the thumbnail display interface.

5. The method of claim 4, wherein, Before displaying the second large picture in the thumbnail display interface, the method further comprises: The electronic device creates a second view control and carries the second large picture through the second view control.

6. The method of claim 5, wherein, After displaying the thumbnail display interface of the gallery application, the method further comprises: The electronic device receives and responds to a third operation to obtain a third set of thumbnails, the third set of thumbnails comprising at least two thumbnails; The electronic device splices the third set of thumbnails into a third large picture according to a display order; The electronic device creates a third view control and carries the third large picture through the third view control; The electronic device renders the third large picture and displays the third large picture in the thumbnail display interface.

7. The method according to any one of claims 1 to 6, characterized in that, The method of obtaining the first set of thumbnails comprises: The electronic device obtains the first set of thumbnails from a database, and the storage order of the first set of thumbnails in the database is consistent with the display order of the first set of thumbnails.

8. The method of claim 7, wherein, The electronic device splices the first set of thumbnails into a large picture according to the display order, comprising: The electronic device applies for a first memory; The database of the electronic device fills the first set of thumbnails into the first memory according to the display order one by one, and splices a large picture in the first memory.

9. The method of claim 8, wherein, The electronic device renders the first large picture, comprising: The rendering process of the electronic device reads the first large picture from the first memory and renders the first large picture.

10. The method of claim 9, wherein, The first operation comprises any one of the user opening the gallery application, the user switching the view scene in the thumbnail display interface, and the user's swipe operation in the thumbnail display interface.

11. The method of claim 10, wherein, Metadata of the first set of thumbnails is stored in the database, and the metadata includes a date and time and an identity ID corresponding to the first set of thumbnails.

12. The method of claim 11, wherein, The first set of thumbnails includes a first thumbnail, a date and time corresponding to the first thumbnail is a first date and time, an ID corresponding to the first thumbnail is a first ID, the first date and time is a date and time at which the electronic device saves the first thumbnail, and the first ID is a number generated by the electronic device to identify the first thumbnail when the first thumbnail is saved.

13. The method of claim 12, wherein, Obtaining the first set of thumbnails includes: The electronic device obtains metadata of the first set of thumbnails; The electronic device obtains a first query range based on the date and time and the ID in the metadata of the first set of thumbnails; The electronic device obtains the first set of thumbnails within the first query range from the database at a time based on the first query range.

14. The method of claim 13, wherein, The electronic device obtains a query range based on the date and time and the ID in the metadata of the first set of thumbnails, including: The electronic device assembles the date and time and the ID of the first set of thumbnails to obtain a plurality of strings, and the number of the plurality of strings is equal to the number of the first set of thumbnails; The electronic device determines a maximum value and a minimum value in the plurality of strings, and sets the first query range based on the maximum value and the minimum value.

15. The method of claim 14, wherein, The third operation is a sliding operation, and the obtaining of the third set of thumbnails includes that the electronic device determines a date and time and an ID of the third set of thumbnails based on the third operation; The electronic device determines a second query range of the third set of thumbnails based on the date and time and the ID of the third set of thumbnails; The electronic device obtains the third set of thumbnails within the second query range from the database at a time based on the second query range.

16. The method of claim 2, wherein, The electronic device obtains the first set of thumbnails, including: The electronic device assigns the first view control to carry the first set of thumbnails; The electronic device sends a thumbnail loading request to the database through the first view control, and the thumbnail loading request is used to obtain the first set of thumbnails from the database.

17. The method according to any one of claims 8-16, characterized in that, The number of view controls required in the thumbnail display interface is determined by the total number of thumbnails stored by the electronic device and the number of batches of thumbnails read.

18. The method of claim 17, wherein, Before the electronic device obtains the first set of thumbnails in response to a first operation of a user on a gallery application, the method further includes: The electronic device obtains a first picture; The electronic device down-samples the first picture to obtain a thumbnail of the first picture; The electronic device saves a date and time and an ID corresponding to the thumbnail of the first picture; The electronic device saves the thumbnail of the first picture to the database according to the sorting of the date and time and the ID corresponding to the thumbnail of the first picture.

19. The method of claim 18, wherein, The electronic device saves the thumbnail of the first picture to the database according to the sorting of the date and time and the ID corresponding to the thumbnail of the first picture, including: The electronic device performs texture compression on the thumbnail of the first picture to obtain texture data; The electronic device saves the texture data to the database according to the sorting of the date and time and the ID corresponding to the thumbnail of the first picture.

20. An electronic device, comprising: The electronic device includes one or more processors and memory storing code that, when executed by the processor, causes the electronic device to perform the methods of claims 1-19.

21. A computer-readable storage medium, characterized in that, Computer instructions that, when executed on an electronic device, cause the electronic device to perform the methods of claims 1-19.

22. A computer program product, characterised in that, A computer program product that, when executed on a computer, causes the computer to perform the methods of any of claims 1-19.