Image display method and apparatus, medium, electronic device, and program product
Patent Information
- Application Number
- CN202510551614.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2026-10-30
AI Technical Summary
但是因为智能音箱的内存比较小,其中应用功能复杂,所以可以用于显示图像的内存有限
[0065]通过获取至少一张待显示图像,并在图像数据库根据至少一张待显示图像的位置,确定其前后相邻的多张待加载图像。然后根据待显示图像与多张待加载图像确定第一图像序列,并加载第一图像序列,以使用户在滑动更新待显示图像过程中,电子设备可以根据已加载的第一图像序列平滑快速切换图像,提高用户的使用体验感。
Smart Images

Figure CN123012202A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of electronic equipment technology, and in particular to an image display method and apparatus, medium, electronic equipment and program product. Background Technology
[0002] When using a smart speaker, the speaker can display images. However, due to the limited memory and complex applications within the smart speaker, the memory available for image display is limited. When there are many images stored on the smart speaker, image stuttering or lag may occur during display. Summary of the Invention
[0003] In view of this, the present disclosure provides an image display method, apparatus, medium, electronic device, and program product that can improve the smoothness of image display in electronic devices.
[0004] According to a first aspect of the present disclosure, an image display method is provided, the method comprising:
[0005] Get at least one image to be displayed;
[0006] Based on the position of the at least one image to be displayed in the image database, a first image sequence to be loaded is determined, wherein the first image sequence includes the at least one image to be displayed, and the at least one image to be displayed is not the first and / or the last image of the first image sequence;
[0007] Load the first image sequence and display the at least one image to be displayed.
[0008] In some embodiments, the method further includes:
[0009] Upon receiving an update instruction, at least one updated image to be displayed is obtained based on the update instruction;
[0010] Based on at least one updated image to be displayed, the first image sequence is updated to obtain the second image sequence to be loaded;
[0011] Display at least one of the updated images to be displayed, and load the second image sequence.
[0012] In some embodiments, loading the second image sequence includes:
[0013] Based on the first image sequence and the second image sequence, determine the duplicate images in the first image sequence and the second image sequence, as well as the images to be deleted in the first image sequence and the images to be loaded in the second image sequence;
[0014] The duplicate image is retained, the image to be deleted is deleted, and the image to be loaded is loaded.
[0015] In some embodiments, when the image display mode is a thumbnail display mode, acquiring at least one image to be displayed includes:
[0016] Based on the first image to be displayed and the preset number of thumbnails to be displayed, obtain multiple images to be displayed;
[0017] Determining the first image sequence to be loaded based on the position of the at least one image to be displayed in the image database includes:
[0018] Based on the positions of the multiple images to be displayed in the image database, multiple first images preceding the multiple images to be displayed and multiple second images following the multiple images to be displayed are determined in the image database, wherein the total number of the first images and the second images is not less than the number of the multiple images to be displayed;
[0019] Based on the first image, the plurality of images to be displayed, and the second image, the first image sequence is determined.
[0020] In some embodiments, the number of the first image and the second image is determined based on the number of thumbnails displayed in each row or column in the thumbnail display mode.
[0021] In some embodiments, when the image display mode is a single-image display mode, loading the first image sequence and displaying the at least one image to be displayed includes:
[0022] Create multiple display components that correspond one-to-one with multiple images in the first image sequence, and load each image in the first image sequence into the corresponding display component;
[0023] The display component that loads the image to be displayed displays the image and initiates a display loop among the multiple display components.
[0024] In some embodiments, displaying the updated at least one image to be displayed and loading the second image sequence includes:
[0025] Based on the first display component that has loaded the updated image to be displayed, display the updated image to be displayed;
[0026] Based on the updated image to be displayed and the first display component, as well as the sequence relationship between the second display component and the first display component, the target image in the second image sequence corresponding to each second display component is determined in the image database, wherein the second display component is a display component other than the first display component among multiple display components;
[0027] For each second display component, if the corresponding target image is different from the currently loaded image, then the loaded image is replaced with the target image.
[0028] In some embodiments, the method further includes:
[0029] If the last image in the second image sequence is not the last image in the image database, then a display loop is started among the multiple display components;
[0030] If the last image in the second image sequence is the last image in the image database, then the sequence of multiple display components is reset, so that the last image in the image database is loaded into the last display component, and the display loop between multiple display components is closed.
[0031] According to a second aspect of the present disclosure, an image display apparatus is provided, the apparatus comprising:
[0032] The acquisition unit is used to acquire at least one image to be displayed.
[0033] The determining unit is configured to determine a first image sequence to be loaded based on the position of the at least one image to be displayed in the image database, wherein the first image sequence includes the at least one image to be displayed, and the at least one image to be displayed is not the first and / or the last image of the first image sequence;
[0034] A loading unit is used to load the first image sequence and display the at least one image to be displayed.
[0035] In some embodiments, the apparatus further includes:
[0036] A receiving unit is configured to, upon receiving an update instruction, acquire at least one updated image to be displayed based on the update instruction;
[0037] An update unit is used to update the first image sequence based on at least one updated image to be displayed, so as to obtain a second image sequence to be loaded.
[0038] The display unit is used to display at least one of the updated images to be displayed, and to load the second image sequence.
[0039] In some embodiments, the display unit is configured to:
[0040] Based on the first image sequence and the second image sequence, determine the duplicate images in the first image sequence and the second image sequence, as well as the images to be deleted in the first image sequence and the images to be loaded in the second image sequence;
[0041] The duplicate image is retained, the image to be deleted is deleted, and the image to be loaded is loaded.
[0042] In some embodiments, when the image display mode is a thumbnail display mode, the acquisition unit is configured to:
[0043] Based on the first image to be displayed and the preset number of thumbnails to be displayed, obtain multiple images to be displayed;
[0044] The determining unit is used for:
[0045] Based on the positions of the multiple images to be displayed in the image database, multiple first images preceding the multiple images to be displayed and multiple second images following the multiple images to be displayed are determined in the image database, wherein the total number of the first images and the second images is not less than the number of the multiple images to be displayed;
[0046] Based on the first image, the plurality of images to be displayed, and the second image, the first image sequence is determined.
[0047] In some embodiments, the number of the first image and the second image is determined based on the number of thumbnails displayed in each row or column in the thumbnail display mode.
[0048] In some embodiments, when the image display mode is a single-image display mode, the loading unit is configured to:
[0049] Create multiple display components that correspond one-to-one with multiple images in the first image sequence, and load each image in the first image sequence into the corresponding display component;
[0050] The image to be displayed is displayed based on the display component that loads the image to be displayed.
[0051] In some embodiments, the display unit is configured to:
[0052] Based on the first display component that has loaded the updated image to be displayed, display the updated image to be displayed;
[0053] Based on the updated image to be displayed and the first display component, as well as the sequence relationship between the second display component and the first display component, the target image in the second image sequence corresponding to each second display component is determined in the image database, wherein the second display component is a display component other than the first display component among multiple display components;
[0054] For each second display component, if the corresponding target image is different from the currently loaded image, then the loaded image is replaced with the target image.
[0055] In some embodiments, the apparatus further includes:
[0056] An activation unit is configured to activate a display loop among the plurality of display components if the last image in the second image sequence is not the last image in the image database.
[0057] The closing unit is used to reset the sequence of multiple display components if the last image in the second image sequence is the last image in the image database, so that the last image in the image database is loaded into the last display component, and the display loop between the multiple display components is closed.
[0058] According to a third aspect of the present disclosure, a computer program product is provided that, when executed by a processor, implements the steps of any of the methods described in the first aspect.
[0059] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of any of the methods described in the first aspect above.
[0060] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising:
[0061] processor;
[0062] Memory used to store processor-executable instructions;
[0063] Wherein, the processor executes the steps of any of the methods described in the first aspect above.
[0064] The technical solutions provided in this disclosure can include the following beneficial effects:
[0065] By acquiring at least one image to be displayed and determining multiple adjacent images to be loaded based on the position of the at least one image to be displayed in the image database, a first image sequence is then determined based on the image to be displayed and the multiple images to be loaded, and the first image sequence is loaded. This allows the electronic device to smoothly and quickly switch images based on the loaded first image sequence while the user is scrolling to update the images to be displayed, thus improving the user experience.
[0066] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0067] To more clearly illustrate the technical solutions in the specific embodiments of this disclosure or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0068] Figure 1 This is a flowchart of an image display method provided in an embodiment of the present disclosure;
[0069] Figure 2A This is a schematic diagram of a first image sequence provided in an embodiment of this disclosure;
[0070] Figure 2B This is a schematic diagram of a first image sequence provided in an embodiment of this disclosure;
[0071] Figure 2C This is a schematic diagram of a first image sequence provided in an embodiment of this disclosure;
[0072] Figure 3 This is a flowchart of a method for updating and displaying an image according to an embodiment of this disclosure;
[0073] Figure 4 This is a flowchart of loading a second image sequence provided in an embodiment of this disclosure;
[0074] Figure 5 This is a schematic diagram of an image display method provided in an embodiment of this disclosure;
[0075] Figure 6 This is a schematic diagram of an image update display method provided in an embodiment of this disclosure;
[0076] Figure 7 This is a flowchart illustrating a single-image display mode for displaying images, provided in an embodiment of this disclosure.
[0077] Figure 8This is a flowchart of an updated display component provided in an embodiment of this disclosure;
[0078] Figure 9 This is a schematic diagram illustrating the correspondence between a second image sequence and multiple display components provided in an embodiment of this disclosure;
[0079] Figure 10 This is a schematic diagram of an image display method provided in an embodiment of this disclosure;
[0080] Figure 11 This is a block diagram of an image display device provided in an embodiment of the present disclosure;
[0081] Figure 12 This is a structural block diagram of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0082] The technical solutions of this disclosure will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure. Furthermore, the technical features involved in the different embodiments of this disclosure described below can be combined with each other as long as they do not conflict with each other.
[0083] For electronic devices like smart speakers, their own memory is limited, but they run a large number of applications within that limited memory. Some speaker devices have only a few hundred or even tens of megabytes of memory, which can run dozens of applications. Therefore, for smart speakers, the memory allocated to each application is limited. For speakers with screens, image display is an important part. In related technologies, speakers with screens usually directly load a large number of images stored in the speaker to display images. However, due to insufficient memory in the speaker, loading a large number of images can easily cause lag and affect the smoothness of interaction.
[0084] Based on this, the present disclosure provides an image display method that can be applied to electronic devices such as smart speakers, smart refrigerators, and home robots, as well as wearable electronic devices such as smart bracelets, and mobile terminals such as mobile phones and tablets. For electronic devices with very limited memory space, which cannot run large application architectures such as Android, lightweight application quick application architectures, such as the Vela quick application architecture, can be applied to these electronic devices. The Vela architecture emphasizes low resource consumption and fast response, making it suitable for electronic devices such as smart speakers.
[0085] Please see Figure 1 The flowchart shown is as follows. Figure 1A flowchart of an image display method provided in this disclosure includes:
[0086] S101, Obtain at least one image to be displayed.
[0087] The image to be displayed is the image that will be shown to the user on the display screen. For example, when the user clicks to view an image, the clicked image is the image to be displayed. In some embodiments, at least one image to be displayed can be obtained according to the user's instruction. The user instruction can be determined based on the user's operation on the device, for example, obtaining at least one image to be displayed based on the user's click operation, or obtaining at least one image to be displayed based on the user's swipe operation.
[0088] The image to be displayed can be one or more, depending on how the user views the image. For example, if the user views the image as a thumbnail on the device, the number of images to be displayed is determined by the device's screen size. For instance, if the device's screen can display 25 thumbnails, then the number of images to be displayed would be 25. Alternatively, if the user views the image as a single image on the device, then only one image would be displayed.
[0089] S102, based on the position of the at least one image to be displayed in the image database, determine the first image sequence to be loaded.
[0090] The image database can be a database stored by the device itself or a database stored in a server communicating with the device. Based on the position of at least one image to be displayed in the image database, multiple images adjacent to the at least one image to be displayed can be determined in the image database. This ensures that the first image sequence includes the at least one image to be displayed, and the at least one image to be displayed is not the first and / or last image in the first image sequence.
[0091] In other words, the images included in the first image sequence can exist in various forms. For example... Figure 2A As shown, the first image sequence may include at least one image to be displayed, and multiple images in the image database following the at least one image to be displayed. Or as... Figure 2B As shown, the first image sequence may include at least one image to be displayed, as well as multiple images in the image data preceding the image to be displayed. Or, as... Figure 2C As shown, the first image sequence may include at least one image to be displayed, as well as multiple images in the image database that are adjacent to the at least one image to be displayed.
[0092] S103, load the first image sequence and display the at least one image to be displayed.
[0093] After determining the first image sequence, the images in the first image sequence can be rendered and loaded. Then, at least one of the acquired images to be displayed is displayed on the device's display screen.
[0094] By acquiring at least one image to be displayed and determining multiple adjacent images to be loaded based on the position of the at least one image to be displayed in the image database, a first image sequence is then determined based on the image to be displayed and the multiple images to be loaded, and the first image sequence is loaded. This allows the electronic device to smoothly and quickly switch images based on the loaded first image sequence while the user is scrolling to update the images to be displayed, thus improving the user experience.
[0095] The process of displaying images on an electronic device is a continuous one. Users may update the images displayed on the device screen by swiping or tapping. The following explains the methods for updating image display; please refer to [link to documentation]. Figure 3 The flowchart shown includes:
[0096] S301, upon receiving an update instruction, obtain at least one updated image to be displayed based on the update instruction.
[0097] S302, based on the updated at least one image to be displayed, the first image sequence is updated to obtain the second image sequence to be loaded.
[0098] S303, display at least one of the updated images to be displayed, and load the second image sequence.
[0099] In some embodiments, when a user initiates an image switching operation, the device can receive an update instruction corresponding to the image switching operation. Based on the update instruction, at least one updated image to be displayed can be obtained. For example, when the user swipes left on an image, the update instruction received by the device could be to display the next image after the currently displayed image; therefore, based on the update instruction, the updated image to be displayed can be the next image.
[0100] Simultaneously, the first image sequence can be updated based on the updated at least one image to be displayed, resulting in a second image sequence to be loaded. In one embodiment, based on the position of the updated at least one image to be displayed in the image database, multiple images adjacent to the updated at least one image to be displayed can be determined in the image database, thereby determining the second image sequence to be loaded corresponding to the updated at least one image to be displayed. The method for determining the second image sequence is similar to the aforementioned method for determining the first image sequence; for details, please refer to [link to relevant documentation]. Figures 2A-2C The schematic diagram shown will not be repeated here.
[0101] Once at least one updated image to be displayed is obtained, at least one image to be displayed can be shown on the device screen, while images in the second image sequence are loaded and rendered.
[0102] In some embodiments, when loading the second image sequence, see [reference needed]. Figure 4 The flowchart shown includes the following steps:
[0103] S401, based on the first image sequence and the second image sequence, determine the duplicate images in the first image sequence and the second image sequence, as well as the images to be deleted in the first image sequence and the images to be loaded in the second image sequence.
[0104] S402, retain the duplicate image, delete the image to be deleted, and load the image to be loaded.
[0105] After determining the second image sequence, by comparing the first and second image sequences, we can identify duplicate images present in both sequences; images present in the first sequence but not in the second sequence that need to be deleted; and images not present in the first sequence but present in the second sequence that need to be loaded. In one embodiment, the device can cache the loaded first image sequence using a caching mechanism. Then, by comparing the first and second image sequences, we can render and load only the images to be loaded in the second image sequence, leaving duplicate images unchanged, and deleting the images to be deleted from the first image sequence. This updates the first image sequence, ensuring that all images loaded in the device's memory are from the second image sequence.
[0106] By comparing the first image sequence and the second image sequence, it is possible to avoid repeatedly loading duplicate sequences that exist in both sequences. Instead, only the newly added images to be loaded in the second image sequence need to be loaded, while the images to be deleted in the first image sequence are removed. This keeps the memory used by the device for loading images unchanged, reduces the load on the device, and improves the efficiency of image updates.
[0107] In some embodiments, when an electronic device displays an image, it can display the image in a thumbnail display mode or a single-image display mode. The thumbnail display mode refers to displaying multiple thumbnail images simultaneously on the screen of the electronic device. The single-image display mode refers to viewing the details of a single image on the screen of the electronic device.
[0108] The following will explain the image display method in thumbnail display mode.
[0109] In thumbnail display mode, when at least one image to be displayed is acquired, multiple images are acquired. In some embodiments, multiple images to be displayed can be acquired based on the first image to be displayed and a preset number of thumbnails to be displayed. For example, firstly, based on the user's operation instruction, the first image to be displayed is determined in the image database; then, based on the size of the display screen, a preset number of thumbnails to be displayed is determined; finally, based on the preset number of thumbnails to be displayed, the corresponding number of images after the first image to be displayed are determined in the image database, thereby determining multiple images to be displayed.
[0110] After determining multiple images to be displayed, based on the positions of these multiple images in the image database, multiple first images preceding the multiple images to be displayed and / or multiple second images following the multiple images to be displayed can be determined in the image database. The total number of the first images and the second images is not less than the number of the multiple images to be displayed.
[0111] Based on the first image, the plurality of images to be displayed, and the second image, the first image sequence is determined.
[0112] In one embodiment, based on N images to be displayed (N being an integer greater than 1), M first images (M being an integer greater than 1) preceding these N images can be determined from the image database, and then N+M images can be determined as the first image sequence. For example, the currently displayed N images to be displayed are the last N images in the image database. Alternatively, based on N images to be displayed, P second images (P being an integer greater than 1) following these N images can be determined from the image database, and then N+P images can be determined as the first image sequence. For example, the currently displayed N images to be displayed are the first N images in the image database. Or, based on N images to be displayed, M first images preceding these N images and P second images following these N images can be determined from the image database, and N+M+P images can be determined as the first image sequence.
[0113] The number of the first and second images is determined based on the number of thumbnails displayed in each row or column in the thumbnail display mode. That is, the values of M and / or P are determined according to the number of thumbnails displayed in each row or column in the thumbnail display mode. For example, when displaying images in thumbnail display mode, the screen displays the images in a 3x4 format in landscape mode, and the user updates the displayed images by swiping left or right. Therefore, the minimum number of images updated each time is 3, so the values of M and / or P are integer multiples of 3. Furthermore, the total number of M+P is greater than or equal to N, ensuring that when the user updates an image, there are enough loaded images to replace the currently displayed image. In other words, each time the user swipes the screen to update the displayed image, the updated displayed image is pre-loaded and rendered, so the device does not need to reload the image when the user updates the displayed image, improving the smoothness of image updates.
[0114] In one embodiment, if, based on the positions of the plurality of images to be displayed in the image sequence, the number of images preceding or following the plurality of images to be displayed is less than the number of the plurality of images to be displayed, then all images in the image database are directly loaded. That is, if the total number of images in the image database is less than N, then all images in the image database can be directly loaded.
[0115] In one embodiment, the thumbnail display mode can be implemented based on a virtual scrolling list. When displaying thumbnails through a virtual scrolling list, the visible area can be determined according to the screen size of the electronic device, and the images in the list items within the visible area constitute the first image sequence to be loaded.
[0116] The images within the visible region are dynamically updated and rendered by calculating the start and end indices. As an example, the display method between the first image sequence and multiple images to be displayed within the visible region can be as follows: Figure 5 As shown, the images in list items 0-19 are the images within the visible area, and are also the images in the first image sequence. The images in list items 0-9 are multiple images to be displayed on the screen. When the electronic device starts displaying images, the images corresponding to numbers 0-19 can be loaded.
[0117] Then, as the user swipes the screen, the electronic device receives an image update command. Based on this command, the image displayed on the screen is updated, and the images loaded within the visible area also change accordingly. The changes to the images within the visible area mirror the changes to the images displayed on the screen. For example, if the screen displays two images updated backward, the images within the visible area will also be updated two images backward, deleting the two foremost images and expanding the space occupied by the deleted data using `translateX`, with a possible width of 196 pixels. For example... Figure 6 As shown, the image displayed on the screen is numbered 2-11, compared to... Figure 5 Two images were updated backwards, and the image loaded in the visible area is now image number 2-21, which is also compared to... Figure 5 Two images have been updated.
[0118] Alternatively, when the image displayed on the screen is the first image in the image database, the images within the visible area can be updated only after the displayed image has been scrolled to the middle of the visible area. This ensures that there are already loaded images before or after the displayed image. Figure 5 For example, when images numbered 6-15 are displayed on the screen, images numbered 0-1 in the first column can be cleared and images numbered 20-21 can be loaded.
[0119] By loading images within the visible area, the system resources consumed by the device in loading images are reduced, as the device does not need to load all data in the image database at once. Simultaneously, by pre-loading images to be displayed and images to be loaded, image loading and update speeds are improved, allowing users to see available content faster and enhancing the overall user experience. Furthermore, pre-loading images within the visible area reduces the blocking caused by a large number of images during page loading, avoiding layout jumps that occur after images have finished loading, thus improving page smoothness and stability.
[0120] The image display method in single-image display mode will be explained below.
[0121] Please see Figure 7 The flowchart shown includes:
[0122] S701, create multiple display components that correspond one-to-one with multiple images in the first image sequence, and load each image in the first image sequence into the corresponding display component.
[0123] S702, The image to be displayed is displayed based on the display component that loads the image to be displayed.
[0124] In single-image display mode, details of a single image can be viewed on the screen of an electronic device, thus requiring more memory to render each image. To improve the smoothness of image viewing in single-image display mode within limited memory space, the number of display components can be pre-set. For example, only 5 display components can be created, meaning that regardless of the number of images in the image database, only 5 images are cached at a time. Then, when the user updates the displayed images, the images in the display components are dynamically updated according to the user's update command.
[0125] The display components can be implemented based on a Swiper carousel. The number of display components is the same as the number of images in the first image sequence. For example, if there are three display components, the first image sequence may only include three images. After the components are created, the images in the first image sequence can be loaded into multiple display components one-to-one. For example, when initially displaying images in single-image mode, the images in the first image sequence can be loaded in the order they appear in the first image sequence, and the multiple display components can be loaded accordingly. The first image is loaded into the first display component, the second image into the second display component, and so on.
[0126] After the images in the first image sequence are loaded into the display component, the image to be displayed can be shown on the screen through the display component. For example, if the image to be displayed is loaded into the first display component, then the image to be displayed can be shown based on the first display component. After the electronic device receives an update command, it will update the image in the display component according to the user's update command. Please see [link to relevant documentation]. Figure 8 The flowchart shown includes:
[0127] S801, based on a first display component loaded with the updated image to be displayed, displays the updated image to be displayed.
[0128] S802, based on the updated image to be displayed and the first display component, and the sequence relationship between the second display component and the first display component, determine the target image in the second image sequence corresponding to each second display component in the image database, wherein the second display component is a display component other than the first display component among multiple display components.
[0129] S803, for each second display component, if the corresponding target image is different from the currently loaded image, then the loaded image is replaced with the target image.
[0130] In some embodiments, the updated image to be displayed can be determined according to the user's update instruction. Among multiple display components, a first display component loaded with the updated image to be displayed is identified, and the display index is slid to that first display component to display the updated image. Simultaneously, a second image sequence to be loaded after the update can also be determined according to the user's update instruction. The specific method for determining the second image sequence can be found in [reference needed]. Figure 3 The method shown.
[0131] After determining the first display component of the currently displayed image, the target image corresponding to each of the multiple display components (excluding the first display component) can be determined based on the sequence relationships between the multiple display components and the sequence relationships between the second image sequences. When determining the target image corresponding to each second display component, the sequence relationships between images in the second image sequence can be made to correspond one-to-one with the sequence relationships between the multiple display components. Figure 9 For example, image number 8 is the currently displayed image; that is, among the three display components, the second one is the first display component. Then, a second display component preceding the first can load images from the second image sequence that precede the currently displayed image; a second display component following the first can load images from the second image sequence that follow the currently displayed image. This transforms the images loaded in multiple display components into images from the second image sequence.
[0132] In some embodiments, when loading the second image sequence, it can be determined whether the last image in the second image sequence is the last image in the image database. In order to prompt the user that the current image is the last image when displaying the image, it can be set so that when displaying the last image in the image database, no further image can be displayed, that is, it is impossible to jump from the last image in the image database to the first image. The above function can be achieved by controlling the display loop between multiple display components.
[0133] If the last image in the second image sequence is not the last image in the image database, then a display loop can be opened between multiple display components. Opening the display loop allows multiple display components to cycle through each other during image display. For example, in three display components, the current image to be displayed is in the last display component, while the next image to be displayed is in the first display component. When the user switches to display the next image, it needs to be displayed through the first display component. The process of sliding from the last display component to the first display component requires this cyclical display between the components.
[0134] If the last image in the second image sequence is the last image in the image database, it is necessary to ensure that the image in the image database is loaded into the last display component among multiple display components, and to close the display loop between multiple display components, so as to ensure that the electronic device does not update the first image in the image database from the last image in the image database when displaying the image.
[0135] After determining that the last image in the second image sequence is the last image in the image database, it is possible to further check whether the last image has been loaded into the last display component. If the last image has not been loaded into the last display component, the sequence of multiple display components can be reset according to the sequence relationship between the images in the second image sequence, so that the display component with the last image is the last among the multiple display components. Alternatively, the last image can be replaced into the last display component according to the sequence relationship between the multiple display components to ensure that the last image is loaded into the last display component.
[0136] Once the last image in the image database is loaded into the last display component, the display loop between multiple display components can be closed. After the relationship display loop is closed, the electronic device cannot jump from the last display component to the first display component when displaying an image. In other words, when the electronic device is displaying the last image of a single image, it cannot directly jump to display the first image to prompt the user that the current image is the last image in the image database.
[0137] To facilitate understanding, the image loading and updating process in single-image display mode will be explained below using five images numbered 1-5 and three display components in the image database as an example.
[0138] like Figure 10 As shown, the shaded area corresponds to the image currently being displayed.
[0139] In step 1001, when the user clicks on the first image (i.e., the image labeled 1), the images loaded in the three display components are [1], [2], and [3], respectively.
[0140] In step 1002, when the user initiates an update command to make the electronic device display the second image (i.e., the image numbered 2), the images loaded in the display component can remain unchanged [1], [2], and [3]. At this time, regardless of whether the user wants to display the previous image or the next image of the second image, the display component has already loaded them.
[0141] In step 1003, the user initiates a command to update the electronic device to display the third image (i.e., image number 3). At this time, the image is displayed through the display component [3], and the image number 1 to be deleted in the first display component is deleted. The fourth image (i.e., image number 4) is loaded into the first display component. Therefore, the third image is currently located in the last display component, but not the last image. So, a display loop can be opened between multiple display components so that when displaying the fourth image, the user can jump to the first display component according to the display loop.
[0142] In step 1004, the user initiates an update command to update the electronic device to display the fourth image. At this point, the image to be loaded is the fifth image (i.e., image number 5), which is the last image. However, the target display component corresponding to the image to be deleted, number 2, is not the last display component. Therefore, it is necessary to reset the order of images loaded in the display components, loading the fifth image into the last display component, and according to the order, loading the third image into the first display component, the fourth image into the second display component, and closing the display loop between multiple display components.
[0143] By pre-planning and constructing multiple display components, and then displaying each image individually through these components, loading time for images can be saved, improving the smoothness of image display. Furthermore, by pre-setting the number of display components, the limited memory space in electronic devices can be fully utilized, avoiding the problem of insufficient device memory and device lag caused by loading too many images.
[0144] For the foregoing method embodiments, in order to simplify the description, they are all described as a series of actions. However, those skilled in the art should know that this disclosure is not limited to the described order of actions, because according to this disclosure, some steps may be performed in other orders or simultaneously.
[0145] Secondly, those skilled in the art should also know that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by this disclosure.
[0146] Corresponding to the aforementioned application function implementation method embodiments, this disclosure also provides embodiments of application function implementation apparatus and corresponding terminals.
[0147] Reference Figure 11 A block diagram of an image display device according to an exemplary embodiment shows that the device may include:
[0148] Acquisition unit 1101 is used to acquire at least one image to be displayed;
[0149] The determining unit 1102 is configured to determine a first image sequence to be loaded based on the position of the at least one image to be displayed in the image database, wherein the first image sequence includes the at least one image to be displayed, and the at least one image to be displayed is not the first and / or the last image of the first image sequence;
[0150] The loading unit 1103 is used to load the first image sequence and display the at least one image to be displayed.
[0151] In some embodiments, the apparatus further includes:
[0152] A receiving unit is configured to, upon receiving an update instruction, acquire at least one updated image to be displayed based on the update instruction;
[0153] An update unit is used to update the first image sequence based on at least one updated image to be displayed, so as to obtain a second image sequence to be loaded.
[0154] The display unit is used to display at least one of the updated images to be displayed, and to load the second image sequence.
[0155] In some embodiments, the display unit is configured to:
[0156] Based on the first image sequence and the second image sequence, determine the duplicate images in the first image sequence and the second image sequence, as well as the images to be deleted in the first image sequence and the images to be loaded in the second image sequence;
[0157] The duplicate image is retained, the image to be deleted is deleted, and the image to be loaded is loaded.
[0158] In some embodiments, when the image display mode is a thumbnail display mode, the acquisition unit 1101 is configured to:
[0159] Based on the first image to be displayed and the preset number of thumbnails to be displayed, obtain multiple images to be displayed;
[0160] The determining unit 1102 is used for:
[0161] Based on the positions of the multiple images to be displayed in the image database, multiple first images preceding the multiple images to be displayed and multiple second images following the multiple images to be displayed are determined in the image database, wherein the total number of the first images and the second images is not less than the number of the multiple images to be displayed;
[0162] Based on the first image, the plurality of images to be displayed, and the second image, the first image sequence is determined.
[0163] In some embodiments, the number of the first image and the second image is determined based on the number of thumbnails displayed in each row or column in the thumbnail display mode.
[0164] In some embodiments, when the image display mode is a single-image display mode, the loading unit 1103 is configured to:
[0165] Create multiple display components that correspond one-to-one with multiple images in the first image sequence, and load each image in the first image sequence into the corresponding display component;
[0166] The display component that loads the image to be displayed displays the image and initiates a display loop among the multiple display components.
[0167] In some embodiments, the display unit is configured to:
[0168] Based on the first display component that has loaded the updated image to be displayed, display the updated image to be displayed;
[0169] Based on the updated image to be displayed and the first display component, as well as the sequence relationship between the second display component and the first display component, the target image in the second image sequence corresponding to each second display component is determined in the image database, wherein the second display component is a display component other than the first display component among multiple display components;
[0170] For each second display component, if the corresponding target image is different from the currently loaded image, then the loaded image is replaced with the target image.
[0171] In some embodiments, the apparatus further includes:
[0172] An activation unit is configured to activate a display loop among the plurality of display components if the last image in the second image sequence is not the last image in the image database.
[0173] The closing unit is used to reset the sequence of multiple display components if the last image in the second image sequence is the last image in the image database, so that the last image in the image database is loaded into the last display component, and the display loop between the multiple display components is closed.
[0174] Figure 12 The diagram shows a structural block diagram of an electronic device according to some embodiments of the present disclosure. The following is a description of the structure of the device in conjunction with the provided text. Figure 12 Some embodiments of the electronic device described herein will be explained.
[0175] Reference Figure 12 The electronic device 1200 may include one or more of the following components: processing component 1202, memory 1204, power supply component 1206, multimedia component 1208, audio component 1210, input / output (I / O) interface 1212, sensor component 1216, and communication component 1212.
[0176] Processing component 1202 typically controls the overall operation of electronic device 1200, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 1202 may include one or more processors 1220 to execute instructions. Furthermore, processing component 1202 may include one or more modules to facilitate interaction between processing component 1202 and other components. For example, processing component 1202 may include a multimedia module to facilitate interaction between multimedia component 1208 and processing component 1202. As another example, processing component 1202 may read executable instructions from memory to implement relevant functions of the electronic device.
[0177] Memory 1204 is configured to store various types of data to support the operation of electronic device 1200. Examples of such data include instructions for any application or method operating on electronic device 1200, contact data, phonebook data, messages, pictures, videos, etc. Memory 1204 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0178] Power supply component 1206 provides power to various components of electronic device 1200. Power supply component 1206 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 1200.
[0179] The multimedia component 1208 includes a display screen that provides an output interface between the electronic device 1200 and the user. In some embodiments, the multimedia component 1208 includes a front-facing camera and / or a rear-facing camera. When the electronic device 1200 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera can receive external multimedia data. Each front-facing camera and rear-facing camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
[0180] Audio component 1210 is configured to output and / or input audio signals. For example, audio component 1210 includes a microphone (MIC) configured to receive external audio signals when electronic device 1200 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 1204 or transmitted via communication component 1212. In some embodiments, audio component 1210 also includes a speaker for outputting audio signals.
[0181] I / O interface 1212 provides an interface between processing component 1202 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0182] Sensor assembly 1216 includes one or more sensors for providing state assessments of various aspects of electronic device 1200. For example, sensor assembly 1216 may detect the on / off state of electronic device 1200, the relative positioning of components such as the display and keypad of electronic device 1200, changes in position of electronic device 1200 or a component of electronic device 1200, the presence or absence of user contact with electronic device 1200, the orientation or acceleration / deceleration of electronic device 1200, and temperature changes of electronic device 1200. Sensor assembly 1216 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 1216 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 1216 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.
[0183] Communication component 1212 is configured to facilitate wired or wireless communication between electronic device 1200 and other devices. Electronic device 1200 can access wireless networks based on communication standards, such as Wi-Fi, 2G, 3G, 4G, 5G, or 6G, or combinations thereof. In one exemplary embodiment, communication component 1212 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 1212 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0184] In an exemplary embodiment, the electronic device 1200 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components.
[0185] In an exemplary embodiment, a computer program product is also provided, which, when executed by a processor, can implement an image display method.
[0186] In an exemplary embodiment, a non-transitory computer-readable storage medium is also provided, such as a memory 1204 including instructions, which, when executed by a processor 1220 of the device 1200, enables the device 1200 to perform an image display method.
[0187] Obviously, the above embodiments are merely examples for clear illustration and are not intended to limit the embodiments. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all embodiments here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this disclosure.
Claims
1. An image display method, characterized in that, The method includes: Get at least one image to be displayed; Based on the position of the at least one image to be displayed in the image database, a first image sequence to be loaded is determined, wherein the first image sequence includes the at least one image to be displayed, and the at least one image to be displayed is not the first and / or the last image of the first image sequence; Load the first image sequence and display the at least one image to be displayed.
2. The method according to claim 1, characterized in that, The method further includes: Upon receiving an update instruction, at least one updated image to be displayed is obtained based on the update instruction; Based on at least one updated image to be displayed, the first image sequence is updated to obtain the second image sequence to be loaded; Display at least one of the updated images to be displayed, and load the second image sequence.
3. The method according to claim 2, characterized in that, Loading the second image sequence includes: Based on the first image sequence and the second image sequence, determine the duplicate images in the first image sequence and the second image sequence, as well as the images to be deleted in the first image sequence and the images to be loaded in the second image sequence; The duplicate image is retained, the image to be deleted is deleted, and the image to be loaded is loaded.
4. The method according to claim 1, characterized in that, When the image display mode is thumbnail display mode, acquiring at least one image to be displayed includes: Based on the first image to be displayed and the preset number of thumbnails to be displayed, obtain multiple images to be displayed; Determining the first image sequence to be loaded based on the position of the at least one image to be displayed in the image database includes: Based on the positions of the multiple images to be displayed in the image database, multiple first images preceding the multiple images to be displayed and / or multiple second images following the multiple images to be displayed are determined in the image database, wherein the total number of the first images and the second images is not less than the number of the multiple images to be displayed; Based on the first image, the plurality of images to be displayed, and the second image, the first image sequence is determined.
5. The method according to claim 4, characterized in that, The number of the first image and the second image is determined based on the number of thumbnails displayed in each row or column in the thumbnail display mode.
6. The method according to claim 2, characterized in that, When the image display mode is a single-image display mode, loading the first image sequence and displaying the at least one image to be displayed includes: Create multiple display components that correspond one-to-one with multiple images in the first image sequence, and load each image in the first image sequence into the corresponding display component; The image to be displayed is displayed based on the display component that loads the image to be displayed.
7. The method according to claim 6, characterized in that, The step of displaying at least one updated image to be displayed and loading the second image sequence includes: Based on the first display component that has loaded the updated image to be displayed, display the updated image to be displayed; Based on the updated image to be displayed and the first display component, as well as the sequence relationship between the second display component and the first display component, the target image in the second image sequence corresponding to each second display component is determined in the image database, wherein the second display component is a display component other than the first display component among multiple display components; For each second display component, if the corresponding target image is different from the currently loaded image, then the loaded image is replaced with the target image.
8. The method according to claim 7, characterized in that, The method further includes: If the last image in the second image sequence is not the last image in the image database, then a display loop is started among the multiple display components; If the last image in the second image sequence is the last image in the image database, then the sequence of multiple display components is reset, so that the last image in the image database is loaded into the last display component, and the display loop between multiple display components is closed.
9. An image display device, characterized in that, The device includes: The acquisition unit is used to acquire at least one image to be displayed. The determining unit is configured to determine a first image sequence to be loaded based on the position of the at least one image to be displayed in the image database, wherein the first image sequence includes the at least one image to be displayed, and the at least one image to be displayed is not the first and / or the last image of the first image sequence; A loading unit is used to load the first image sequence and display the at least one image to be displayed.
10. The apparatus according to claim 9, characterized in that, The device further includes: A receiving unit is configured to, upon receiving an update instruction, acquire at least one updated image to be displayed based on the update instruction; An update unit is used to update the first image sequence based on at least one updated image to be displayed, so as to obtain a second image sequence to be loaded. The display unit is used to display at least one of the updated images to be displayed, and to load the second image sequence.
11. The apparatus according to claim 10, characterized in that, The display unit is used for: Based on the first image sequence and the second image sequence, determine the duplicate images in the first image sequence and the second image sequence, as well as the images to be deleted in the first image sequence and the images to be loaded in the second image sequence; The duplicate image is retained, the image to be deleted is deleted, and the image to be loaded is loaded.
12. The apparatus according to claim 10, characterized in that, When the image display mode is a single-image display mode, the loading unit is used for: Create multiple display components that correspond one-to-one with multiple images in the first image sequence, and load each image in the first image sequence into the corresponding display component; The image to be displayed is displayed based on the display component that loads the image to be displayed.
13. The apparatus according to claim 12, characterized in that, The display unit is used for: Based on the first display component that has loaded the updated image to be displayed, display the updated image to be displayed; Based on the updated image to be displayed and the first display component, as well as the sequence relationship between the second display component and the first display component, the target image in the second image sequence corresponding to each second display component is determined in the image database, wherein the second display component is a display component other than the first display component among multiple display components; For each second display component, if the corresponding target image is different from the currently loaded image, then the loaded image is replaced with the target image.
14. The apparatus according to claim 13, characterized in that, The device further includes: An activation unit is configured to activate a display loop among the plurality of display components if the last image in the second image sequence is not the last image in the image database. The closing unit is used to reset the sequence of multiple display components if the last image in the second image sequence is the last image in the image database, so that the last image in the image database is loaded into the last display component, and the display loop between the multiple display components is closed.
15. A computer program product, characterized in that, When the computer program product is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.
16. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method described in any one of claims 1 to 8.
17. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor executes the steps of any one of the methods described in claims 1 to 8.
