Image selection component and method, device, medium and program
The image selection component and method facilitate efficient switching between image processing scenarios and directories on a single screen, enhancing user experience and reducing operational complexity.
Patent Information
- Application Number
- JP2024575036
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-09-30
- Filing Date
- 2023-09-14
- Publication Date
- 2025-07-03
AI Technical Summary
Existing image processing systems require users to frequently switch between different image processing scenarios, leading to cumbersome operations and reduced efficiency.
An image selection component and method that allows users to select and switch between multiple image processing scenarios and directories on the same screen, using controls for scenario and directory selection, and display thumbnails based on these selections.
Enables seamless switching between image processing scenarios, simplifying user operations and improving efficiency by eliminating the need to frequently exit and enter screens.
Smart Images

Figure 2025520620000001_ABST
Abstract
Description
Technical Field
[0001] [Cross - Reference to Related Applications] This application claims priority based on the Chinese patent application No. 202211239277.0, titled "Image Selection Component and Method, Device, Medium, and Program Product", filed on September 30, 2022, and the entire content of that application is incorporated herein by reference.
[0002] [Technical Field] This disclosure relates to the field of computer technology, and in particular, to image selection components and methods, devices, media, and program products.
Background Art
[0003] Currently, users can perform image processing on an image using a terminal to modify the image and obtain a satisfactory image effect. However, in existing image processing, usually, there is only one type of image processing scenario provided within one screen. When it is necessary to perform different types of image processing, the user has to exit the screen of the current image processing scenario and enter the screen of another image processing scenario to perform another type of image processing. This makes the switching operation between different image processing scenarios cumbersome, reduces the efficiency of image processing, and brings inconvenience to the user's operation.
Summary of the Invention
[0004] To solve, to some extent, the technical problems of cumbersome switching operations and reduced image processing efficiency in different image processing scenarios, this disclosure proposes an image selection component and method, device, storage medium, and program product.
[0005] In a first aspect of this disclosure, an image selection component is provided. After entering an image processing application on an electronic device, at least an image processing scenario selection control, an image directory selection control, and a display control can be displayed in a display area. The image processing scenario selection control is used to select a corresponding image processing scenario according to a first control instruction, The image directory selection control is used to select a corresponding image directory according to a second control instruction, The display control is used to display a first image thumbnail in a first area of the display area based on the image processing scenario and the image directory, The display control is further used to display a target image thumbnail in the first area according to an operation instruction for the first image thumbnail.
[0006] In a second aspect of the present disclosure, an image selection method is provided. This image selection method includes: displaying a first image thumbnail in a first area of a display area based on the image processing scenario and the image directory in response to a first control instruction for selecting a corresponding image processing scenario and a corresponding image directory being selected; displaying a target image thumbnail in the first area according to an operation instruction for the first image thumbnail.
[0007] In a third aspect of the present disclosure, an electronic device is provided. The electronic device includes one or more processors, a memory, and one or more programs. The one or more programs are stored in the memory and executed by the one or more processors. The program includes instructions for executing the image selection method of the second aspect.
[0008] In a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium including a computer program used to cause a processor to execute the image selection method of the second aspect when executed by the one or more processors is provided.
[0009] In a fifth aspect of the present disclosure, there is provided a computer program product including computer program instructions that, when executed by a computer, cause the computer to execute the image selection method of the second aspect.
[0010] As described above, the image selection component, method, device, medium, and program product provided by the present disclosure can quickly and easily switch between different image processing scenarios on the same screen by selecting different image processing scenarios through image processing scenario control. It can be seen that the user does not need to frequently enter and exit the screen, the user's operation is simplified, and the efficiency of image processing is improved.
Brief Description of the Drawings
[0011] To more clearly explain the technical solutions in the present disclosure or related technologies, the drawings necessary for the description of the embodiments or related technologies are briefly introduced below. Obviously, the drawings in the following description are only embodiments of the present disclosure. Those skilled in the art can obtain other drawings based on these drawings without creative efforts.
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Embodiments for Carrying Out the Invention
[0012] To make the objectives, technical solutions, and advantages of the present disclosure clearer, the present disclosure will be described in more detail below with reference to specific embodiments and the accompanying drawings.
[0013] It should be noted that unless otherwise defined, technical terms or scientific terms used in the embodiments of the present disclosure should have the ordinary meanings understood by those skilled in the art to which the present disclosure pertains. The "first", "second", and similar words used in the embodiments of the present disclosure do not indicate order, quantity, or importance, but are only used to distinguish different components. Words such as "including" or "comprising" mean that the elements or things appearing before such words include the elements or things enumerated after such words and their equivalents without excluding other elements or things. Words such as "connection" or "communication" are not limited to physical or mechanical connections, and may include direct or indirect electrical connections. "Upper", "lower", "left", "right", etc. are used to express relative positional relationships, and when the absolute position of the described object changes, the relative positional relationship may change accordingly.
[0014] Currently, image processing such as collage and color correction is often performed on a terminal using image processing technology to obtain rich and effective images. However, in the current image processing process, the user can only execute one type of image processing on one screen. When it is necessary to execute another type of image processing, the user has to end the screen of the current image processing scenario, enter the screen corresponding to another image processing scenario, and execute another type of image processing. In the existing image processing process, it is not possible to provide multiple types of image processing scenarios simultaneously on one screen for the user to select. Therefore, the switching operation between different image processing scenarios becomes complicated, and the efficiency of image processing decreases. Accordingly, a technical problem to be solved is to provide different image processing scenarios on the same screen so that the user can select, and improve the image processing efficiency.
[0015] In consideration of this, the image selection component, method, device, medium, and program product provided by the present disclosure can quickly and easily switch between different image processing scenarios within the same screen by selecting different image processing scenarios through image processing scenario control, eliminating the need for the user to frequently enter and exit the screen, simplifying the user's operation, and improving the efficiency of image processing.
[0016] FIG. 1 shows a schematic diagram of an image selection architecture according to an embodiment of the present disclosure. Referring to FIG. 1, the image processing architecture 100 may include a server 110, a terminal 120, and a network 130 that provides a communication link. The server 110 and the terminal 120 may be connected through a wired or wireless network 130. Note that the server 110 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, security services, and CDN.
[0017] The terminal 120 may be implemented in hardware or software. For example, when the terminal 120 is implemented in hardware, the terminal 120 may be various electronic devices having a display screen and supporting page display, such as smartphones, tablet computers, e-book readers, laptop computers, desktop computers, etc., but not limited thereto. When the terminal 120 is implemented in software, the terminal 120 may be installed on the electronic devices listed above, or may be implemented as a plurality of software or software modules (for example, software or software modules used to provide distributed services), or may also be implemented as a single software or software module, where there is no particular limitation.
[0018] It should be noted that the image processing method provided by the embodiments of the present application may be executed by the terminal 120 or may be executed by the server 110. It should be understood that the numbers of the terminal, network, and server in FIG. 1 are merely illustrative and are not intended to be limiting. Depending on the implementation needs, any number of terminals, networks, and servers can be included.
[0019] FIG. 2 shows a schematic hardware structure diagram of an exemplary electronic device 200 provided by the embodiments of the present disclosure. As shown in FIG. 2, the electronic device 200 may include a processor 202, a memory 204, a network module 206, a peripheral interface 208, and a bus 210. It should be noted that the processor 202, the memory 204, the network module 206, and the peripheral interface 208 communicate with each other within the electronic device 200 via the bus 210.
[0020] The processor 202 may be a Central Processing Unit (CPU), an image processor, a Neural Processing Unit (NPU), a microcontroller (MCU), a programmable logic device, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits. The processor 202 can be used to execute functions related to the technologies described in this disclosure. In some embodiments, the processor 202 can also include multiple processors integrated into a single logic component. For example, as shown in FIG. 2, the processor 202 can include multiple processors 202a, 202b, and 202c.
[0021] The memory 204 can be configured to store data (e.g., instructions, computer code, etc.). As shown in FIG. 2, the data stored in the memory 204 can include program instructions (e.g., program instructions for implementing the image selection method of the embodiments of this disclosure) and data to be processed (e.g., the memory can store profiles of other modules, etc.). The processor 202 can also access the program instructions and data stored in the memory 204, execute the program instructions, and manipulate the data to be processed. The memory 204 can include volatile memory or non-volatile memory. In some embodiments, the memory 204 can include Random Access Memory (RAM), Read Only Memory (ROM), optical disks, magnetic disks, hard drives, Solid State Drives (SSD), flash memory, memory sticks, etc.
[0022] The network module 206 can be configured to provide communication between the electronic device 200 and other external devices via a network. This network can be any wired or wireless network capable of transmitting and receiving data. For example, this network can be a wired network, a local wireless network (e.g., Bluetooth®, WiFi, Near Field Communication (NFC), etc.), a cellular network, the Internet, or a combination thereof. It is understood that the type of network is not limited to the specific examples above. In some embodiments, the network module 306 can include any combination of any number of network interface controllers (NICs), radio frequency modules, transceivers, modems, routers, gateways, adapters, cellular network chips, etc.
[0023] The peripheral interface 208 can be configured to connect the electronic device 200 to one or more peripheral devices to enable input and output of information. For example, peripheral devices may include input devices such as keyboards, mice, touchpads, touchscreens, microphones, various sensors, etc., and output devices such as displays, speakers, vibrators, indicator lights, etc.
[0024] The bus 210 is configured to transmit information between various components of the electronic device 200 (e.g., the processor 202, the memory 204, the network module 206, and the peripheral interface 208), and can be, for example, an internal bus (e.g., a processor-memory bus), an external bus (a USB port, a PCI-E bus), etc.
[0025] Note that the architecture of the above electronic device 200 only shows the processor 202, the memory 204, the network module 206, the peripheral interface 208, and the bus 210. However, in a specific implementation, the architecture of the electronic device 200 includes other components necessary for proper functioning. Furthermore, those skilled in the art can understand that the architecture of the electronic device 200 may include only the components necessary to implement the embodiments of the present disclosure and does not necessarily include all the components shown in the figures.
[0026] The user can enter an image processing application on the electronic device and perform corresponding image processing on the image to be processed. As shown in FIG. 3, in image processing, an image selection screen 100 may be displayed in the display area of the electronic device. FIG. 3 shows a schematic diagram of an image selection screen according to an embodiment of the present disclosure. In FIG. 3, image processing scenario selection controls 111 to 113 can be displayed on the image selection screen 100 to select different image processing scenarios. For example, the image processing scenario selection control 111 is used to select an image editing image processing scenario, the image processing scenario selection control 112 is used to select a collage image processing scenario, and the image processing scenario selection control 113 is used to select a batch color correction image processing scenario. The user can execute a first trigger operation O1 on the image processing scenario selection control 111 to generate a first control command D1. The image processing scenario selection control 111 selects the image processing scenario corresponding to the image processing scenario selection control 111 according to the first control command D1.
[0027] Image directory selection controls 121-124 for selecting different image directories may be displayed on the image selection screen 100. In some embodiments, this image directory can refer to different image sources. For example, the image directory may be different applications, indicating that the images are from different applications. In some embodiments, this image directory can refer to different image attributes. For example, the image directory may be the latest items, indicating that the images in the image directory are arranged in chronological order from the recent to the distant. The image directory may be a personal collection, indicating that the images in this image directory are the image collections specified by the user. The image directory may be portrait, indicating that all the images in this image directory include portraits. The image directory may be selfies, indicating that the images in the image directory are the user's selfie images. Specifically, in FIG. 3, the user can execute a second trigger operation O2 on the image directory selection control 122 to generate a second control instruction D2. In response to the second control instruction D2, the image directory selection control 122 selects the image directory corresponding to the image directory selection control 122.
[0028] The image processing scenario selection control or the image directory selection control can be fully displayed, such as the image processing scenario selection controls 111 to 113 and the image directory selection controls 121 to 123, or can be partially displayed, such as the image directory selection control 124. The partially displayed image processing scenario selection control or image directory selection control can be fully displayed through the corresponding first predetermined operation. For example, the user can perform a left slide operation on the image directory selection control, and in response to the left slide operation, the image directory selection control 124 in FIG. 3 changes from partial display to full display. At this time, the image directory selection control 121 that was originally fully displayed may be partially displayed or moved out of the screen. The image selection screen 100 can include a greater or fewer number of image processing scenario selection controls and image directory selection controls, but it should be understood that these are not limited here.
[0029] Based on the image processing scenario and the image directory, a display control for displaying a first image thumbnail in a first area of the display area may be displayed on the image selection screen 100. Among these, the user can select the corresponding image processing scenario based on the image processing scenario selection control and select the corresponding image directory based on the image directory selection control. The display control can display the corresponding first image thumbnail in the first display area based on the selected image processing scenario and image directory. For example, in FIG. 3, the image processing scenario selection control 111 corresponding to the image processing scenario A and the image directory selection control 122 corresponding to the image directory B are selected, and the display control displays the first image thumbnails 1301 to 1312 in the first area 130 based on the image processing scenario A and the image directory B.
[0030] In some embodiments, the first image thumbnail is stored in the cache.
[0031] In some embodiments, displaying a first image thumbnail in a first region of a display area based on an image processing scenario and an image directory may further include obtaining first index information of a first image to be processed based on the image processing scenario and the image directory, determining first target index information from the first index information, obtaining a first image thumbnail based on the first target index information, storing the first image thumbnail in a cache, and displaying the first image thumbnail in the cache in the first region.
[0032] Specifically, a first interface may be called to obtain first index information of all first images (which may be one or more) to be processed associated with an image processing scenario A and an image directory B. The first index information may include identification information for obtaining the first image to be processed, such as image ID information or image path information. Due to the size limitation of the display area, when the number of first images to be processed is large, not all of the first images to be processed can be displayed simultaneously. At this time, the number of first images to be processed that can be displayed may be determined based on the size parameter of the first region of the image selection screen 100. For example, based on the size of the first region 130 in FIG. 3, a first number n1 of first images to be processed that can be displayed is determined, and then index information of the first images to be processed to be displayed in the first region 130, that is, first target index information, is determined. For example, the first n1 pieces of first index information may be determined as the first target index information. Next, a second interface may be called to obtain first image thumbnails 1301 to 1312 corresponding to the first target index information, and the first image thumbnails 1301 to 1312 may be stored in the cache. Further, the first image thumbnails 1301 to 1312 in the cache may be displayed in the first region 130.
[0033] In some embodiments, obtaining the first index information of the first image to be processed based on the image processing scenario and the image directory further includes filtering all the images to be processed based on a predetermined rule corresponding to the image processing scenario and the image directory, determining the first image to be processed, and obtaining the first index information of the first image to be processed.
[0034] Here, when obtaining all of the relevant first images to be processed based on the determined image processing scenario and the image directory, filtering all the images to be processed based on the corresponding predetermined rule to determine the first image to be processed may be performed. In some embodiments, the predetermined rule is used to select images suitable for the selected image processing scenario and the image directory. For example, the predetermined rule may be a predetermined image size or a predetermined image ratio. Since different image processing scenarios may have different requirements for the attributes of the images to be processed, not all images to be processed are suitable for all image processing scenarios. For example, in the case of a collage image processing scenario, a panorama image may be too large to be suitable for a collage, so filtering without loading images that are not suitable for the selected image processing scenario can reduce memory usage and improve the efficiency and smoothness of image processing. It should be understood that the predetermined rule may be different for different combinations of image processing scenarios and image directories.
[0035] In some embodiments, the first image may have a visible flag. Further, in some embodiments, displaying the first image thumbnail in the first area of the display area based on the image processing scenario and the image directory further includes performing a first allocation operation on the visible flag of the first image thumbnail when storing the first image thumbnail in the cache. For example, the first allocation operation may be +1 to represent incrementing the number of image processing scenarios that currently call the first image.
[0036] In some embodiments, the display control is further used to display the selected first image thumbnail in a second area of the display area in response to a first selection command for the first image thumbnail, or to display the selected target image thumbnail in the second area of the display area in response to a second selection command for the target image thumbnail.
[0037] Specifically, as shown in FIG. 4, a schematic diagram of an image selection screen according to an embodiment of the present disclosure is shown. In FIG. 4, the user can select one or more images to be processed from the first image thumbnails 1301 to 1312 displayed in the first area 130. The user selects the first image thumbnails 1302, 1306, and 1307 to be the objects of image processing and generates a first selection command. In response to the first selection command, the first image thumbnails 1302, 1306, and 1307 selected by the user may be displayed in the second area 140. The user can also delete the selected images in the second area 140. For example, the image processing scenario selection control 111 can correspond to a collage image processing scenario. After the user selects the first image thumbnail to be collaged, by triggering the control 141, the collage process can be executed, and the corresponding images of the first image thumbnails 1302, 1306, and 1307 can be collaged into one image. As another example, the image processing scenario selection control 111 can correspond to a batch color correction image processing scenario. After the user selects the first image thumbnail to be batch color corrected, by triggering the control 141, the batch color correction process can be executed, and automatic color correction processing can be performed on the images corresponding to the first image thumbnails 1302, 1306, and 1307 respectively to obtain color-corrected images. Similar to FIG. 4, the user can select from the target image thumbnails to generate a second selection command and display the selected target image thumbnail in the second area.
[0038] In some embodiments, the target image thumbnail includes at least some of the first image thumbnails stored in the cache.
[0039] Note that the image selection component provided by the embodiments of the present invention provides multiple types of image processing scenarios that can be selected by the user on the same screen. Each type of image processing scenario corresponds to a set of images to be processed. Since the image itself is data that occupies a large amount of memory, loading the set of images to be processed will occupy a large amount of memory, causing the image processing process to freeze or crash, thus degrading the user experience. Based on the above considerations, the image selection component provided by the embodiments of the present disclosure can also achieve that the images to be processed in different image processing scenarios share a cache, thereby reducing the memory occupied by the images, avoiding freezes and crashes in the image processing process, making the image processing process smoother, and improving the user experience.
[0040] In some embodiments, the operation instructions for the first image thumbnail include a first operation instruction for scrolling and displaying the first image thumbnail, a second operation instruction for switching the image processing scenario, or a third operation instruction for switching the image directory.
[0041] Note that the user can perform different operations on the image selection screen 100 in FIG. 3 to generate operation instructions corresponding to the first image thumbnails 1301 to 1312, and achieve at least one of the functions of switching the image processing scenario, switching the image directory, or scrolling and displaying the thumbnail. Compared with the prior art, there is no need to frequently enter and exit different screens, so the user's operation is simplified, and the convenience of switching different image processing scenarios in image processing is improved.
[0042] In some embodiments, as shown in FIG. 5, the user can perform an up and down sliding operation (including an upward sliding operation or a downward sliding operation) to scroll and display the image thumbnails within the first region 130. FIG. 5 shows a schematic diagram of an image selection screen according to an embodiment of the present disclosure. The user can generate a first operation command by performing an upward sliding operation 510 in the first region 130. In response to the first operation command, the first image thumbnail scrolls downward and is displayed within the first region 130. Further, in order to be able to display more first image thumbnails, the image processing scenario selection controls 111-113 can be made invisible. At this time, the first image thumbnails 1301-1303 may be partially displayed. The user can continue the upward sliding operation 510 in the first region 130 of FIG. 5, and then the first image thumbnails 1316-1318 can be displayed in the first region 130. At this time, the first image thumbnails 1301-1303 are moved outside the first region 130. As shown in FIG. 6, a schematic diagram of an image selection screen according to an embodiment of the present disclosure is shown. Also, when the user performs a downward sliding operation 610 on the first region 130 of FIG. 6, as shown in FIG. 5, the first image thumbnails 1301-1303 sorted before the first image thumbnails 1304-1318 in the current screen are displayed in the first region 130. Also, when the first image thumbnails 1301-1303 at the beginning of the sorting position are being displayed, if the user continues the downward sliding operation 610, the image processing scenario selection controls 111-113 are displayed.
[0043] In some embodiments, when the scroll display of the first image thumbnail stops, the first image thumbnail whose visible flag in the cache is a predetermined flag value may be deleted from the cache. For example, the predetermined flag value may be 0. Specifically, when the user stops the up and down slide operation, the scroll of the first image thumbnail also stops. If no first operation command has been detected within a predetermined period or it has been detected that the first image thumbnail is to be scrolled, the first image thumbnail whose visible flag in the cache is 0 may be deleted from the cache. Thereby, the cache can be released, the occupation of the cache can be reduced, and the smoothness of image processing can be further ensured.
[0044] After the up and down slide operation stops (or when no first operation command has been detected), the thumbnail displayed in the first area 130 by the display control switches from the first image thumbnail to the target image thumbnail. The target image thumbnail displayed after the up and down slide operation may include overlapping image thumbnails, new image thumbnails, and deleted image thumbnails compared with the first image thumbnail displayed before the up and down slide operation.
[0045] In some embodiments, for the overlapping image thumbnails between the target image thumbnail and the first image thumbnail, the display control may directly display the overlapping image thumbnails in the cache in the first area 130.
[0046] In some embodiments, the newly added image thumbnail among the target image thumbnail and the first image thumbnail is the second image thumbnail. The second image thumbnail is an image thumbnail different from the first image thumbnail among the target image thumbnails. The second image thumbnail is obtained based on the corresponding image index information, the second image thumbnail is stored in the cache, and a first assignment operation is performed on the visible flag of the second image thumbnail. Specifically, the corresponding first interface is called to obtain the image index information, and based on the image index information, the corresponding second interface is called to obtain the second image thumbnail. The second image thumbnail is stored in the cache, and a first assignment operation (for example, +1) is performed on the visible flag of the second image thumbnail. Also, in the first area 130, the second image thumbnail in the cache is displayed.
[0047] In some embodiments, the image thumbnail deleted from the target image thumbnail and the first image thumbnail is the third image thumbnail. The third image thumbnail is an image thumbnail different from the first image thumbnail among the target image thumbnails. The display control can delete the third image thumbnail from the first area. It should be understood that deleting the third image thumbnail from the first area does not mean that the third image thumbnail is deleted from the cache.
[0048] In some embodiments, displaying the target image thumbnail in the first area includes deleting the first image thumbnail having a predetermined flag value in the cache and then performing a second assignment operation on the visible flag of the third image thumbnail.
[0049] In some embodiments, displaying the target image thumbnail in the first area further includes receiving at least one new operation command for the target image thumbnail, and in response to the end of each new operation command, deleting the image thumbnail having the predetermined flag value from the cache and performing a second assignment operation on the visible flag of the image thumbnail deleted from the first area.
[0050] In some embodiments, the new operation instruction may include a first operation instruction for scrolling and displaying the first image thumbnail, a second operation instruction for switching the image processing scenario, or a third operation instruction for switching the image directory.
[0051] The second assignment operation may include -1 and represents reducing the current image processing scenario for calling the second image by one. As a result, before the image thumbnail S is moved outside the first region, the image thumbnail whose visible flag in the cache is a predetermined flag value is cleared and the cache is released. After the image thumbnail S is moved outside the first region, since the second assignment operation is executed on the image thumbnail S moved outside the first region, even if the visible flag of the image thumbnail S becomes a predetermined flag value after the second assignment operation, the image thumbnail S remains in the cache. After the next scroll operation is completed, the image thumbnail S is cleared when the image thumbnail having the predetermined flag value in the cache is cleared. Therefore, the image thumbnail in the cache is not immediately deleted when the visible flag reaches the predetermined flag value, but is deleted after the next scroll. Since the user may scroll up and down many times, the image thumbnail that was moved outside the first region this time is cleared from the cache at the end of the next operation, thereby significantly reducing the number of times of calling the interface and loading the image, and making the previous and subsequent scrolls smoother.
[0052] For example, the user can scroll and display the first image thumbnail by performing an up and down slide operation. At this time, the visible flags of the first image thumbnails 1301 to 1312 in FIG. 3 may be +1. In some embodiments, when the up and down slide operation stops (when the first operation command is not detected), or when the scroll of the image thumbnails within the first region stops, the thumbnail images having a predetermined flag value 0 in the cache can be deleted to free up the cache. At this time, since the visible flags of the first image thumbnails 1301 to 1312 in the cache are all +1 and not the predetermined flag value 0, the first image thumbnails 1301 to 1312 are not deleted from the cache.
[0053] At this time, it is also possible to obtain the target index information of the target image thumbnails 1301 to 1315 displayed in the first region 130 of FIG. 5, search in the cache based on the target index information of the target image thumbnails to determine whether there is a corresponding image in the cache. If it is determined that the same first image thumbnails 1301 to 1312 exist in the cache, the first image thumbnails 1301 to 1312 in the cache may be directly displayed in the first region 130 of FIG. 5. At the same time, it can also be determined that the target image thumbnails 1313 to 1315 do not exist in the cache. Then, based on the target index information of the target image thumbnails 1313 to 1315, the target image thumbnails 1313 to 1315 can be obtained and stored in the cache. Furthermore, a first assignment operation (for example, +1) may be performed on the visible flags of the target image thumbnails 1313 to 1315. Additionally, the display control may display the target image thumbnails 1313 to 1315 in the cache in the first region 130 of FIG. 5. After the current up and down slide operation is completed, since the thumbnail images cannot be moved outside the first region 130, there is no need to perform a second assignment to the thumbnail images.
[0054] When the user performs the up and down slide operation again, when the up and down slide operation stops or the scroll of the image thumbnail in the first area 130 stops, the thumbnail image with the predetermined flag value 0 in the cache is deleted. At this time, the visible flags of the image thumbnails 1301 to 1315 in the cache are all +1 and not the predetermined flag value 0, so the image thumbnails 1301 to 1315 are not deleted from the cache.
[0055] At this time, it is also possible to obtain the index information of the image thumbnails 1304 to 1318 displayed in the first area 130 of FIG. 6, and by comparing the index information of the image thumbnails 1301 to 1315 in FIG. 5 with the index information of the image thumbnails 1304 to 1318 in FIG. 6, after the scroll of the thumbnail in the first area 130 stops, it is determined that the image thumbnails 1301 to 1303 have been moved outside the first area 130. The second assignment operation (for example, -1) can be performed on the visible flags of the deleted first image thumbnails 1301 to 1303. Since the visible flags of the image thumbnails 1301 to 1303 in FIG. 5 were +1, after performing -1 of the second assignment operation, the visible flags of the image thumbnails 1301 to 1303 in FIG. 6 become 0. At this time, the first image thumbnails 1301 to 1303 are not deleted from the image cache.
[0056] At the same time, since it can be determined that the image thumbnails 1304 to 1315 exist in the cache, the display control can display the image thumbnails 1304 to 1315 in the cache in the first area 130 of FIG. 6. Since it can be determined that the image thumbnails 1316 to 1318 do not exist in the cache, the newly added image thumbnails 1316 to 1318 can be obtained based on the corresponding index information, and the image thumbnails 1316 to 1318 are stored in the cache. Further, the first assignment operation (for example, +1) can be performed on the visible flags of the image thumbnails 1316 to 1318. Further, the display control can display the image thumbnails 1316 to 1318 in the cache in the first area 130 of FIG. 6.
[0057] When the user performs a vertical slide operation again, when the vertical slide operation stops or the scroll of the image thumbnails in the first region 130 stops, the thumbnail images with a predetermined flag value of 0 in the cache can be deleted. Since the visible flags of the image thumbnails 1301 to 1303 are 0, the image thumbnails 1301 to 1303 can be deleted from the cache. Timely elimination of temporarily unused image resources releases the memory storage and solves the problem of peak memory. At the same time, for the image thumbnails that have been moved outside the first region after this vertical slide operation, a second assignment (-1) may be made to their visible flags.
[0058] Thus, in the embodiments of the present disclosure, when the visible flags of the image thumbnails 1301 to 1303 become 0, instead of immediately deleting the image thumbnails 1301 to 1303 from the image cache, instead, when the next scroll operation is completed and the visible flags of the image thumbnails 1301 to 1303 are still 0, the image thumbnails 1301 to 1303 are deleted from the image cache. Thereby, an increase in the amount of image loading due to the user's continuous vertical scroll operation is avoided. The number of interface calls is significantly reduced, and the image processing process becomes smoother.
[0059] In some embodiments, the user can also switch the image processing scenario by triggering the image processing scenario selection control 112 to generate a second operation instruction. Referring to FIG. 7, FIG. 7 shows an embodiment of an image selection screen according to an embodiment of the present disclosure. In FIG. 7, the image processing scenario selection control 112 corresponding to the image processing scenario C and the image directory selection control 122 corresponding to the image directory D are selected. At this time, the first interface is called, and the second index information of the (one or more) second images to be processed related to the image processing scenario C and the image directory D can be obtained. Based on the size parameter of the first area 130, the second number n2 of the second images to be processed that can be displayed is determined, and the second target index information of the second number n2 in the second index information may be determined. For example, the first n2 information in the second index information is used as the second image index information, that is, the index information of the image thumbnails 1301 to 1307, 1708, 1309 to 1312. Based on the second target index information, it is searched whether there are corresponding image thumbnails in the cache. Since it can be determined that the image thumbnails 1301 to 1307, 1309 to 1312 exist in the cache, the image thumbnails 1301 to 1307, 1309 to 1312 in the cache can be directly displayed in the first area 130 of FIG. 7. When the content of the images to be processed displayed in different image processing scenarios is similar, it can be seen that the images in the image cache can be shared, reducing the repeated loading of images and reducing the memory usage.
[0060] Furthermore, in some embodiments, a first assignment operation (e.g., +1) may be performed on the visible flags of the image thumbnails 1301 to 1307, 1309 to 1312. Then, the visible flags of the image thumbnails 1301 to 1307, 1309 to 1312 in the cache become +2. At this time, since the value of the visible flag indicates that the corresponding image thumbnail is frequently called, even if it is moved outside the first area, it is not immediately changed to a predetermined flag value and is not easily cleared, and can remain in the cache.
[0061] In some embodiments, the fact that the image thumbnail 1708 does not exist in the cache indicates that the image thumbnail 1708 is a newly added thumbnail. At this time, the corresponding interface can be called to obtain the image thumbnail 1708, and the image thumbnail 1708 can be stored in the cache. Further, a first assignment operation (for example, +1) can be performed on the visible flag of the image thumbnail 1708. In this case, the visible flag of the image thumbnail 1708 becomes +1. Further, the display control can also display the image thumbnail 1708 in the image cache in the first region 130.
[0062] In some embodiments, similar to FIG. 6, the visible flags of the first image thumbnails 1301 to 1312 in FIG. 3 are +1. When the user switches the image processing scenario by triggering the image processing scenario selection control 112, as shown in FIG. 7, the thumbnail image having the predetermined flag value 0 in the cache can be deleted to release the cache. At this time, the visible flags of the first image thumbnails 1301 to 1312 in the cache are all +1 and not the predetermined flag value 0, so the first image thumbnails 1301 to 1312 are not deleted from the cache.
[0063] Furthermore, in some embodiments, after the thumbnail image with a predetermined flag value 0 in the cache is deleted, the image thumbnail 1308 that has been moved outside the first region 130 in this image processing scenario switching can perform a second assignment operation (e.g., -1) on the visible flag of the image thumbnail 1308. Then, the visible flag of the image thumbnail 1308 becomes 0. In some embodiments, alternatively, after the user switches the image processing scenario this time, a second assignment operation can be performed on all the visible flags of the image thumbnails in the cache. For example, an assignment operation of -1 can be performed on all the visible flags of the image thumbnails 1301 to 1312 in the cache. In some embodiments, alternatively, after the user switches the image processing scenario this time, a third assignment operation can be performed on the visible flags of the image thumbnails in the cache. For example, an assignment operation of a predetermined value (e.g., 0) can be performed on all the visible flags of the image thumbnails 1301 to 1312 in the cache. At this point, although there are thumbnail images with a predetermined flag value 0 in the cache, they are not immediately deleted from the cache.
[0064] Furthermore, when the user triggers the image processing scenario selection control 111 or 113 to switch the image processing scenario again, the thumbnail images with a predetermined flag value 0 in the cache can be deleted first to free up the cache. For example, at this time, since the visible flag of the image thumbnail 1308 that has been moved outside the first region in FIG. 7 is 0, the image thumbnail 1308 can be deleted from the cache. Then, a second assignment operation (e.g., -1) is performed on the visible flags of the image thumbnails that have been moved outside the first region in this image processing scenario switching. Thereby, it is possible to avoid an increase in the number of image loading times caused by the user repeatedly switching the image processing scenario, and further ensure the smoothness of the image processing process.
[0065] In some embodiments, the user can also generate a third operation instruction and switch the image directory by swiping left or right or by triggering an image directory selection control. By the right swipe operation 620 on the user's image selection screen of FIG. 6, the image directory control 123 is selected. As shown in FIG. 8, FIG. 8 shows an example of an image selection screen according to an embodiment of the present invention. Similarly, by the left swipe operation on the user's image selection screen 100, the image directory control 121 is selected. In FIG. 8, the display control can display image thumbnails 1301-1309, 1801, 1311-1315. Based on the index information of the image thumbnails 1301-1309, 1801, 1311-1315, it is searched whether the corresponding image thumbnails exist in the cache. When it is determined that the image thumbnails 1301-1309, 1311-1315 exist in the cache, the image thumbnails 1301-1309, 1311-1315 in the cache can be directly displayed in the first area 130 of FIG. 8. At the same time, it is also determined that the image thumbnail 1801 does not exist in the cache, which indicates that the image thumbnail 1801 is a newly added image thumbnail. Therefore, the image thumbnail 1801 is obtained based on the index information of the image thumbnail 1801 and stored in the cache. Further, a first assignment operation (for example, +1) may be performed on the visible flag of the image thumbnail 1801. Also, the image 1801 in the cache may be displayed in the first area 130.
[0066] Furthermore, in some embodiments, similar to FIG. 7, a first assignment operation (for example, +1) can be performed on the visible flags of the image thumbnails 1301-1309, 1311-1315. At this point, the visible flags of the image thumbnails 1301-1309, 1311-1315 in the cache become +2. At this time, since the value of the visible flag indicates that the corresponding image thumbnail is frequently called, even if it is moved outside the first area, it is not immediately changed to a predetermined flag value and is not easily cleared and can remain in the cache.
[0067] In some embodiments, similar to FIG. 6, when the user triggers the image directory selection control 121 (or 123) shown in FIG. 5, or executes a left - right slide operation on the image selection screen 100 in FIG. 5 to switch the image directory, as shown in FIG. 8, first, the thumbnail images with a predetermined flag value of 0 in the cache can be deleted to free up the cache. At this time, the visible flags of the first image thumbnails 1301 - 1315 in the cache are all +1 and not the predetermined flag value of 0, so the first image thumbnails 1301 - 1315 are not deleted from the cache.
[0068] Furthermore, in some embodiments, after the thumbnail images with a predetermined flag value of 0 in the cache are deleted, for the image thumbnail 1310 that has been moved outside the first area 130 in FIG. 8, a second assignment operation (for example, -1) is executed on the visible flag of the moved image thumbnail 1310. Then, the visible flag of the image thumbnail 1310 becomes 0. In some embodiments, alternatively, after the user switches the image directory this time, a second assignment operation is executed on all the visible flags of the image thumbnails in the cache. For example, an assignment operation of -1 is executed on all the visible flags of the image thumbnails 1301 - 1315 in the cache. In some embodiments, alternatively, after the user switches the image processing scenario this time, a third assignment operation is executed on all the visible flags of the image thumbnails in the cache. For example, an assignment operation with a predetermined value (for example, 0) is executed on all the visible flags of the image thumbnails 1301 - 1315 in the cache. Note that at this point, there are image thumbnails with a predetermined flag value of 0 in the cache, but they are not immediately deleted from the cache.
[0069] Furthermore, when the user triggers the image directory selection control or performs a left - right slide operation to switch the image processing scenario again, thumbnail images with a predetermined flag value of 0 in the cache can be deleted to free up the cache. For example, at this time, since the visible flag of the image thumbnail 1310 moved outside the first region in FIG. 8 is 0, the image thumbnail 1308 may be deleted from the cache. Then, for the visible flag of the image thumbnail moved from the first region in this image directory switch, a second assignment operation (for example, - 1) is executed. This can avoid an increase in the number of image loading times due to the user repeatedly switching the image directory, and further ensure the smoothness of image processing.
[0070] Refer to FIG. 9. FIG. 9 shows a schematic diagram of an image selection component according to an embodiment of the present disclosure. In FIG. 9, in an electronic device, after entering an image processing application, the image selection component can display at least the following controls in the display area.
[0071] The image processing scenario selection control (for example, the image processing scenario selection controls 111 - 113 in FIGS. 3 and 4) is used to select the corresponding image processing scenario according to the first control instruction.
[0072] The image directory selection control (for example, the image directory selection controls 121 - 124 in FIGS. 3 - 8) is used to select the corresponding image directory according to the second control instruction.
[0073] The display control is used to display the first image thumbnail (for example, the image thumbnails 1301 - 1312 in FIG. 3) in the first region (for example, the first region 130 in FIGS. 3 - 8) of the display area based on the image processing scenario and the image directory.
[0074] The display control is further used to display a target image thumbnail (e.g., the image thumbnails 1301-1315 in FIG. 4) in the first area according to operation instructions for the first image thumbnail (e.g., the first operation instruction, the second operation instruction, the third operation instruction).
[0075] In some embodiments, displaying the first image thumbnail in the first area of the display area based on the image processing scenario and the image directory further includes obtaining first index information of the first image to be processed based on the image processing scenario and the image directory, determining first target index information from the first index information, obtaining the first image thumbnail based on the first target index information, storing the first image thumbnail in the cache, and displaying the first image thumbnail in the cache in the first area.
[0076] In some embodiments, obtaining the first index information of the first image to be processed based on the image processing scenario and the image directory further includes filtering all images to be processed based on a predetermined rule corresponding to the image processing scenario and the image directory, determining the first image to be processed, and obtaining the first index information of the first image to be processed.
[0077] In some embodiments, the first image thumbnail has a visible flag, and displaying the first image thumbnail in the first area of the display area based on the image processing scenario and the image directory further includes performing a first assignment operation on the visible flag of the first image thumbnail when the first image thumbnail is stored in the cache.
[0078] In some embodiments, the operation instructions for the first image thumbnail include a first operation instruction for scrolling and displaying the first image thumbnail, a second operation instruction for switching the image processing scenario, or a third operation instruction for switching the image directory.
[0079] In some embodiments, the target image thumbnail includes a second image thumbnail different from the first image thumbnail. The second image thumbnail is obtained based on corresponding image index information, the second image thumbnail is stored in the cache, and the first allocation operation is performed on the visible flag of the second image thumbnail.
[0080] In some embodiments, the first image thumbnail includes a third image thumbnail different from the target image thumbnail. Further, displaying the target image thumbnail in the first area includes deleting the first image thumbnail having a predetermined flag value in the cache, and then performing a second allocation operation on the visible flag of the third image thumbnail, receiving at least one new operation command for the target image thumbnail, and deleting the image thumbnail having the predetermined flag value in the cache in response to the end of each new operation command, and performing a second allocation operation on the visible flag of the image thumbnail deleted from the first area.
[0081] In some embodiments, the display control is also used to display the selected first image thumbnail in a second area of the display area in response to a first selection command for the first image thumbnail.
[0082] In some embodiments, the display control is also used to display the selected target image thumbnail in a second area of the display area in response to a second selection command for the target image thumbnail.
[0083] Based on the same technical concept corresponding to any of the above embodiments, the present disclosure provides an image selection method. Referring to FIG. 10. In the image selection method 1000,
[0084] In step S1010, in response to a first control command for selecting a corresponding image processing scenario and selecting a corresponding image directory, a first image thumbnail is displayed in a first area of the display area based on the image processing scenario and the image directory.
[0085] In step S1020, a target image thumbnail is displayed in the first area according to an operation instruction for the first image thumbnail.
[0086] In some embodiments, the image selection method 1000 further includes displaying the selected first image thumbnail in a second area of the display area according to a first selection instruction for the first image thumbnail.
[0087] In some embodiments, the image selection method 1000 further includes displaying the selected target image thumbnail in a second area of the display area according to a second selection instruction for the target image thumbnail.
[0088] It should be noted that the method of the embodiments of the present disclosure may be executed by a single device such as a single computer or server. The method of this embodiment may also be applied to a distributed scenario and completed by a plurality of devices cooperating with each other. In such a distributed scenario, one of these plurality of devices may execute only any one or more steps of the method of the embodiments of the present disclosure, and these plurality of devices interact with each other to complete the method.
[0089] It should be noted that the above describes some embodiments of the present disclosure. Other embodiments are indicated by the scope of the claims. The operations or steps described in the scope of the claims may be executed in an order different from that of the above embodiments and still achieve the desired results. Also, the processes described in the drawings do not necessarily have to be performed in the specific order or in a sequential order shown. In some embodiments, multitasking and parallel processing are also possible and advantageous.
[0090] Based on the same technical concept, corresponding to the method of any of the above embodiments, the present disclosure further provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the image processing method described in any of the above embodiments.
[0091] The computer-readable media of this embodiment include persistent and non-persistent media, and removable or non-removable media can implement information storage by any method or technology. The information may be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory, or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD), or other optical memory, magnetic cassettes, magnetic disks, or other magnetic storage devices, or any other non-transmission media. These can be used to store information accessible by a computer.
[0092] The computer instructions stored in the storage media of the above embodiments are for causing the computer to execute the image selection method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which are omitted here for brevity.
[0093] Based on the same technical concept, corresponding to the methods of any of the above embodiments, the present disclosure further provides a computer program product including computer program instructions, and when the computer program instructions are executed on a computer, the computer is caused to execute the image selection method described in any of the above embodiments.
[0094] Before using the technical solutions disclosed in the embodiments of the present disclosure, it should be understood that the user should be notified in an appropriate manner based on relevant laws of the types, scope of use, usage scenarios, etc. of the personal information related to the present disclosure and obtain the user's approval.
[0095] For example, in response to receiving a spontaneous request from a user, by sending presentation information to the user, it is clearly presented to the user that the operation the user intends to perform needs to obtain and use the user's personal information. Thereby, based on the presentation information, the user can autonomously select whether to provide personal information to software or hardware such as an electronic device, an application, a server, or a storage medium that executes the operations of the technical solution of the present disclosure.
[0096] Although it is selectable, as a non-limiting implementation manner, the method of sending presentation information to the user in response to receiving a spontaneous request from the user may be, for example, in the form of a pop-up window. In the pop-up window, the presentation information may be presented in text. Further, the pop-up window may be further equipped with a selection control that allows the user to select "permit" or "not permit" to provide personal information to the electronic device.
[0097] The above notification and user permission acquisition process are merely exemplary and do not limit the implementation manner of the present disclosure. Other methods that comply with relevant laws may also be applied to the embodiments of the present disclosure.
[0098] A person skilled in the art should understand that the description of any of the above embodiments is merely exemplary and is not intended to limit the scope of the present disclosure (including the scope of the claims). In the concept of the present disclosure, the technical features in the above embodiments or different embodiments may be combined with each other, the steps may be realized in any order, and there are many other variations of different aspects of the embodiments of the present disclosure as described above. For the sake of brevity, they are not provided in detail.
[0099] Also, for the sake of simplicity of description and discussion, and to avoid obscuring the understanding of the embodiments of the present disclosure, in the provided drawings, well-known power / ground connections between the integrated circuit (IC) chip and other components may or may not be shown. Also, for the sake of avoiding obscuring the understanding of the embodiments of the present disclosure, the apparatus may be shown in the form of block diagrams, that is, the details of the embodiments of these block diagram apparatuses depend on the platform for implementing the embodiments of the present disclosure (i.e., these details should be fully within the understanding of those skilled in the art). When specific details (e.g., circuits) are described to illustrate exemplary embodiments of the present disclosure, as will be apparent to those skilled in the art, the embodiments of the present disclosure can be implemented in the absence of these specific details or with variations in these specific details. Therefore, these descriptions are illustrative and not restrictive.
[0100] As described above, the present disclosure has been described with reference to specific embodiments thereof, but many alternatives, modifications, and variations of these embodiments will be apparent from the foregoing description. For example, other memory architectures (e.g., dynamic random access memory (DRAM)) can use the embodiments described above.
[0101] The embodiments of the present disclosure are intended to cover all replacements, modifications, and changes shown by the claims. Therefore, any omissions, modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the embodiments of the present disclosure should all be included within the protection scope of the present disclosure.
Claims
1. An image selection component for displaying at least an image processing scenario selection control, an image directory selection control, and a display control in a display area, wherein the image processing scenario selection control is used to select a corresponding image processing scenario according to a first control instruction; the image directory selection control is used to select a corresponding image directory according to a second control instruction; the display control is used to display a first image thumbnail in a first area of the display area based on the image processing scenario and the image directory; the display control is further used to display a target image thumbnail in the first area according to an operation instruction for the first image thumbnail; An image selection component.
2. Displaying a first image thumbnail in a first area of the display area based on the image processing scenario and the image directory further includes obtaining first index information of a first image to be processed based on the image processing scenario and the image directory; determining first target index information from the first index information; obtaining a first image thumbnail based on the first target index information and storing the first image thumbnail in a cache; displaying the first image thumbnail in the cache in the first area; The image selection component according to Claim 1.
3. Obtaining first index information of a first image to be processed based on the image processing scenario and the image directory further includes determining the first image to be processed by filtering all images to be processed based on a predetermined rule corresponding to the image processing scenario and the image directory; obtaining the first index information of the first image to be processed; The image selection component according to Claim 2.
4. The first image thumbnail has a visible flag, and displaying a first image thumbnail in a first area of the display area based on the image processing scenario and the image directory further includes When storing the first image thumbnail in the cache, including performing a first allocation operation on the visible flag of the first image thumbnail The image selection component according to claim 2
5. The operation instruction for the first image thumbnail is A first operation instruction for scrolling and displaying the first image thumbnail Or a second operation instruction for switching the image processing scenario Or including a third operation instruction for switching the image directory The image selection component according to claim 1
6. The target image thumbnail includes a second image thumbnail different from the first image thumbnail The second image thumbnail is obtained based on the corresponding image index information The second image thumbnail is stored in the cache A first allocation operation is performed on the visible flag of the second image thumbnail The image selection component according to claim 2
7. The first image thumbnail includes a third image thumbnail different from the target image thumbnail Displaying the target image thumbnail in the first area further includes After deleting the first image thumbnail with a predetermined flag value in the cache, performing a second allocation operation on the visible flag of the third image thumbnail Receiving at least one new operation instruction for the target image thumbnail In response to the end of each new operation instruction, deleting the image thumbnail with a predetermined flag value in the cache, and then performing a second allocation operation on the visible flag of the image thumbnail deleted from the first area The image selection component according to claim 2
8. The display control further includes Displaying the selected first image thumbnail in a second area of the display area according to a first selection instruction for the first image thumbnail Or Used for displaying the selected target image thumbnail in a second area of the display area according to a second selection instruction for the target image thumbnail The image selection component according to claim 1
9. An image selection method, the image selection method includes A first control instruction for selecting a corresponding image processing scenario and, in response to selecting a corresponding image directory, based on the image processing scenario and the image directory, displaying a first image thumbnail in a first area of a display area; displaying a target image thumbnail in the first area in response to an operation instruction for the first image thumbnail. An image selection method.
10. The image selection method further includes: displaying the selected first image thumbnail in a second area of the display area in response to a first selection instruction for the first image thumbnail; or displaying the selected target image thumbnail in a second area of the display area in response to a second selection instruction for the target image thumbnail. The image selection method according to claim 9.
11. An electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable by the processor; wherein the processor, when executing the computer program, implements the image selection method according to claim 9 or 10. An electronic device.
12. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the image selection method according to claim 9 or 10.
13. A computer program product including computer program instructions that, when executed by a computer, cause the computer to execute the image selection method according to claim 9 or 10.
Citation Information
Patent Citations
Cross-folder file processing method and device, equipment and storage medium
CN110069181A
Information processor, information processing method, and program
JP2005301516A