Electronic device and method for image viewing
Patent Information
- Application Number
- TW114107084
- Authority / Receiving Office
- TW · TW
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2025-01-17
- Filing Date
- 2025-02-26
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2045-02-25
AI Technical Summary
Displaying multiple images simultaneously on a single page in image viewers often results in significant loading times, leading to delayed transitions and a poor user experience due to interruptions.
An electronic device with a processor that preloads multiple images into cache memory based on a data directory structure, determining offsets and limits to optimize image loading, allowing for seamless transitions.
Reduces image loading time and enhances user experience by ensuring smooth image transitions without interruptions.
Smart Images

Figure TWG2TB001910407_001 
Figure TWG2TB001910407_002 
Figure TWG2TB001910407_003
Abstract
Description
Technical Field
[0001] This disclosure relates to image processing techniques, and in particular to electronic devices and methods for viewing images. Prior Technology
[0002] When using image viewers, displaying multiple images simultaneously on a single page can often result in significant loading times. As users switch between pages using image viewers, the loading process can be delayed, leading to a poor user experience due to interruptions. Since improving the speed and smoothness of image transitions is crucial for enhancing overall user satisfaction, reducing image loading time has become a key challenge in this field. Summary of the Invention
[0003] This disclosure relates to an electronic device and method for viewing images.
[0004] An electronic device for image viewing according to the present invention includes a transceiver, a cache memory, and a processor. The processor is coupled to the transceiver and the cache memory, wherein the processor is configured to: acquire a plurality of images via the transceiver, wherein the plurality of images include a first image, wherein the first image includes a first value and a second value; generate a data directory by assigning the first image to a first directory of the data directory according to the first value and assigning the first image to a first subdirectory of the first directory according to the second value; preload a second image from a second directory of the data directory into the cache memory according to the data directory in response to the selection of the first image; and output a graphical user interface via the transceiver, wherein the graphical user interface displays the first image in response to the selection of the first image.
[0005] In one embodiment of the present invention, the processor is further configured to: determine the offset between the order of the first directory in the data directory and the order of the second directory in the data directory; determine whether the offset is less than or equal to a first range limit; and in response to the offset being less than or equal to the first range limit, preload the second image in the second directory.
[0006] In one embodiment of the present invention, the processor is further configured to: preload a third image in a third directory of a data directory to a cache memory, wherein the third directory is in the data directory in order before the second directory is in the data directory.
[0007] In one embodiment of the present invention, the processor is further configured to: in response to the selection of a first image, preload a fourth image from a first subdirectory to cache memory according to a data directory.
[0008] In one embodiment of the present invention, the processor is further configured to: determine the offset between the order of the first image in the first subdirectory and the order of the fourth image in the first subdirectory; determine whether the offset is less than or equal to a second range limit; and preload the fourth image in response to the offset being less than or equal to the second range limit.
[0009] In one embodiment of the invention, the processor is further configured to output a graphical user interface via a transceiver, wherein the graphical user interface displays multiple images based on a count value.
[0010] In one embodiment of the present invention, the processor is further configured to: determine a second range limit based on the count value.
[0011] In one embodiment of the present invention, the processor is further configured to: save a preload quota in response to an offset less than a second range limit but the fourth image being the first or last image in the first subdirectory, or in response to the first image being the first or last image in the first subdirectory; determine the number of preloaded images in the first directory; and preload the second image in the second directory using the preload quota in response to the number of preloaded images being less than or equal to a counting limit.
[0012] In one embodiment of the present invention, the processor is further configured to: after the fourth image is preloaded, preload the fifth image in the first subdirectory to cache memory, wherein the fifth image is in the order of the first subdirectory before the fourth image is in the order of the first subdirectory.
[0013] In one embodiment of the present invention, the first image further includes a third value, wherein the processor is further configured to sort the first images in the first subdirectory according to the third value to generate a data directory.
[0014] An image viewing method according to the present invention includes: acquiring a plurality of images, wherein the plurality of images includes a first image, wherein the first image includes a first value and a second value; generating a data directory by assigning the first image to a first directory of the data directory according to the first value and assigning the first image to a first subdirectory of the first directory according to the second value; in response to the first image being selected, preloading a second image in a second directory of the data directory to cache memory according to the data directory; and outputting a graphical user interface, wherein the graphical user interface displays the first image in response to the first image being selected.
[0015] In one embodiment of the present invention, the step of preloading a second image in a second directory of a data directory to a cache memory according to a data directory includes: determining the offset between the order of the first directory in the data directory and the order of the second directory in the data directory; determining whether the offset is less than or equal to a first range limit; and in response to the offset being less than or equal to the first range limit, preloading the second image in the second directory.
[0016] In one embodiment of the present invention, the above method further includes: preloading a third image in a third directory of a data directory to a cache memory, wherein the third directory is in the data directory in order before the second directory is in the data directory.
[0017] In one embodiment of the present invention, the above method further includes: in response to the first image being selected, preloading a fourth image in the first subdirectory to the cache memory according to the data directory.
[0018] In one embodiment of the present invention, the step of preloading a fourth image in a first subdirectory to a cache memory according to a data directory includes: determining the offset between the order of the first image in the first subdirectory and the order of the fourth image in the first subdirectory; determining whether the offset is less than or equal to a second range limit; and preloading the fourth image in response to the offset being less than or equal to the second range limit.
[0019] In one embodiment of the present invention, the above method further includes: outputting a graphical user interface, wherein the graphical user interface displays multiple images based on a count value.
[0020] In one embodiment of the present invention, the above method further includes: determining a second range limit based on the count value.
[0021] In one embodiment of the present invention, the step of preloading a second image in a second directory of a data directory to a cache memory according to a data directory includes: saving a preload quota in response to an offset less than a second range limit but the fourth image being the first or last image in a first subdirectory, or in response to a first image being the first or last image in a first subdirectory; determining the number of preloaded images in the first directory; and preloading a second image in the second directory using the preload quota in response to the number of preloaded images being less than or equal to a counting limit.
[0022] In one embodiment of the present invention, the above method further includes: after the fourth image is preloaded, preloading the fifth image in the first subdirectory to cache memory, wherein the fifth image is in the order of the first subdirectory before the fourth image is in the order of the first subdirectory.
[0023] In one embodiment of the present invention, the first image further includes a third value, wherein the method further includes: sorting the first images in the first subdirectory according to the third value to generate a data directory.
[0024] Based on the above description, this disclosure presents a special format for creating a catalog of images. Electronic devices can preload multiple images based on the image the user is currently viewing.
[0025] To make the above content easier to understand, several embodiments will be described in detail below with reference to the diagrams. Simple Explanation of the Diagram
[0026] The drawings are included to provide a further understanding of this disclosure and form part of this specification. These drawings illustrate exemplary embodiments of this disclosure and, together with the implementation methods, serve to explain the principles of this disclosure. Figure 1 illustrates a schematic diagram of an electronic device for image viewing according to an embodiment of the present disclosure. Figure 2 illustrates a schematic diagram of the format of an image file according to an embodiment of the present disclosure. Figure 3 illustrates the data structure of an image file according to an embodiment of the present disclosure. Figure 4 illustrates a graphical user interface of an image viewer according to an embodiment of the present disclosure. Figure 5 illustrates a flowchart of image preloading according to an embodiment of this disclosure. Figure 6 illustrates an example of image preloading according to an embodiment of this disclosure. Figure 7 illustrates another example of image preload according to an embodiment of this disclosure. Figure 8 illustrates another example of image preload according to an embodiment of this disclosure. Figure 9 illustrates a flowchart of a method for viewing an image according to an embodiment of the present disclosure. Implementation
[0027] Figure 1 illustrates a schematic diagram of an electronic device 100 for image viewing according to an embodiment of the present disclosure. The electronic device 100 may include a processor 110, a storage medium 120, and a transceiver 130. The processor 110 may be, for example, a central processing unit (CPU), or other programmable general-purpose or special-purpose microcontroller unit (MCU), microprocessor, digital signal processor (DSP), programmable controller, application-specific integrated circuit (ASIC), graphics unit (GPU), arithmetic logic unit (ALU), complex programmable logic device (CPLD), field-programmable gate array (FPGA), or other similar devices or combinations thereof. The processor 110 may be coupled to the storage medium 120 and the transceiver 130.
[0028] Storage medium 120 may be, for example, any type of fixed or removable random-access memory (RAM), read-only memory (ROM), flash memory, hard disk drive (HDD), solid-state drive (SSD), or similar elements or combinations thereof. Storage medium 120 may be a non-transitory computer-readable storage medium configured to record multiple executable computer programs, modules, or applications, loaded by processor 110 to perform the functions of electronic device 100. Storage medium 120 may include cache memory 121. Processor 110 may preload one or more images (or image sets) or images into cache memory 121 for image viewing purposes.
[0029] Transceiver 130 can be configured to transmit or receive wired / wireless signals. Transceiver 130 can also perform low-noise amplification, impedance matching, frequency mixing, up- or down-frequency conversion, filtering, and amplification operations. Processor 110 can communicate with other devices via transceiver 130. For example, processor 110 can acquire one or more images, pictures, or user commands via transceiver 130. As another example, processor 110 can output a graphical user interface (GUI) to a display via transceiver 130.
[0030] Figure 2 illustrates a schematic diagram of an image file format according to an embodiment of this disclosure. Image 20 may include information 21, which can be defined as level 1 information, information 22, which can be defined as level 2 information, and information 23, which can be defined as level 3 information. Information 21 may include values such as level_1 identifier (ID) or level_1 order. Information 22 may include values such as level_2 ID or level_2 order. Information 23 may include values such as level_3 ID or level_3 order.
[0031] One or more level_2 IDs may belong to the same level_1 ID, and one or more level_3 IDs may belong to the same level_2 ID. For example, in Figure 3, images 311 and 312 with different level_3 IDs but the same level_2 ID can belong to the same level_2 image group 310. Image groups 310 and 320 with different level_2 IDs but the same level_3 ID can belong to the same level_1 image group 300.
[0032] In one embodiment, a level_1 ID may represent an index of a directory in the operating system, where the corresponding level_1 order may represent the order of the level_1 ID among multiple level_1 IDs. A level_2 ID may represent an index of a subdirectory within a directory, where the corresponding level_2 order may represent the order of the level_2 ID among multiple level_2 IDs belonging to the same level_1 ID. A level_3 ID may represent an index of an image within a subdirectory, where the corresponding level_3 order may represent the order of the level_3 ID among multiple level_3 IDs belonging to the same level_2 ID.
[0033] For example, suppose the processor 110 acquires multiple images related to a patient's transthoracic echocardiography (TTE) images. Images with the same level_1 ID correspond to the same patient. Images with the same level_1 ID but different level_2 IDs correspond to different electrodes attached to the same patient. That is, images with different level_2 IDs correspond to different TTE images of the same patient. Images with the same level_2 ID but different level_3 IDs correspond to different frames (or timestamps, TTE images) of the same TTE image.
[0034] Figure 4 illustrates a graphical user interface 400 of an image viewer according to one embodiment of this disclosure. The GUI 400 can simultaneously select and display one or more images (or pictures) 410, 420, 430, 440, 450, and 460 corresponding to the same level_1 ID based on a count value (e.g., count value C) and the level_2 order of each image. For example, because the count value equals 6, the GUI 400 can display six images simultaneously, where images 410, 420, 430, 440, 450, and 460 can be positioned on the GUI 400 according to the level_2 order of each image. For example, image 410 with the lowest level_2 order can be positioned in the upper left corner of the GUI 400, while image 460 with the highest level_2 order can be positioned in the lower right corner of the GUI 400. In one embodiment, the displayed images 410, 420, 430, 440, 450, and 460 can correspond to different level_2 IDs but the same level_3 ID. In other words, the timestamps of the different images 410, 420, 430, 440, 450 and 460 that are displayed at the same time can be the same.
[0035] In one embodiment, a user can input commands into the electronic device 100 to manipulate the slider 42 of the GUI 400, thereby changing the timestamp of the displayed image. For example, suppose the images 410-460 currently displayed by the GUI 400 correspond to frame Y. If the user drags the slider 42 to the right, the GUI 400 can switch the displayed images 410-460 from frame Y to frame Y+1.
[0036] In one embodiment, a user can input commands into the electronic device 100 to manipulate the button 41 of the GUI 400, thereby changing the displayed image. For example, suppose the GUI 400 is displaying images 410-460 corresponding to TTE acoustic windows 1-6 respectively. If the user clicks button 41, the GUI 400 can switch the displayed image from images 410-460 to images corresponding to TTE acoustic windows 7-12.
[0037] In one embodiment, if an image is selected (e.g., the image currently displayed by GUI 400), processor 110 may preload one or more images associated with the selected image based on the parameters shown in Table 1. Table 1 Level_1 preload range limit: B (B is a positive integer, and 0≤B≤the maximum value of the level_1 order) Level_3 preload range limit (when C=1): R (R is a positive integer, and 0≤R≤the maximum value of level_3 order). Level 3 Preload Range Limit (when C>1): L= A Level 1 group preload count limit: O = 2R + 1 All Level 1 group preload count limits: A = 2O + 1 = 4R + 3 Level_2 count value: C (C is a positive integer and 1≤C≤the maximum value in the level_2 order)
[0038] Figure 5 illustrates a flowchart of image preloading according to an embodiment of the present disclosure, wherein the flowchart can be implemented by the electronic device 100 shown in Figure 1.
[0039] In step S501, the processor 110 can acquire multiple images via the transceiver 130, where each image may include information 21, 22, or 23 (i.e., level 1 information, level 2 information, or level 3 information) as shown in FIG2. The acquired images can be stored in the storage medium 120.
[0040] In step S502, processor 110 may generate a data directory, which may contain one or more directories, and each directory may contain one or more subdirectories. Processor 110 may generate the data directory by assigning images to directories according to information 21 and assigning the images to subdirectories of the directories according to information 22. Processor 110 may sort the images in the subdirectories according to information 23.
[0041] For example, image X may contain values i, j, and k corresponding to information 21, 22, and 23, respectively. Processor 110 may assign the path X(i, j, k) of image X to the k-th image in the j-th subdirectory of the i-th directory in the data catalog. That is, index i may be associated with the level_1 ID or level_1 sequence of image X, index j may be associated with the level_2 ID or level_2 sequence of image X, and index k may be associated with the level_3 ID or level_3 sequence of image X. In one example, the path X(i, j, k) described above may represent the k-th frame (or k-th timestamp) of the j-th TTE image (or j-th electrode) of the i-th patient.
[0042] In step S503, the user can select an image, wherein the selected image can be preloaded into cache memory 121 or displayed in GUI 400. In the following paragraphs, it is assumed that the selected image is image X corresponding to path X(i, j, k).
[0043] In step S504, the processor 110 may preload one or more acquired images into the cache memory 121 according to the data directory.
[0044] In one embodiment, processor 110 may preload one or more images located in the j-th subdirectory (e.g., the j-th TTE image of a patient) into cache memory 121 according to range limit R or L, wherein processor 110 may determine whether to refer to range limit R or L based on count value C. It should be noted that, in one embodiment, the number of preloaded images belonging to the same level_1 ID (including the currently selected image X(i, j, k)) cannot exceed the count limit O = 2R + 1, and the total number of preloaded images (including image X(i, j, k)) cannot exceed the count limit A, wherein the count limit A can be set to A = 2O + 1 = 4R + 3 according to user definition.
[0045] Assume C=1 (i.e., GUI 400 displays only one image or picture at a time). Processor 110 can determine the offset K between the level_3 order of image X(i, j, k) in the j-th subdirectory and the level_3 order of image X(i, j, k±K) in the j-th subdirectory, where K is a positive integer. If the offset K ≤ range limit R, processor 110 can preload image X(i, j, k±K) into cache memory 121. The order of image X(i, j, k±K) to be preloaded in the j-th subdirectory can satisfy the following formula: max(1,kR)≤k±K≤min(k+R, the maximum level_3 order belonging to the same level_2 ID).
[0046] Taking Figure 6 as an example, assuming the design value C=1, the range limit R=2, and image 624 is currently selected or displayed by GUI 400. Processor 110 can determine that the offset K between the level_3 order of image 624 (e.g., 4) and the level_3 order of images 622, 623, 625, and 626 (e.g., 2, 3, 5, and 6) is 2, 1, 1, and 2 respectively, and these offsets are less than or equal to the range limit R=2. Therefore, processor 110 can preload images 622, 623, 625, or 626 into cache memory 121. On the other hand, processor 110 can determine that the offset K between the level_3 order of image 624 (e.g., 4) and the level_3 order of images 621 and 627 (e.g., 1 and 7) is 3 and 3 respectively, and these offsets are greater than the range limit R=2. Therefore, processor 110 may not preload images 621 or 627 into cache memory 121. The level_3 order 4±K of the images to be preloaded (e.g., 622, 623, 625, or 626) can satisfy the following formula: max(1,4-2)≤4±K≤min(4+2,7).
[0047] Assume C > 1 (i.e., GUI 400 displays multiple images or pictures simultaneously). Processor 110 can determine the offset K between the level_3 order of image X(i, j, k) in the j-th subdirectory and the level_3 order of image X(i, j, k±K) in the j-th subdirectory, where K is a positive integer. If the offset K ≤ the range limit L = The processor 110 can preload the image X(i, j, k±K) into the cache memory 121. The level_3 order of the image X(i, j, k±K) to be preloaded in the j-th subdirectory can satisfy the following formula: max(1,kL)≤k±K≤min(k+L, the maximum level_3 order of the same level_2 ID).
[0048] Taking Figure 8 as an example, assuming the design value C=2, the range limit R=3, the counting limit O=2R+1=7, and the range limit L= =1, and image 822 is currently selected or displayed by GUI 400. Processor 110 can determine that the offset K between the level_3 order of image 822 (e.g., 2) and the level_3 order of images 821 and 823 (e.g., 1 and 3) is 1 and 1 respectively, which are equal to the range limit L=1. Therefore, processor 110 can preload images 821 and 823 into cache memory 121. On the other hand, processor 110 can determine that the offset K between the level_3 order of image 822 (e.g., 2) and the level_3 order of image 824 (e.g., 4) is 2, which is greater than the range limit L=1. Therefore, processor 110 may not preload image 824 into cache memory 121. The level_3 order k±K of the images to be preloaded (e.g., 821 or 823) can satisfy the following formula: max(1,2-1)≤4±K≤min(2+1,7).
[0049] In one embodiment, processor 110 may preload image X(i, j, kK) after image X(i, j, k+K) is preloaded, in response to image X(i, j, k+K) having a level_3 order in the j-th subdirectory preceding image X(i, j, k+K) in the j-th subdirectory. For example, in FIG6, since image 623 has a level_3 order preceding image 625, processor 110 may preload image 623 after image 625 is preloaded.
[0050] In one embodiment, processor 110 may preload image X(i, j, k+K) after preloading it, in response to the offset K between the level_3 order of image X(i, j, k+K) and the level_3 order of image X(i, j, k) being less than the offset (K+n) between the level_3 order of image X(i, j, k+(K+n)) and the level_3 order of image X(i, j, k) where n is a positive integer. Taking Figure 6 as an example, since the offset "1" between the level_3 order of image 624 and the level_3 order of image 623 is less than the offset "2" between image 622 and image 624, processor 110 may preload image 622 after preloading image 623.
[0051] In one embodiment, if the offset K between the level_3 order of image X(i, j, k) and the level_3 order of image X(i, j, k±K) is less than a range constraint (e.g., a range constraint R or L determined by the value of the count value C), and image X(i, j, k±K) is not the first or last image in the j-th subdirectory (i.e., image X(i, j, k±K) is not image X(i, j, 1) or X(i, j, k±K) with the maximum level_3 order (e.g., 7)), processor 110 may preload image X(i, j, k±K). However, if the offset K between the level_3 order of image X(i, j, k) and the level_3 order of image X(i, j, k±K) is less than a range constraint (e.g., a range constraint R or L), but image X(i, j, k±K) is not the first or last image in the j-th subdirectory (i.e., image X(i, j, k±K) with the maximum level_3 order (e.g., 7)), processor 110 may preload image X(i, j, k±K). (k±K) represents the first or last image in the j-th subdirectory. Processor 110 can save one or more preload quotas to preload other images, where the number of saved preload quotas may be equal to the difference between the range limit R and the offset K (i.e., the number of saved preload quotas = R – offset K). After determining the images to be preloaded corresponding to the i-th directory, processor 110 can determine the number of preloaded images in the i-th directory, where more preload quotas correspond to fewer preloaded images. If the number of preloaded images in the i-th directory is greater than or equal to the counting limit O = 2R + 1, processor 110 can determine that no preload quota has been saved. If the number of preloaded images in the i-th directory is less than the counting limit O, processor 110 can determine that one or more preload quotas have been saved. Processor 110 can use the saved preload quotas to preload images in directories within the range limit B until all preload quotas have been used.
[0052] Using Figure 7 as an example, assuming the design value C=1, range limit R=3, range limit B=2, count limit O=7, and image 722 is currently selected or displayed by the graphical user interface 400. Processor 110 can determine that the offset "1" between the level_3 order of image 722 (e.g., 2) and the level_3 order of image 721 (e.g., 1) is less than the range limit R=3, but image 721 is the first image in a subdirectory of directory 720 (i.e., the subdirectory contains images corresponding to the same level_2 ID or order). Therefore, processor 110 can save two preload quotas to preload other images according to the formula: R – offset "1" = 3 – 1 = 2. Because directory 740 is within range limit B, the saved preload quotas can be used to preload images, for example, in directory 740.
[0053] In one embodiment, processor 110 may preload one or more images from the (i±I)th directory into cache memory 121 according to range constraint B, where I is a positive integer and I ≤ range constraint B. Specifically, processor 110 may determine the offset I between the level_1 order of the i-th directory and the level_1 order of the (i±I)th directory. If the offset I ≤ B, processor 110 may preload image X(i+I, j, 1+K) from the (i+I)th directory and / or image X(iI, j, mK) from the (iI)th directory, where m is the maximum level_3 order belonging to the (iI)th directory, K is a non-negative integer, and K ≤ range constraint R. The level_1 order of image X(i+I, j, 1+K) satisfies the following formula: i+I ≤ min(i+B, the maximum level_1 order belonging to the data directory), and the level_3 order of image X(i+I, j, 1+K) satisfies the following formula: 1+K ≤ min(1+R, the maximum level_3 order belonging to the (i+I)th directory). The level_1 order of image X(iI, j, mK) satisfies the following formula: max(1,iB) ≤ iI, and the level_3 order of image X(iI, j, mK) satisfies the following formula: max(1,mR) ≤ mK.
[0054] Using Figure 6 as an example, assume range constraint B=1 and image 624 is currently selected or displayed by the graphical user interface 400. Processor 110 can determine that the offset I between the level_1 order of image 624 (e.g., 2) and the level_1 order of image 631 (or 632, 633) (e.g., 3) is 1, and this value is less than or equal to range constraint B=1. Therefore, processor 110 can preload image 631 (or 632, 633) into cache memory 121. On the other hand, processor 110 can determine that the offset I between the level_1 order of image 624 (e.g., 2) and the level_1 order of image 617 (or 616, 615) (e.g., 1) is 1, and this value is less than or equal to range constraint B=1. Therefore, processor 110 can preload image 617 (or 616, 615) into cache memory 121.
[0055] In one embodiment, the processor 110 may preload the image X(i-I, j, m-K) after preloading the image X(i+I, j, 1+K) in response to the level_1 order of the image X(i-I, j, m-K) being before the level_3 order of the image X(i+I, j, 1+K), where m is the maximum level_3 order belonging to the (i-I)th directory, K is a positive integer, and K ≤ the range limit R. Taking FIG. 6 as an example, since the level_1 order of the images 617, 616, or 615 is before the level_1 order of the images 631, 632, or 633, the processor 110 may preload the images 617, 616, or 615 after preloading the images 631, 632, or 633.
[0056] In one embodiment, assume that n and m are positive integers and n < m. The processor 110 may preload the images belonging to the (i+m)th directory after preloading the images belonging to the (i+n)th directory in response to the offset "n" between the level_1 order of the (i+n)th directory and the level_1 order of the ith directory being less than the offset "m" between the level_1 order of the (i+m)th directory and the level_1 order of the ith directory. Taking FIG. 7 as an example, since the offset "1" between the directory 730 and the directory 720 is less than the offset "2" between the directory 740 and the directory 720, the processor 110 may preload the images in the directory 740 after preloading the images in the directory 730.
[0057] In one embodiment, the processor 110 may determine the number of preloaded images. If the number of preloaded images is less than the count limit A = RO + 1 = 4R + 3, the processor 110 may preload more images in the (i+n)th directory, where n is a positive integer and n ≤ the range limit B. Taking FIG. 7 as an example, assume that the range limit R = 3, the range limit B = 2, and the count limit A = 15. After the images in the directory 710 are preloaded, the processor 110 may determine that the number of preloaded images in the directories 710, 720, and 730 (i.e., the images 714, 715, 716, 717, 721, 722, 723, 724, 725, 731, 732, 733, and 734) is 13, which is less than the count limit A = 15. Therefore, the processor 110 may preload the images in the directory 740.
[0058] In one embodiment, processor 110 may stop preloading images if the difference between the count limit A and the number of preloaded images is less than the count value C. Referring to FIG8 as an example, suppose the count limit A = 15 and the count value C = 2, and images in two subdirectories of each of directories 810, 820, and 830 (e.g., images 816 and 817 in a subdirectory of directory 810, images 821, 822, and 823 in a subdirectory of directory 820, or images 831 and 832 in a subdirectory of directory 830) have been preloaded into cache memory 121. Processor 110 may determine that the number of preloaded images is equal to "14". Since the difference between the count limit A = 15 and the number of preloaded images "14" is less than the count value C = 2, processor 110 may stop preloading images.
[0059] Returning to Figure 2, in step S505, processor 110 can display one or more images through the graphical user interface 400. Processor 110 can display one or more images (or pictures) corresponding to the same level_1 ID based on the count value C and the level_2 sequence of each image.
[0060] In step S506, the processor 110 determines whether the user has switched pages of the graphical user interface 400 via user command, where each page may contain one or more selected images (or pictures). If the page is switched, the processor 110 may select one or more new images (or pictures) to be displayed on the graphical user interface 400. After a new image (or picture) is selected, the processor 110 may execute step S503 again. If the page is not switched, the image preloading process may stop.
[0061] Figure 6 illustrates an example of image preloading according to an embodiment of this disclosure. Assume range constraint R=2, range constraint B=2, count value C=1, count constraint O=2R+1=5, count constraint A=4R+3=11, and image 624 in catalog 620 is currently selected or displayed by graphical user interface 400. Processor 110 can determine that the offsets between the level_3 order of image 624 (e.g., 4) and the level_3 order of images 622, 623, 625, and 626 (e.g., 2, 3, 5, and 6) are 2, 1, 1, and 2, respectively, and these offsets are less than or equal to range constraint R=2. Therefore, processor 110 can preload images 622, 623, 625, or 626 into cache memory 121. Because the offset between image 624 and images 623 and 625 is the smallest offset, processor 110 can preload images 623 and 625 first. Processor 110 may preload image 625 before preloading image 623 in response to the fact that the level_3 order of image 623 precedes the level_3 order of image 625. On the other hand, processor 110 may determine that the offset K between the level_3 order of image 624 (e.g., 4) and the level_3 orders of images 621 and 627 (e.g., 1 and 7) is 3 and 3 respectively, and these offsets are greater than the range limit R=2. Therefore, processor 110 may not preload images 621 or 627 into cache memory 121.
[0062] Processor 110 determines that the number of preloaded images is "5", which is less than the counting limit A=11. Therefore, processor 110 can preload more images from directories other than directory 620. Since the level_1 order of directory 610 is earlier than the level_1 order of directory 630, processor 110 can preload the images in directory 630 first. Processor 110 can preload images 631, 632, and 633 because the level_3 order of these images satisfies the formula 1+K ≤ min (1+R, the maximum level_3 order belonging to the (i+i)th directory) as described above.
[0063] Processor 110 determines that the number of pre-loaded images belonging to directories 620 and 630 is "8", which is less than the counting limit A=11. Therefore, processor 110 can pre-load more images from directory 610. Processor 110 can pre-load images 617, 616, and 615 because the level_3 order of these images satisfies the formula max(1,mR)≤mK as described above.
[0064] Figure 7 illustrates another example of image preloading according to an embodiment of this disclosure. Assume range constraint R=3, range constraint B=2, count value C=1, count constraint O=2R+1=7, count constraint A=4R+3=15, and image 722 in catalog 720 is currently selected or displayed by graphical user interface 400. Processor 110 can determine that the offsets between the level_3 order of image 722 (e.g., 2) and the level_3 order of images 721, 723, 724, and 725 (e.g., 1, 3, 4, and 5) are 1, 1, 2, and 3, respectively, and these offsets are less than or equal to range constraint R=3. Therefore, processor 110 can preload images 721, 723, 724, or 725 into cache memory 121. Because the offset between image 722 and images 721 and 723 is the smallest offset, processor 110 can preload images 721 and 723 first. The processor 110 may preload image 723 before preloading image 721 in response to the fact that the level_3 order of image 721 is before the level_3 order of image 723.
[0065] Processor 110 can determine that the offset "1" between the level_3 order (e.g., 2) of image 722 and the level_3 order (e.g., 1) of image 721 is less than the range limit R=3, but image 721 is the first image in a subdirectory of directory 720 (i.e., the subdirectory contains images corresponding to the same level_2 ID or order). Therefore, processor 110 can store two preload quotas for preloading other images based on the formula described above: R – offset "1" = 3 – 1 = 2.
[0066] Processor 110 determines that the number of preloaded images is "5", which is less than the counting limit A=15. Therefore, processor 110 can continue to preload other images. Since the offset between directory 720 and directories 710 and 730 is the minimum offset and within the range limit B=2, processor 110 can select one of directories 710 and 730 to preload images. Processor 110 can preload images in directory 730 first in response to the level_1 order of directory 710 preceding the level_1 order of directory 730. Processor 110 can preload images 731, 732, 733, and 734 because the level_3 order of these images satisfies the formula 1+K ≤ min(1+R, the maximum level_3 order belonging to the (i+1)th directory) as described above. Then, since the number of preloaded images is "9", which is less than the counting limit A=15, processor 110 can preload images in directory 710. Processor 110 can preload images 717, 716, 715 and 714 because the level_3 order of these images satisfies the formula max(1,mR)≤mK as described above.
[0067] Processor 110 determines that the number of preloaded images in directories 710, 720, and 730 is "13", which is less than the counting limit A = 15. Therefore, processor 110 can use the saved preload quota to preload images within the range limit B. For example, processor 110 can use two preload quotas to preload two images in directory 740.
[0068] Figure 8 illustrates another example of image preloading according to an embodiment of this disclosure. Assume range constraint R=3, range constraint B=1, count value C=2, count constraint O=2R+1=7, count constraint A=4R+3=15, and two images corresponding to the two subdirectories of directory 820 (e.g., image 822 and another image sharing the same level_3 and level_1 order but with a different level_2 order) are currently selected or displayed by the graphical user interface 400. Since count value C>1, processor 110 can determine the range constraint. Processor 110 can determine that the offset between the level_3 order of image 822 (e.g., 2) and the level_3 order of images 821 and 823 (e.g., 1 and 3) is 1 and 1, which is equal to the range constraint L=1. Therefore, processor 110 can preload images 821 and 823 into cache memory 121. Processor 110 can preload image 823 before preloading image 821 in response to the fact that the level_3 order of image 821 precedes the level_3 order of image 823.
[0069] Processor 110 determines that the number of preloaded images in directory 820 is "6", which is less than the counting limit A=15. Therefore, processor 110 can continue to preload other images. Since the offset between directory 820 and directories 810 and 830 is within the range limit B=1, processor 110 can preload images in directories 810 and 830. Processor 110 can preload images in directory 830 before preloading images in directory 810 in response to the fact that the level_1 order of directory 810 precedes the level_1 order of directory 830. Processor 110 can preload images 831 and 832 because the level_3 order of these images satisfies the aforementioned formula 1+K ≤ min (1+R, the maximum level_3 order belonging to the (i+1)th directory). Then, since the number of preloaded images is "10", which is less than the counting limit A=15, processor 110 can preload images in directory 810. Processor 110 can preload images 817 and 816 because the level_3 order of these images satisfies the aforementioned formula max (1,mR) ≤ mK. Processor 110 can determine that the number of preloaded images is "14". Although the number of preloaded images "14" is less than the counting limit A=15, the difference between the counting limit A=15 and "14" is less than the count value C=2. Therefore, processor 110 can stop preloading images.
[0070] Figure 9 illustrates a flowchart of a method for viewing images according to an embodiment of the present disclosure, wherein the method may be implemented by the electronic device 100 shown in Figure 1. In step S901, a plurality of images are acquired, wherein the plurality of images includes a first image, wherein the first image includes a first value and a second value. In step S902, a data directory is generated by assigning the first image to a first directory of a data directory according to the first value and assigning the first image to a first subdirectory of the first directory according to the second value. In step S903, in response to the first image being selected, a second image from a second directory of the data directory is preloaded into a cache according to the data directory. In step S904, a graphical user interface is output, wherein the graphical user interface displays the first image in response to the first image being selected.
[0071] In summary, the electronic device can create a data catalog based on the values contained in each image. When a user selects (or views) an image, the electronic device can preload one or more images adjacent to the selected image in a specific order. For example, the electronic device can preload images from the same image as the selected image, or images from the same or adjacent catalogs (or subcatalogs) as the selected image. Since users are more likely to view images later than the selected image than earlier, the electronic device can preload later images with higher priority. If the selected image is close to the first or last image in the catalog, resulting in fewer images needing to be preloaded in the catalog, the saved preload quota can be used to preload images from adjacent catalogs of the selected image.
[0072] 100: Electronic devices 110: Processor 120: Storage Media 121: Cache memory 130: Transceiver 20,311,312,615,616,617,621,622,623,624,625,626,627,631,632,633,714,715,716,717,721,722,723,724,725,731,732,733,734,816,817,821,822,823,824,831,832: Images 21, 22, 23: News 300, 310, 320: Image groups 400: Graphical User Interface 41: Button 410, 420, 430, 440, 450, 460: Images 42: Slide bar 610,620,630,710,720,730,740,810,820,830: Table of Contents S501, S502, S503, S504, S505, S506, S901, S902, S903, S904: Steps
Claims
1. An electronic device for viewing images, comprising: transceiver; Cache memory; and a processor coupled to the transceiver and the cache memory, wherein the processor is configured to: acquire a plurality of images via the transceiver, wherein the plurality of images includes a first image, wherein the first image includes a first value and a second value; generate the data directory by assigning the first image to a first directory of the data directory according to the first value and assigning the first image to a first subdirectory of the first directory according to the second value; In response to the first image being selected, preloading a second image from a second directory of the data directory to the cache memory according to the data directory includes: determining a first offset between the order of the first directory in the data directory and the order of the second directory in the data directory; Determine whether the first offset is less than or equal to a first range limit; and in response to the first offset being less than or equal to the first range limit, preload the second image in the second directory; preload the third image in the third directory of the data directory to the cache memory, wherein the third directory is in the order of the data directory before the second directory is in the order of the data directory; and output a graphical user interface through the transceiver, wherein the graphical user interface displays the first image in response to the first image being selected.
2. The electronic device as claimed in claim 1, wherein the processor is further configured to: in response to the first image being selected, preload a fourth image from the first subdirectory to the cache memory according to the data directory.
3. The electronic device of claim 2, wherein the processor is further configured to: determine a second offset between the order of the first image in the first subdirectory and the order of the fourth image in the first subdirectory; determine whether the second offset is less than or equal to a second range limit; and preload the fourth image in response to the second offset being less than or equal to the second range limit.
4. The electronic device as claimed in claim 3, wherein the processor is further configured to: output a graphical user interface via the transceiver, wherein the graphical user interface displays a plurality of images based on count values.
5. The electronic device as claimed in claim 4, wherein the processor is further configured to: determine the second range limit based on the count value.
6. The electronic device as claimed in claim 3, wherein the processor is further configured to: save a preload quota in response to the second offset being less than the second range limit but the fourth image being the first or last image in the first subdirectory, or in response to the first image being the first or last image in the first subdirectory; determine the number of preloaded images in the first directory; and preload the second image in the second directory using the preload quota in response to the number of preloaded images being less than or equal to a counting limit.
7. The electronic device of claim 3, wherein the processor is further configured to: after the fourth image is preloaded, preload a fifth image in the first subdirectory to the cache memory, wherein the fifth image is in the first subdirectory in order before the fourth image is in the first subdirectory.
8. The electronic device of claim 1, wherein the first image further includes a third value, wherein the processor is further configured to: sort the first image in the first subdirectory according to the third value to generate the data catalog.
9. A method for viewing an image, comprising: Acquire multiple images, wherein the multiple images include a first image, and wherein the first image includes a first value and a second value; The data directory is generated by assigning the first image to a first directory of the data directory according to the first value and assigning the first image to a first subdirectory of the first directory according to the second value. In response to the first image being selected, preloading a second image from a second directory of the data directory to cache memory according to the data directory includes: determining the offset between the order of the first directory in the data directory and the order of the second directory in the data directory; Determine whether the offset is less than or equal to a first range limit; and in response to the offset being less than or equal to the first range limit, preload the second image in the second directory; preload the third image in the third directory of the data directory to the cache memory, wherein the third directory is in the order of the data directory before the second directory is in the order of the data directory; and output a graphical user interface, wherein the graphical user interface displays the first image in response to the first image being selected.
10. The method of claim 9, further comprising: In response to the first image being selected, a fourth image from the first subdirectory is preloaded into the cache memory according to the data directory.
Citation Information
Patent Citations
Image caching processing method and device, computing equipment and readable storage medium
CN110427448A
Data pre-reading method and device, equipment, storage medium and product
CN115760547A
Template matching based motion vector refinement in video coding system
TW202329691A
Media playback method for improving playback response based on pre-parsing operation and related media playback device
TWI819580B
High-performance data cache system and method
US20150193348A1