Picture display method, electronic device and computer readable storage medium

By obtaining target information related to the application from the image selection interface of electronic devices, the number and position of images displayed on the first screen can be reasonably determined, high-priority images can be displayed first, and similar images can be clustered and sorted. This solves the problem of selecting images to upload from a large number of images and improves the convenience and efficiency of image selection for users.

CN119739882BActive Publication Date: 2026-02-24HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411632338.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2026-02-24
Estimated Expiration
2044-06-20

AI Technical Summary

Technical Problem

Selecting the images to upload from a large number of images on electronic devices is difficult, time-consuming, and results in a poor user experience.

Method used

By acquiring target information related to the application interface content, target candidate images for each target element are obtained from the image collection and displayed on the first screen. The number of target candidate images is reasonably determined based on the number of images that can be displayed on the first screen, so that it is less than or equal to the total number of images that can be displayed on the first screen. Images of target elements with higher priority are placed at the front. Similar images are clustered and sorted to reduce interference from duplicate images.

Benefits of technology

It improves the convenience and efficiency of image selection for users, reduces page-turning operations, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119739882B_ABST
    Figure CN119739882B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a picture display method, an electronic device and a computer readable storage medium. In the method, the electronic device acquires target information related to interface content of an application in response to a target operation for uploading a picture; acquires a target candidate picture set of each target element from a picture set according to a first picture quantity and the target information, the target element being determined according to the target information, the target candidate picture set including at least one target candidate picture, a total quantity of the target candidate pictures of each target element being less than or equal to the first picture quantity, the first picture quantity being a number of pictures that can be displayed on a first screen interface of a picture selection interface; and displaying the target candidate pictures of each target element on the first screen interface. In this way, the user can obtain pictures of multiple target elements on the first screen interface, without needing to obtain the pictures of the target elements by paging, thereby improving the convenience of the user in selecting pictures.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application. The original application has the application number 202410808248.4 and the original application date is June 20, 2024. The entire contents of the original application are incorporated herein by reference. Technical Field

[0002] This application relates to the field of terminal technology, and in particular to an image display method, an electronic device, and a computer-readable storage medium. Background Technology

[0003] As mobile phones and other electronic devices become increasingly powerful and feature-rich, there are more and more applications on these devices that require users to upload pictures.

[0004] When users need to upload images, they can select the images they want to upload from the image interface displayed on their electronic devices. For example, when a user posts a social media update using a social media application, if they need to insert an image into the update, they need to select the image from their phone's photo album to upload to the social media application.

[0005] However, electronic devices typically store a large number of images. Selecting the images to be uploaded from this large number is difficult, time-consuming, and results in a poor user experience. Summary of the Invention

[0006] This application provides an image display method, an electronic device, and a computer-readable storage medium, which allow users to easily and quickly select the images they need to upload.

[0007] In a first aspect, embodiments of this application provide an image display method, the method comprising: an electronic device displaying an application interface; responding to a target operation on the application interface, obtaining target information of the application, the target information being related to the interface content of the application, the target operation being used to upload an image; obtaining a target candidate image set for each target element from an image set based on a first image quantity and the target information, the target element being determined based on the target information, the target candidate image set including at least one target candidate image, the total number of target candidate images for each target element being less than or equal to the first image quantity, the first image quantity being the number of images that can be displayed on the first screen of the image selection interface; and displaying the target candidate images for each target element on the first screen.

[0008] As can be seen from the above, this embodiment of the application obtains target candidate images of each target element from an image set based on target information related to the application's interface content, thereby obtaining images related to the application's interface content. Furthermore, based on the number of images that can be displayed on the first screen, the number of target candidate images for each target element is reasonably determined, ensuring that the total number of target candidate images for all target elements is less than or equal to the first number of images, so that all target candidate images for all target elements can be displayed on the first screen. In this way, users can obtain images of multiple target elements on the first screen without needing to flip through pages, thus making it simpler and faster to select the images to be uploaded and improving the user experience.

[0009] In this application, the images that users need to upload are often related to the application's interface content. This embodiment obtains candidate images of various target elements and displays these candidate images on the first screen, ensuring that the images displayed on the first screen are highly likely to be the images the user needs to upload.

[0010] In some possible implementations of the first aspect, if at least two target elements are included, and these at least two target elements include a first target element and a second target element, during the process of displaying target candidate images of each target element on the first screen interface, the electronic device can display the target candidate images of the first target element and the second target element on the first screen interface according to the priority of the first target element and the second target element, with the first target element having a higher priority than the second target element, and the target candidate image of the first target element being displayed earlier than the target candidate image of the second target element.

[0011] This not only allows images related to high-priority target elements to be displayed first (i.e., displayed more prominently on the first screen), but also allows images related to various target elements to be displayed in clusters (i.e., displayed side by side), thereby further improving the convenience for users to select images.

[0012] In some possible implementations of the first aspect, the target elements include a first target element, a first sub-element, and a second sub-element. During the process of displaying candidate images of each target element on the first screen, the electronic device can display the images of the first and second sub-elements on the first screen according to their priorities. The first sub-element has a higher priority than the second sub-element, and the image of the first sub-element is displayed earlier than the image of the second sub-element. The candidate images of the first target element include both the images of the first and second sub-elements.

[0013] This not only allows images related to high-priority sub-elements to be displayed first, but also allows images related to various sub-elements to be displayed in aggregate, further improving the convenience for users to select images.

[0014] In some possible implementations of the first aspect, the electronic device can also display tabs for target elements or sub-elements on the image selection interface. The target element tabs include candidate images of the target element, and the sub-element tabs include images of the sub-elements. This allows users to access images related to the target element or sub-element through the tabs, further improving the convenience of image selection.

[0015] In some possible implementations of the first aspect, during the process of obtaining a set of target candidate images for each target element from the image set based on the first number of images and target information, the electronic device can obtain a set of candidate images for each target element from the image set based on the target information; for each target element, a target candidate image is selected from the candidate image set; wherein, the number of selected target candidate images is determined based on the first number of images, and the number of selected target candidate images is the number of images of the target element displayed on the first screen interface.

[0016] In this implementation, the number of images that can be displayed on the first screen is allocated to each target element, and a corresponding number of images are selected for each target element, so that images of multiple target elements can be displayed on the first screen.

[0017] In some possible implementations of the first aspect, during the process of selecting a target candidate image from a set of candidate images, the electronic device can perform similar image clustering on the set of candidate images to obtain a set of similar images; for each set of similar images, after sorting each similar image in the set of similar images, select a first preset number of similar images, which are the target similar images of the set of similar images; and select the target candidate image from the target similar images of each set of similar images, as well as the candidate images that have not been clustered into the set of similar images.

[0018] In this implementation, similar images are clustered, and target similar images are selected from the similar images according to the ranking of similar images. Then, target candidate images are selected based on the target similar images and the images that have not been clustered. This reduces the number of duplicate similar images in the selected target candidate images, thereby reducing the interference caused by duplicate similar images to the user's image selection and further improving the convenience of the user's image selection.

[0019] In some possible implementations of the first aspect, during the process of sorting similar images in a set of similar images, the electronic device can score each similar image based on at least one of its composition, color, and sharpness, thus obtaining a score for each similar image; and then sort the similar images based on their scores. In this way, by calculating scores for similar images within the same cluster based on information such as composition, color, and sharpness, and then sorting them according to the scores, it is possible to better select higher-quality images from multiple similar images, prioritizing the presentation of higher-quality images and reducing interference from duplicate similar images in the user's image selection process.

[0020] In some possible implementations of the first aspect, in the image selection interface, the target similar image in the similar image set is displayed earlier than the non-target similar images in the similar image set. This prioritizes the display of the preferred image (i.e., the target similar image) among multiple repeated similar images (i.e., the preferred image is displayed first), reducing the interference caused by repeated similar images to the user's image selection and further improving the convenience of image selection.

[0021] In some possible implementations of the first aspect, if the target element includes at least two sub-elements, the electronic device can perform similar image clustering on the images of each sub-element to obtain a set of similar images for each sub-element, and the candidate image set includes the images of each sub-element.

[0022] In some possible implementations of the first aspect, the target information is textual information obtained from the application's interface content.

[0023] In some possible implementations of the first aspect, the target element is the event described in the target information, the object in the event described in the target information, the keyword in the target information, or the classification of the object described by the keyword in the target information.

[0024] In some possible implementations of the first aspect, the target element is an event or an object within an event. During the process of obtaining a candidate image set for each target element from an image set based on target information, the electronic device can extract event information from the target information; and use the event information to perform image retrieval in the image set to obtain a candidate image set for each event or object within an event.

[0025] In some possible implementations of the first aspect, when at least two events are included, the electronic device can also determine the importance of each event; and prioritize the at least two events according to their importance. This allows images of more important events to be displayed first, improving the ease of image selection for the user.

[0026] In some possible implementations of the first aspect, if the target element is an event, the electronic device can also perform a new image retrieval in the image set based on the target event information if no image matching the event information is found when performing an image retrieval based on the event information. The target event information is the event information obtained after removing one or more dimensions of the event information.

[0027] In this implementation, when no matching image can be found based on the event information, intelligent rollback can be performed, that is, removing one or more dimension information and then re-matching and searching to obtain image results, thus avoiding a bad user experience due to no search results.

[0028] In some possible implementations of the first aspect, the target element is a category of objects described by keywords; in the process of obtaining candidate image sets for each target element from the image set based on the target information, the electronic device can perform image retrieval based on the keywords in the target information to obtain the keyword retrieval results; the keyword retrieval results are classified to obtain target candidate image sets for each category.

[0029] Secondly, embodiments of this application provide an image display method, in which an electronic device displays the interface of an application; in response to a target operation on the application's interface, target information of the application is obtained, the target information being related to the content of the application's interface, and the target operation being used to upload an image; based on the target information, images of various target elements are obtained from an image collection, the target elements being determined based on the target information; the priority of each target element among at least two target elements is determined; based on the priority of the target elements, images of each target element are displayed on an image selection interface; wherein, the at least two target elements include a first target element and a second target element, the priority of the first target element being higher than the priority of the second target element, and the display position of the image of the first target element in the image selection interface being earlier than the display position of the image of the second target element in the image selection interface.

[0030] As can be seen from the above, this application embodiment prioritizes each target element and displays the related images of high-priority target elements earlier than the related images of low-priority target elements, thereby improving the convenience of users in selecting images.

[0031] In some possible implementations of the second aspect, the first target element includes a first sub-element and a second sub-element; the first sub-element has a higher priority than the second sub-element, and the image of the first sub-element is displayed earlier in the image selection interface than the image of the second sub-element. The images of the target element include the images of the first and second sub-elements. This allows images related to higher-priority sub-elements to be displayed first, further improving the convenience for users to select images.

[0032] In some possible implementations of the second aspect, during the process of obtaining images of various target elements from the image set based on target information, the electronic device can obtain candidate image sets for each target element from the image set based on the target information; for each target element, the candidate images in the candidate image set of the target element are clustered to obtain at least one similar image set; for each similar image set, after sorting each similar image in the similar image set, a first preset number of similar images are selected, and the first preset number of similar images are the target similar images of the similar image set; for each target element, the image of the target element is selected from the target similar images of each similar image set and the candidate images that have not been clustered into the similar image set.

[0033] In this implementation, similar images are clustered and target similar images are selected from the similar images according to the sorting of similar images. This reduces the interference caused by repeated similar images to the user's image selection and further improves the convenience of the user's image selection.

[0034] In some possible implementations of the second aspect, the target information is textual information obtained from the application's interface content.

[0035] In some possible implementations of the second aspect, the target element is the event described in the target information, the object in the event described in the target information, the keyword in the target information, or the classification of the object described by the keyword in the target information.

[0036] In some possible implementations of the second aspect, when the target element is an event or an object in an event, the electronic device can extract event information from the target information and use the event information to filter out images of each event or each object in the event from the image collection.

[0037] In some possible implementations of the second aspect, when the target element is a category of the object described by the keyword, the electronic device can use the keyword to filter out images of the keyword from the image collection, and then classify the search results of the images of the keyword to obtain images of each category.

[0038] In some possible implementations of the second aspect, when the target element is a keyword, the priority of each keyword is determined according to the order in which the keywords are passed in. Specifically, the keyword passed in earlier has a higher priority than the keyword passed in later.

[0039] In some possible implementations of the second aspect, when the target element is an event, the importance of each event is determined based on at least one of the following: the completeness of the event content, the complexity of the description, the precision of the time and location, and the distance between the location of the event and the location of the insertion cursor. Events with higher importance have higher priority.

[0040] Thirdly, embodiments of this application provide an image display method, which includes: an electronic device displaying an application interface; obtaining target information from the application, the target information being information sent by the application in response to a target operation on the application interface, the target information being related to the application interface content, and the target operation being used to upload an image; obtaining a target candidate image set for each target element from an image set based on a first image quantity and the target information, the target element being determined based on the target information, the target candidate image set including at least one target candidate image, the total number of target candidate images for each target element being less than or equal to the first image quantity, the first image quantity being the number of images that can be displayed on the first screen of the image selection interface; and displaying the target candidate images for each target element on the first screen.

[0041] Fourthly, embodiments of this application provide an image display method in which an electronic device displays an application interface; obtains target information from the application, the target information being information sent by the application in response to a target operation on the application interface, the target information being related to the application interface content, and the target operation being used to upload an image; obtains images of various target elements from an image set based on the target information, the target elements being determined based on the target information; determines the priority of each target element among at least two target elements; and displays images of each target element on an image selection interface based on the priority of the target elements; wherein the at least two target elements include a first target element and a second target element, the priority of the first target element being higher than the priority of the second target element, and the display position of the image of the first target element in the image selection interface being earlier than the display position of the image of the second target element in the image selection interface.

[0042] Fifthly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the method described in any one of the first, second, third, or fourth aspects described above.

[0043] Sixthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method as described in any one of the first, second, third, or fourth aspects above.

[0044] In a seventh aspect, embodiments of this application provide a chip system including a processor coupled to a memory. The processor executes a computer program stored in the memory to implement the methods described in any one of the first, second, third, or fourth aspects above. The chip system may be a single chip or a chip module composed of multiple chips.

[0045] Eighthly, embodiments of this application provide a computer program product that, when run on an electronic device, causes the electronic device to perform the method described in any one of the first, second, third, or fourth aspects described above.

[0046] It is understood that the beneficial effects of aspects two through eight above can be found in the relevant descriptions in aspect one above, and will not be repeated here. Attached Figure Description

[0047] Figure 1A A schematic diagram of an image upload scenario provided in an embodiment of this application;

[0048] Figure 1B Another schematic diagram of the image upload scenario provided in the embodiments of this application;

[0049] Figure 2 This is a schematic diagram of the structure of the electronic device 200 provided in the embodiments of this application;

[0050] Figure 3A A schematic diagram illustrating the display of images based on a single keyword and multiple subcategories, provided as an embodiment of this application;

[0051] Figure 3B A schematic diagram of a subcategory label page provided in an embodiment of this application;

[0052] Figure 3C This is a schematic diagram illustrating the order of the first screen display positions provided in the embodiments of this application;

[0053] Figure 3D This is a schematic diagram of a non-aggregated display provided in an embodiment of this application;

[0054] Figure 4 A schematic diagram illustrating the display of images based on a single keyword and multiple subcategories, provided as an embodiment of this application;

[0055] Figure 5AA schematic diagram of image display based on multiple keywords provided for embodiments of this application;

[0056] Figure 5B A schematic diagram of the subcategory tab page for keywords provided in the embodiments of this application;

[0057] Figure 6A A schematic diagram illustrating the display of multiple categories of a single event in an embodiment of this application;

[0058] Figure 6B A schematic diagram of a cat's tag page provided in an embodiment of this application;

[0059] Figure 7 A schematic diagram showing multiple events provided in an embodiment of this application;

[0060] Figure 8 A schematic diagram illustrating the optimization of similar image sorting provided in an embodiment of this application;

[0061] Figure 9 A flowchart illustrating the process of recommending and displaying images based on keywords and text content, provided for embodiments of this application;

[0062] Figure 10A A schematic flowchart illustrating an image display method provided in an embodiment of this application;

[0063] Figure 10B A schematic diagram of the first screen interface provided in the embodiments of this application;

[0064] Figure 11 This is a flowchart illustrating an image display method provided in an embodiment of this application. Detailed Implementation

[0065] In the following description, specific details such as particular system architectures and technologies are set forth for illustrative purposes and not for limiting purposes, in order to provide a thorough understanding of the embodiments of this application.

[0066] The following is combined Figure 1A and Figure 1B An example of an image upload scenario is provided. Figure 1A This is a schematic diagram of an image upload scenario provided in an embodiment of this application. Figure 1B This is another schematic diagram of the image upload scenario provided in the embodiments of this application.

[0067] like Figure 1A As shown, the main interface 101 of mobile phone 100 displays applications 1 to 9, gallery 102, Weibo 103, and... The icon for applications such as 104. In other embodiments, gallery 102 may also be referred to as photo album. 103 and 104 is a third-party social application.

[0068] After a user clicks the Xiaohongshu 104 icon, the mobile phone 100 responds to the click operation on the gallery 102, launches Xiaohongshu 104, and displays the Xiaohongshu 104 interface. The personal information interface 105 of Xiaohongshu 104 includes a note creation button 106. After the user clicks the note creation button 106, the mobile phone 100 responds to the click operation and displays the image and text template interface 107.

[0069] The image and text template interface 107 includes multiple templates such as image and text template 108, image and text template 109, and image and text template 110. If a user wants to create a note using image and text template 110, they click on image and text template 110. The mobile phone 100 responds to the click operation on image and text template 110 by displaying the details interface 111 of image and text template 110.

[0070] The details screen 111 includes a "Use Now" button 112. After the user clicks the "Use Now" button 112, the phone responds to the click operation and displays the image selection screen 113. The first screen of the image selection screen 113 displays multiple images. The user can select the image to upload from the first screen of the image selection screen 113 and other pages (non-first screens), and insert the selected image into the created note by clicking the "Done" button in the image selection screen 113, that is, upload the selected image to Xiaohongshu 104.

[0071] In practical applications, Xiaohongshu 104 can retrieve images from the image library 102 by calling the image selector and display the retrieved images on the image selection interface 113. The images in the image selection interface 113 are typically displayed in chronological order. The closer an image's time is to the current time, the earlier it appears on the image selection interface 113. For example, the first image on the first screen (i.e., image 114) has the most recent image time and is displayed first.

[0072] When a user selects an image to upload on the image selection interface 113, if the image to be uploaded is not displayed on the main screen, the user needs to perform a page-turning operation on the screen of the phone 100 to turn to other interfaces of the image selection interface 113 and select an image from the images displayed on those other interfaces.

[0073] like Figure 1BAs shown, mobile phone 100 displays the Weibo creation interface 115. The Weibo creation interface 115 includes an image insertion button 116. Users can insert images into their created Weibo posts by clicking the image insertion button 116. Users can also click the Weibo 103 icon to launch Weibo 103 on mobile phone 100 and display its interface.

[0074] After the user clicks the image insertion button 116, the mobile phone 100 responds to the click operation and displays the image selection interface 117. The first screen of the image selection interface 117 displays multiple images. The user can select the image to be uploaded from the first screen and other pages of the image selection interface 117, and then insert the selected image into the created Weibo post by clicking the "Done" button in the image selection interface 117; that is, upload the selected image to Weibo 103.

[0075] In practical applications, Weibo 103 can retrieve images from the image library 102 by calling the image selector and display the retrieved images on the image selection interface 117. The images in the image selection interface 117 are usually displayed in chronological order.

[0076] It should be understood that the image selection interfaces of different applications are usually not exactly the same. For example, the image selection interface 117 of Weibo 103 and the image selection interface 113 of Xiaohongshu 104 are not exactly the same.

[0077] Figure 1A The image shown is inserted into a note created by 104 users on Xiaohongshu. Figure 1B This demonstrates a scenario where an image is inserted into a Weibo post created by Weibo103. Both creating a creative note and creating a Weibo post can be considered copywriting, therefore... Figure 1A and Figure 1B This can be seen as a scenario where images are inserted into the text being written during copywriting.

[0078] It should be understood that Figure 1A and Figure 1B The image upload scenario mentioned is merely an example and does not limit the scope of image uploads. For instance, in certain file management or image editing scenarios, it is also necessary to upload images to the application.

[0079] For example, applications requiring users to upload images in this application embodiment may include, but are not limited to, social applications, e-commerce applications, file management applications, and image editing applications. Social applications may include, for example, Xiaohongshu (Little Red Book) and Weibo (Weibo).

[0080] During their research, the inventors discovered that in image upload scenarios, displaying images in chronological order on the image selection interface requires users to spend a significant amount of time searching through a vast number of images to find the ones they need to upload, resulting in low efficiency and a poor user experience.

[0081] For example, in Figure 1A and Figure 1B In this context, when inserting images into the text, the image selection interface displays images in chronological order. However, if a user needs to upload an image saved a month or even a year ago, it won't appear on the first screen but rather on a later page. In this situation, after triggering the image selection interface, the user cannot choose the image from the first screen but must slowly scroll through the selection screen to find it, which is time-consuming and difficult. Furthermore, the chronological order of the images in the selection interface can be somewhat disorganized, further increasing the difficulty and time required for the user to find the desired image.

[0082] To address the aforementioned issues, this application provides an image display solution. When a user uploads an image through an application, relevant target information is obtained from the application's interface. Based on the number of images that can be displayed on the first screen of the image selection interface and the target information, multiple candidate images for target elements are retrieved from the image set, ensuring that the total number of candidate images for multiple target elements is less than or equal to the number of images that can be displayed on the first screen. The target elements are determined based on the target information. These candidate images are then displayed on the first screen. This allows users to access images for multiple target elements directly on the first screen, eliminating the need to flip through pages and improving the convenience of image selection.

[0083] The image display solution provided in this application can be applied to electronic devices such as mobile phones, tablets, in-vehicle systems, and laptops. No specific type or structure of the electronic device is limited herein.

[0084] For example, Figure 2 A schematic diagram of the structure of an electronic device 200 provided in an embodiment of this application is shown. The electronic device 200 may include, but is not limited to, a processor 210, a memory 220, and a display screen 230. Optionally, the electronic device 200 may also include a touch sensor 240. The touch sensor 240 may be disposed on the display screen 230, and the touch sensor 240 and the display screen 230 together form a touch screen, also known as a "touchscreen".

[0085] The structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 200. In other embodiments of this application, the electronic device 200 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware. For example, when the electronic device 200 is specifically a mobile phone, it may also include a universal serial bus (USB) interface, a charging management module, a power management module, a camera, a battery, an antenna, a mobile communication module, a wireless communication module, a speaker, a receiver, a headphone jack, sensors, buttons, a motor, an indicator, and a subscriber identification module (SIM card) interface, etc.

[0086] Processor 210 may include one or more processing units, such as an application processor (AP), a graphics processing unit (GPU), an image signal processor (ISP), and a controller. These different processing units may be independent devices or integrated into one or more processors. The controller can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution.

[0087] The processor 210 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, a mobile industry processor interface (MIPI), and a general-purpose input / output (GPIO) interface, etc.

[0088] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 210 may include multiple I2C buses. The processor 210 can couple to the touch sensor 240, etc., through different I2C bus interfaces. For example, the processor 210 can couple to the touch sensor 240 through the I2C interface, enabling the processor 210 and the touch sensor 240 to communicate through the I2C bus interface, thereby realizing the touch function of the electronic device 200.

[0089] The MIPI interface can be used to connect the processor 210 to peripheral devices such as the display screen 230. The MIPI interface includes a display serial interface (DSI). In some embodiments, the processor 210 and the display screen 230 communicate via the DSI interface to realize the display function of the electronic device 200.

[0090] The GPIO interface can be configured via software. The GPIO interface can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 210 to the display screen 230, etc.

[0091] The interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the electronic device 200. In other embodiments of this application, the electronic device 200 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.

[0092] Electronic device 200 implements display functions through a GPU, display screen 230, and application processor. The GPU is a microprocessor for image processing, connected to the display screen 230 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 210 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0093] The display screen 230 is used to display images, videos, etc. The display screen 230 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 200 may include one or N display screens 230, where N is a positive integer greater than 1.

[0094] Memory 220 can be used to store computer executable program code, including instructions. Memory 220 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as image playback function), etc. The data storage area may store data created during the use of electronic device 200. In addition, memory 220 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 210 executes various functional applications and data processing of electronic device 200 by running instructions stored in memory 220 and / or instructions stored in memory disposed in the processor.

[0095] Touch sensor 240, also known as a "touch device," is used to detect touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 230. For example, when uploading images, a user can tap on the phone's touchscreen to select an image and swipe to flip through pages.

[0096] The following uses electronic device 200 as an example to illustrate the image display scheme provided in the embodiments of this application.

[0097] The following sections will describe the processes of image recommendation and display based on keywords, and image recommendation and display based on events.

[0098] Image recommendation and display based on keywords:

[0099] After the electronic device 200 displays the application interface on the display screen 230, if it receives a target operation input by the user on the application interface, it retrieves target information related to the application interface content in response to the target operation. The target information may include one or more keywords. The target operation is an operation for uploading an image.

[0100] In some embodiments, the target information may include a single keyword, and the keyword may include multiple subcategories.

[0101] At this point, after obtaining the keywords, the electronic device 200 first filters out the image set containing the keywords from the image set; then it categorizes the search results of the image set containing the keywords to obtain the classification results, that is, it classifies each image in the image set to determine the category to which each image belongs.

[0102] If the image set representing the keyword in the classification result includes images from multiple categories, then the keyword includes multiple subcategories; if the image set representing the keyword in the classification result includes images from only one category, then the keyword does not include multiple subcategories.

[0103] For example, if the keyword is "pet," mobile phone 100 searches for images in image library 102 to obtain a set of images for "pet." The search results for the "pet" image set are then categorized to obtain classification results. If the classification results indicate that the candidate image set for "pet" includes images of both "dog" and "cat," then "pet" includes two subcategories: "cat" and "dog." If the classification results indicate that the candidate image set for "pet" only contains images of "dog," then "pet" only has one category: "dog."

[0104] In the process of selecting the keyword image set from the image set, the electronic device 200 can calculate the matching degree between each image in the image set and the keyword; determine whether the matching degree of each image is greater than or equal to a preset matching degree threshold; if the image is greater than or equal to the matching degree threshold, then the image is selected as the keyword image; if the image is less than the matching degree threshold, then the image is not selected as the keyword image. Multiple images of the keyword can form a keyword image set.

[0105] After obtaining the classification results of the image set of the keyword, if the image set of the keyword includes images of multiple subcategories, the electronic device 200 selects the images of each subcategory to be displayed on the first screen.

[0106] To display images from multiple subcategories on the first screen, the total number of images from all subcategories displayed on the first screen can be less than or equal to the number of images in the first category. The number of images in the first category is the total number of images that can be displayed on the first screen of the image selection interface.

[0107] The number of images can be preset. For example, the home screen of phone 100 can be set to display 16 images, meaning that phone 100's home screen can display a maximum of 16 images.

[0108] The number of images displayed on the first screen for each subcategory can be the same or different. Furthermore, the number of images displayed on the first screen for all subcategories can be less than or equal to the number of images in the first screen. For example, the keyword "pets" includes two subcategories: "cats" and "dogs," meaning there are 2 subcategories and 16 images in the first screen. In this case, both "cats" and "dogs" will display 8 images on the first screen; alternatively, "cats" will display 6 images, and "dogs" will display either 6 or 10 images.

[0109] When determining the number of images to be displayed on the first screen for each subcategory based on the number of initial images and the number of subcategories, the electronic device 200 can determine the number of images to be displayed on the first screen for each subcategory according to the principle of average distribution. For example, if the number of initial images is 16 and the number of subcategories is 2, then according to the principle of average distribution, 8 images are allocated equally to each subcategory, meaning that each subcategory can display 8 images on the first screen.

[0110] Of course, the electronic device 200 can also determine the number of images displayed on the first screen for each subcategory through other means, which are not limited here.

[0111] For example, the electronic device 200 can also determine the number of images displayed on the first screen for each subcategory based on the number of images in each subcategory. The number of images in a subcategory is positively correlated with the number of images displayed on the first screen for that subcategory. For instance, if the first set of images is 16, and the keyword "pet" includes two subcategories: "cat" and "dog," there are a total of 100 images for "pet," 60 for "cat," and 40 for "dog." In this case, the proportion of "cat" images is 0.6, and the proportion of "dog" images is 0.4. Based on these proportions, the number of "cat" images displayed on the first screen is determined to be 16 x 0.6 = 9.6, and the number of "dog" images displayed is 16 x 0.4 = 6.4. Finally, after rounding the image counts, it can be determined that the number of "cat" images displayed on the first screen is 10, and the number of "dog" images displayed is 6.

[0112] For each subcategory, the electronic device 200 can select a corresponding number of images from the images of that subcategory based on the number of images displayed on the home screen. For example, if there are 20 images for "cats," and 6 images for "cats" are displayed on the home screen, then after sorting these 20 images by their matching degree, the top six matching images are selected as the images for the "cats" subcategory displayed on the home screen.

[0113] Of course, besides selecting images for each subcategory on the home screen based on their matching degree, the electronic device 200 can also select a corresponding number of images from the images of each subcategory on the home screen in other ways, based on the number of images displayed for each subcategory on the home screen. For example, the electronic device 200 can randomly select a corresponding number of images from the images of each subcategory based on the number of images displayed for each subcategory on the home screen; or it can score the images of the same subcategory (e.g., based on clarity and composition), and select a corresponding number of images from the images of the subcategory based on their scores.

[0114] In comparison, selecting images from subcategories based on their matching degree or score for the first screen can result in higher quality images displayed on the first screen, or at a greater likelihood that the images are the ones the user needs to upload, thus further improving the user's image selection experience.

[0115] The electronic device 200 can also select a corresponding number of images from each subcategory of images based on the number of images displayed on the home screen for each subcategory and according to the time of each image.

[0116] In one alternative approach, for each subcategory, the electronic device 200 selects a corresponding number of images according to their image timestamps, in either order from newest to oldest or from oldest to newest, and displays these images on the first screen of the subcategory. Here, "newest" or "oldest" can refer to how close the image's time is to the current time; the newest image is the one whose time is closest to the current time, and the oldest image is the one whose time is furthest from the current time.

[0117] It should be noted that image time can be the time the image was taken, the time it was created (or saved), or the time it was modified. Generally, if an image has a capture time, that time is used first. If an image does not have a capture time, its save or modification time can be used.

[0118] In another alternative approach, for each subcategory, the electronic device 200 first divides the image into multiple time periods based on the image time of each image in that subcategory. Each time period includes one or more images; then, a corresponding number of images are selected from the images in each time period to be displayed as the images for that subcategory on the home screen.

[0119] In practical applications, the images selected for each time period can be the same or different. For example, there are 30 images in the "dog" subcategory. These 30 images are divided into two time periods: the first time period and the second time period. The first time period is closest to the current time, and the second time period is furthest from the current time. 20 images fall within the first time period, and 10 images fall within the second time period. The "dog" subcategory displays 8 images on the first screen. Therefore, 4 images can be selected from the 20 images in the first time period, and 4 images can be selected from the 10 images in the second time period to be displayed as the "dog" images on the first screen.

[0120] Of course, besides selecting images evenly from different time periods (i.e., selecting the same number of images in each time period), images can also be selected from different time periods based on the principle that the closer the time period is to the current time, the more images should be selected. For example, if there are 20 images in the first time period and 10 images in the second time period, the first time period is closer to the current time, so more images should be selected from the first time period than from the second time period. For instance, 6 images could be selected from the 20 images in the first time period and 2 images from the 10 images in the second time period to be displayed as the "dog" image on the first screen.

[0121] When selecting images for a subcategory to display on the homepage, if the number of images for a subcategory is less than the total number of images for that subcategory, all images from that subcategory will be displayed on the homepage. If the number of images for a subcategory is greater than the total number of images for that subcategory, a certain number of images will be selected based on image matching or other methods to display that subcategory on the homepage. For example, the keyword "pet" includes two subcategories: "cat" and "dog." If there are 8 images for "cat" on the homepage, but only 6 images for "cat," then all "cat" images will be displayed on the homepage. Similarly, if there are 8 images for "dog" on the homepage, but only 15 images for "dog," then 8 images will be selected from the 15 dog images to display as the "dog" subcategory on the homepage.

[0122] After obtaining the images of each subcategory displayed on the main screen, the electronic device 200 can display the images of the selected subcategories on the main screen.

[0123] Optionally, the electronic device 200 can also display tabs for each subcategory on the image selection interface. Each subcategory tab includes an image for that subcategory.

[0124] For example, see Figure 3A The illustrated diagram shows an image display based on a single keyword and multiple subcategories provided in an embodiment of this application. Figure 1A In the scenario where mobile phone 100 displays the details interface 111, the user clicks the "Use Now" button 112. In response to the click operation on the "Use Now" button 112, mobile phone 100 obtains the target information of Xiaohongshu 104, which may be related to the interface content of the details interface 111.

[0125] At this point, the content of details page 111 includes the text "pet oil painting photos" and a pet picture with an oil painting feel, so the target information can be the keyword "pet". Typically, Xiaohongshu 104 can pre-set one or more keywords for each image and text template. In this case, the keyword set for the image and text template corresponding to details page 111 is "pet". Of course, mobile phone 100 can also obtain the corresponding keywords by recognizing the content on details page 111.

[0126] After obtaining the keyword "pet" from mobile phone 100, images matching this keyword are filtered from image library 102 to obtain a set of pet images. Specifically, the set of pet images is obtained by determining the degree of match between each image and the keyword "pet". The search results for the "pet" image set are then categorized to obtain the classification results. At this point, the classification results indicate that the "pet" image set includes images of "cats" and "dogs," meaning the keyword "pet" includes two subcategories: "cats" and "dogs."

[0127] Based on the number of images that can be displayed on the home screen and the matching degree of each image, Mobile 100 selects 8 images from both the "cat" and "dog" images and uses these 8 images as the images displayed on the home screen for that subcategory.

[0128] After determining the eight images of "cats" and "dogs" displayed on the home screen, mobile phone 100 displays an image selection interface 118 based on the eight images displayed under the "cat" subcategory and the eight images displayed under the "dog" subcategory. Image selection interface 118 includes a recommendation page button 119. Figure 3A In the image selection interface, 118 is currently on the recommended page.

[0129] The initial screen of the image selection interface 118 displays 8 pictures of cats and 8 pictures of dogs. The 8 cat pictures are displayed first, followed by the 8 dog pictures. The cat pictures are displayed before the dog pictures.

[0130] After the image selection interface 118 is displayed on the phone 100, since the first screen of the image selection interface 118 displays images of all subcategories of the keyword "pet", when creating notes with the theme of pet oil painting photography, users can easily and quickly select the pet images that need to be uploaded to Xiaohongshu 104 from the pet images displayed on the first screen without having to flip through pages to find cat or dog images, thus improving the convenience of image selection for users.

[0131] Optionally, the image selection interface 118 may also include a cat tab button 120 and a dog tab button 121.

[0132] When the user clicks the cat tab button 120, the mobile phone 100 responds to the click operation and displays... Figure 3B The cat tab 122 in the phone 100 can include pictures of all the cats in the phone's gallery 102. Figure 3B This is a schematic diagram of the subcategory tab page provided in the embodiments of this application.

[0133] When the user clicks the dog tab button 121, the mobile phone 100 responds to the click operation and displays... Figure 3B The dog tab 123 can include pictures of all dogs in the photo library 102 of the phone 100.

[0134] It should be noted that, typically, the order of the subcategory tabs can be the same as the display order of the subcategories on the main screen. For example, Figure 3A In the initial screen, cat pictures are displayed first, followed by dog ​​pictures; correspondingly, the cat tab button 120 precedes the dog tab button 121. Of course, the order of the subcategory tabs can differ from the display order on the initial screen. Furthermore, the display order of images within each subcategory tab can be arbitrary, for example, sorted by image time, image score, or matching degree.

[0135] By displaying tags for multiple subcategories of pets, the mobile phone 100 further enhances the convenience of selecting images. For example, if the user doesn't find the desired image among the eight cat pictures displayed on the main screen, they can directly search for the cat image in the cat tag 122 without being distracted by other categories (such as dog) images. This reduces the time required to find the desired cat image and increases efficiency.

[0136] It should be noted that when displaying images of different subcategories on the main screen, the electronic device 200 can first determine the priority of each subcategory, and then display the images of each subcategory on the main screen according to their priority. Images of higher-priority subcategories are displayed earlier than images of lower-priority subcategories.

[0137] When determining the priority of different subcategories, the number of images in each subcategory can be used. If one subcategory has more images than another, then the subcategory has a higher priority. Of course, other methods can also be used to determine the priority of each subcategory, which are not limited here.

[0138] For example, in Figure 3A In the image selection for "Pets," there are 100 pictures of cats and 50 pictures of dogs. Since there are more pictures of cats than dogs, cats have a higher priority. When displaying cat and dog pictures on the home screen, the phone displays the cat pictures first, followed by the dog pictures.

[0139] In some other embodiments, the electronic device 200 may also determine the display order of different subcategories on the first screen interface in a random manner.

[0140] When displaying images of the same subcategory on the main screen, the electronic device 200 can determine the display order of the images within that subcategory based on factors such as image time or image score. The more recent the image time or the higher the image score, the earlier the image is displayed. Image scores can be obtained by assigning a quality score to the image, for example, based on factors such as image clarity.

[0141] For example, in Figure 3A In the middle, eight cat pictures are displayed sequentially on the first screen according to the order of their images.

[0142] Typically, the top left corner of the first screen is the most prominent display position, and the bottom right corner is the most prominent display position. For example, see... Figure 3C The diagram shown illustrates the order of the first screen interface display positions provided in the embodiments of this application. Figure 3A Taking the eight cat pictures and eight dog pictures displayed on the first screen as an example, we establish an xy coordinate system for the first screen, with the top left corner as the origin. The picture in the top left corner is displayed first, and the picture in the bottom right corner is displayed last. That is, picture 124 is displayed first, and picture 127 is displayed last. Based on the xy coordinates, the order of each display position can be determined. For example, picture 124 is displayed first, and picture 125 is displayed first; both picture 124 and picture 125 are displayed first, and both ...

[0143] It should also be noted that, Figure 3AIn the initial screen, multiple images of the same subcategory are displayed side-by-side, or in other words, multiple images of the same subcategory are displayed in one area or aggregated together. However, in other embodiments, multiple images of the same subcategory may not be aggregated together. For example, see... Figure 3D The schematic diagram of the non-aggregated display provided in the embodiment of this application is based on Figure 3A The scene shown, Figure 3D The eight cat pictures and eight dog pictures on the first screen are not displayed in a single group. The order in which these pictures are displayed on the first screen can be random, or determined by factors such as image time or image score; this is not limited here.

[0144] Compared to non-aggregated displays, grouping images from the same subcategory together can further improve the ease of image selection for users.

[0145] It should be understood that images that are not fully displayed on the initial screen will be shown on other screens. The image display format on other screens may be the same as or different from the image display format on the initial screen. No restrictions are placed on the image display format on other screens.

[0146] For example, see also Figure 4 The illustrated diagram shows an image display based on a single keyword and multiple subcategories provided in an embodiment of this application. Figure 1A In the scenario where the mobile phone 100 displays the graphic template interface 107, the user clicks on the graphic template 108. In response to the click on the graphic template 108, the mobile phone 100 displays the puppy outfit template interface 128; after the user clicks the "Use Now" button in the puppy outfit template interface 128, the mobile phone 100, in response to that click, displays the image selection interface 129.

[0147] The image selection interface 129 includes a recommendation page button 130. The first screen displays images of dogs in multiple states, with each state's images aggregated for display. Figure 4 Image selection screen 129 is located under the recommended page.

[0148] At this point, "dog" is the keyword. The keyword "dog" includes several subcategories (i.e., status or outfit). Outfit 1 (i.e., status 1) is a picture of a dog wearing sunglasses, outfit 2 (i.e., status 2) is a picture of a dog wearing a hat, outfit 3 (i.e., status 3) is a picture of a dog wearing a scarf, and outfit 4 (i.e., status) is a picture of a dog wearing clothes.

[0149] The first screen of the image selection interface 129 displays a grouped display of various outfit images. Specifically, the four images of outfit 1 are displayed in the same row, the four images of outfit 2 are displayed in the same row, the four images of outfit 3 are displayed in the same row, and the four images of outfit 4 are displayed in the same row. Among them, the image of outfit 1 is displayed at the beginning of the first screen, and the image of outfit 4 is displayed at the end of the first screen.

[0150] The specific process by which mobile phone 100 responds to the user's click on the "Use Now" button in the puppy outfit template interface 128 and displays the image selection interface 129 can be as follows:

[0151] In response to a click on the "Use Now" button in the puppy outfit template interface 128, mobile phone 100 obtains target information from Xiaohongshu 104, which may be related to the interface content of the puppy outfit template interface 128.

[0152] At this point, the interface content of the puppy outfit template 128 includes the text "Puppy Outfit Diary" and an image of a puppy wearing accessories. The target information can include the keyword "dog". Typically, Xiaohongshu 104 pre-sets one or more keywords for each image and text template. For example, the pre-set keywords for image and text template 108 might include "dog" and "outfit", or simply "dog". Of course, the mobile phone 100 can also obtain the keyword "dog" by recognizing the interface content of the puppy outfit template 128.

[0153] After obtaining the keyword "dog" from the image library 100, the system filters images matching this keyword from the image library 102 to obtain a set of "dog" images. Specifically, the set of "dog" images is obtained by analyzing the match degree between each image and the keyword "dog." The search results for the "dog" image set are then categorized to obtain classification results. At this point, the classification results indicate that the "dog" image set includes images of dogs wearing sunglasses, dogs wearing hats, dogs wearing scarves, and dogs wearing clothes. In other words, the keyword "dog" includes four subcategories, where subcategories can refer to states or clothing.

[0154] The mobile phone can determine the number of images that can be displayed in each subcategory on the home screen based on the number of images that can be displayed on the home screen and the number of subcategories. For example, assuming each subcategory displays 4 images on the home screen, it can select 4 images from each of the following categories: a dog wearing sunglasses, a dog wearing a hat, a dog wearing a scarf, and a dog wearing clothes, based on the matching degree or image score (e.g., scoring images based on clarity and color). These 4 images selected from each clothing category will then be displayed on the home screen for that subcategory (i.e., clothing or status).

[0155] Mobile phone 100 selects four pictures from the picture of a dog wearing sunglasses, four pictures from the picture of a dog wearing a hat, four pictures from the picture of a dog wearing a scarf, and four pictures from the picture of a dog wearing clothes, and displays them on the first screen of the picture selection interface 129.

[0156] After the image selection interface 129 is displayed on the phone 100, since the first screen of the image selection interface 129 displays all the images of the keyword "dog" (or outfits), when creating a note with the theme of "dog outfit diary", the user can easily and quickly select the image to be uploaded to Xiaohongshu 104 from the various dog outfit images displayed on the first screen, without having to flip through pages to find various dog outfit images, thus improving the convenience of the user in selecting images.

[0157] Optionally, the image selection interface 129 may also include a state 1 tab button 131, a state 2 tab button 132, a state 3 tab button 133, and a state 4 tab button 134. The state 3 tab button 133 and the state 4 tab button 134 are displayed on an interface outside of the image selection interface 129, and users can find them by swiping.

[0158] Users can trigger the display of the corresponding status tab on the phone 100 by clicking the status tab button. For example, when a user clicks the status 1 tab button 131, the phone 100 responds to the click and displays the status 1 tab. The status 1 tab displays pictures of all the dogs wearing sunglasses. In this way, by displaying tabs of various dog outfits, the phone 100 allows users to easily and quickly obtain pictures of the corresponding outfits from the tabs, reducing interference from other pictures (such as pictures of different outfits).

[0159] In other embodiments, the target information may include at least two keywords. In this case, after obtaining the keywords, the electronic device 200 first filters out the image sets for each keyword from the image set, and then selects the image for each keyword to be displayed on the first screen from the image sets for each keyword.

[0160] The process of selecting an image set for each keyword from the image collection can be as follows: Electronic device 200 calculates the matching degree between each image in the image set and the keyword; it determines whether the matching degree of each image is greater than or equal to a pre-set matching degree threshold; if an image's matching degree is greater than or equal to the threshold, it is selected as the keyword image; if an image's matching degree is less than the threshold, it is not selected as the keyword image. Multiple images for a keyword can form a keyword image set.

[0161] To display images for multiple keywords on the homepage, the total number of images for each keyword on the homepage can be less than or equal to the number of images displayed in the first frame. The number of images in the first frame is the maximum number of images that can be displayed on the homepage of the image selection interface. The number of images displayed for each keyword on the homepage can be the same or different.

[0162] When determining the number of images to be displayed for each keyword on the first screen based on the number of initial images, the electronic device 200 can use an average distribution principle to determine the number of images to be displayed for each keyword on the first screen. For example, if the number of initial images is 16 and the number of keywords is 4, then according to the average distribution principle, 4 images are allocated to each keyword, meaning that each keyword can have 4 images displayed on the first screen.

[0163] Of course, the electronic device 200 can also determine the number of images displayed for each keyword on the home screen in other ways, which are not limited here. For example, the number of images displayed for each keyword on the home screen can be determined based on the image proportion of each keyword, where the image proportion is the ratio between the number of images for each keyword and the total number of images for all keywords.

[0164] For each keyword, the electronic device 200 can select a corresponding number of images from the image set for that keyword, based on the number of images displayed on the homepage. For example, if the keyword is "giant panda," and the image set for "giant panda" contains 50 images, with 4 images displayed on the homepage, then these 50 images are sorted according to their matching degree. The top four matching images are then selected as the images displayed for the keyword "giant panda" on the homepage. Alternatively, the electronic device 200 can also select a corresponding number of images from the image set for the keyword based on the number of images displayed for each subcategory on the homepage. For example, it can randomly select a corresponding number of images from the keyword's image set, or it can score each image in the keyword's image set (e.g., based on clarity and composition), and select a corresponding number of images based on their scores.

[0165] In comparison, selecting images for the keywords from the keyword image set based on their matching degree or score can result in higher quality images displayed on the first screen, or at a greater likelihood that the images are the ones the user needs to upload, thus further improving the user's image selection experience.

[0166] The electronic device 200 can also select a corresponding number of images from the images for each keyword based on the number of images displayed on the home screen and according to the image timestamps. Specifically, the electronic device 200 selects a corresponding number of images for each keyword in descending or ascending order of image timestamps, and uses these images as the images displayed on the home screen for that keyword. For details, please refer to the section above on selecting images for each subcategory displayed on the home screen; these details will not be repeated here.

[0167] When selecting images for each keyword to display on the homepage, if the number of images for a keyword is less than the total number of images displayed for that keyword, all images for that keyword will be used. If the number of images for a keyword is greater than the total number of images displayed for that keyword, a suitable number of images will be selected based on image matching or other methods to display images for that keyword on the homepage. For example, if the keywords include "cat" and "dog," and there are 8 images for "cat" on the homepage, but only 6 images for "cat," then all images for "cat" will be displayed. Similarly, if there are 8 images for "dog" on the homepage, but only 15 images for "dog," then 8 images will be selected from the 15 dog images to display images for the keyword "dog" on the homepage.

[0168] After obtaining the images of each keyword displayed on the home screen, the electronic device 200 can display images of multiple keywords on the home screen.

[0169] When displaying images for multiple keywords on the home screen, you can first determine the priority of these keywords. The priority of a keyword is related to the display order of its image on the home screen; the higher the priority of a keyword, the earlier its image will appear on the home screen.

[0170] Optionally, the electronic device 200 can determine the priority of multiple keywords based on the order in which they are acquired. For example, Xiaohongshu 104 uses an image selector to transmit multiple keywords to the image library 102, and the transmission order of these keywords is: cat, then panda. In this case, the cat has a higher priority than the panda.

[0171] Of course, the electronic device 200 can also determine the priority of multiple keywords in other ways. For example, the priority of multiple keywords can be determined based on the number of images in the image set of a keyword. In this case, if the image set of cats has 50 images and the image set of pandas has 60 images, then the pandas have a higher priority than the cats. Another example is determining the priority of multiple keywords randomly.

[0172] Images with the same keyword can be displayed together on the home screen, or they can be displayed separately.

[0173] For example, see Figure 5A The illustrated diagram shows an image display based on multiple keywords provided in an embodiment of this application. Figure 1AIn this scenario, after the mobile phone displays the graphic template interface 107, the user clicks on graphic template 109. Graphic template 109 is a graphic template themed around graduation season, and users can create notes with the theme of graduation season through graphic template 109.

[0174] In response to a click on the image and text template 109, the mobile phone 100 displays the graduation season template interface 136 of the image and text template 109; after the user clicks the "Use Now" button in the graduation season template interface 136, the mobile phone 100 responds to the click operation and obtains the target information of Xiaohongshu 104, which may be related to the interface content of the graduation season template interface 136.

[0175] At this point, the interface content of the graduation season template 136 includes the text "Graduation Season," images of the podium, classrooms, and the playground. The podium image refers to a picture taken at the podium, which typically includes its features (e.g., a blackboard); the classroom image refers to a picture taken in the classroom, which typically includes its features (e.g., desks); and the playground image refers to a picture taken on the playground, which typically includes its features (e.g., the grass of a soccer field).

[0176] The target information can include four keywords: graduation photo, classroom, podium, and playground. The order in which these four keywords are retrieved is: graduation photo, podium, classroom, playground, that is, "graduation photo" is retrieved first, and "playground" is retrieved last.

[0177] After obtaining four keywords—graduation photo, classroom, podium, and playground—Mobile 100 selects a set of graduation photos, a set of classroom photos, a set of podium photos, and a set of playground photos from Image Library 102 based on the matching degree between the images and the keywords.

[0178] The mobile phone can select a corresponding number of images from the image sets corresponding to each keyword, based on the number of images that can be displayed on the home screen and the matching degree of each image. In this case, four images are selected from the image sets of graduation photos, classrooms, podiums, and playgrounds respectively, and these are used as the images displayed on the home screen.

[0179] Based on the order in which the keywords "graduation photo," "classroom," "lecture hall," and "playground" were retrieved, Mobile 100 determined their priority order as follows: Graduation photo > Lecture hall > Classroom > Playground. Therefore, the images for these four keywords are displayed on the home screen in the following order: Graduation photo > Lecture hall > Classroom > Playground. Furthermore, Mobile 100 also aggregates and displays images for each keyword.

[0180] Based on the priority of four keywords—graduation photo, classroom, podium, and playground—phone 100 displays an image selection interface 137. The first row of the image selection interface 137 displays four graduation photos, the second row displays four podium photos, the third row displays four classroom photos, and the fourth row displays four playground photos. Image selection interface 137 includes a recommended page button 138. Figure 5A It's on the recommended page.

[0181] After the image selection interface 137 is displayed on the phone, users creating graduation-themed notes can quickly and easily select various graduation-related images from the four keywords displayed on the image selection interface 137: graduation photos, classrooms, podiums, and playgrounds. This eliminates the need to flip through pages searching for graduation-themed outfits, significantly improving the convenience of image selection. Furthermore, the aggregated display of images based on various keywords on the home screen further simplifies image selection.

[0182] Optionally, the image selection interface 137 may also include a graduation photo tab button 139, a podium tab button 140, a classroom tab button 141, and a playground tab button 142. The classroom tab button 141 and the playground tab button 142 are displayed outside of the image selection interface 137, and users can find them by swiping. The order of the tab buttons for each keyword can be consistent with the display order of the keywords on the main screen.

[0183] Users can trigger the display of the corresponding status tab on mobile phone 100 by clicking the status tab button. For example, when a user clicks the classroom tab button 141, mobile phone 100 responds to the click and displays the classroom tab. The classroom tab displays pictures of all classrooms.

[0184] Optionally, when the target information includes at least two keywords, the search results for the image set containing the keywords can be further categorized to determine whether the keywords include subcategories; alternatively, the search results for the image set containing the keywords may not be categorized.

[0185] When categorizing the search results for the image set of keywords, the electronic device 200 determines the subcategories included in the keywords based on the categorization of search results and displays images of multiple subcategories on the first screen.

[0186] For example, in Figure 5AAfter obtaining the collection of graduation photos, the images can be further categorized to determine their respective categories. In this case, the search results show that the collection includes 50 photos of people wearing sunglasses and 30 photos of people wearing hats. That is, the keyword "graduation photo" includes two subcategories: wearing sunglasses and wearing hats.

[0187] To ensure that images from multiple subcategories are displayed on the homepage, a reasonable number of images can be selected from each subcategory based on the number of images displayed for the keyword on the homepage. The total number of images from all subcategories displayed on the homepage should be less than or equal to the number of images displayed for the keyword on the homepage. Specifically, the number of images displayed for the "wearing sunglasses" and "wearing hat" subcategories can be determined based on an average distribution principle or the proportion of images of people wearing sunglasses or hats to the total number of graduation photo images.

[0188] Assuming that the keyword "graduation photo" displays 4 images on the homepage, select 2 images from 50 images of people wearing sunglasses to display as images in the "wearing sunglasses" subcategory on the first screen; select 2 images from 30 images of people wearing hats to display as images in the "wearing hats" subcategory on the first screen.

[0189] Furthermore, the priorities of the two subcategories, "wearing sunglasses" and "wearing a hat," can be determined, thus determining their display order on the first screen. Specifically, the priority can be determined by the number of images in each subcategory. Since there are more images of "wearing sunglasses" than "wearing a hat," the "wearing sunglasses" subcategory has a higher priority than the "wearing a hat" subcategory. Therefore, on the first screen of image selection interface 137, the first two images in the first row are of people wearing sunglasses, and the last two are of people wearing hats.

[0190] Furthermore, tabs for subcategories of keywords can also be displayed. For example, Figure 5A The graduation photos include two subcategories: those with sunglasses and those with hats. You can then add a dropdown menu to the graduation photo's tab button, displaying labels for "wearing sunglasses" and "wearing a hat." See also... Figure 5B The illustrated diagram shows a subcategory tab page for keywords provided in an embodiment of this application, based on... Figure 5AIn this scenario, in response to the user clicking the graduation photo tab button 139, mobile phone 100 displays the graduation photo tab drop-down option interface 143. The graduation photo tab drop-down option interface 143 includes two options: wearing sunglasses and wearing a hat. By clicking the "wear sunglasses" option, the user can trigger mobile phone 100 to display a tab containing all graduation photos of people wearing sunglasses; by clicking the "wear a hat" option, the user can trigger mobile phone 100 to display a tab containing all graduation photos of people wearing hats.

[0191] Similarly, the electronic device 200 can further categorize the search results for images within a subcategory to determine the number and type of sub-subcategories included in the sub-category, and display images from multiple sub-subcategories on the main screen. For example, in Figure 3A and Figure 3B In this scenario, the keyword is "pet," and the subcategories of "pet" are "dog" and "cat." We can then further categorize the search results for "cat" and "dog" images. For example, categorizing the search results for "dog" images reveals 30 images of dogs wearing clothes and 40 images of dogs wearing scarves. Then, based on the number of images displayed for the "dog" subcategory on the homepage, we can select the corresponding number of images from the 30 images of dogs wearing clothes and the 40 images of dogs wearing scarves to display on the homepage. For instance, if the "dog" subcategory displays 8 images on the homepage, we can select 4 images from the 30 images of dogs wearing clothes and 4 images from the 40 images of dogs wearing scarves. Similarly, we can create tabs for the subcategories "wearing scarves" and "wearing clothes." The specific format could be as follows... Figure 5B As shown, it will not be elaborated further here.

[0192] In some embodiments, the target information may only include a single keyword, and the candidate image set for the keyword is not further categorized, or the keyword does not include subcategories. In this case, after obtaining the keyword, the electronic device 200 first filters the image set for the keyword based on the matching degree between each image in the image set and the keyword; then, based on the number of images that can be displayed on the first screen, it selects a corresponding number of images from the image set for the keyword based on the matching degree and / or image score (e.g., scoring images based on clarity and composition), and displays the selected images on the first screen. In this way, users can see images with better quality or images that users are more likely to need to upload on the first screen, improving the user experience of selecting images in image upload scenarios. Of course, other methods can also be used (e.g., according to the chronological order of images) to select images to be displayed on the first screen from the image set for the keyword.

[0193] Event-based image recommendation and display:

[0194] After the electronic device 200 displays the application interface on the display screen 230, if it receives a target operation input by the user on the application interface, it retrieves target information related to the application interface content in response to the target operation. The target information may include event information for one or more events. The target operation is an operation for uploading an image.

[0195] In practical applications, after acquiring the target information, the electronic device 200 can parse the target information and extract the event information. The number of events can be obtained based on the number of event information.

[0196] Event information can include, for example, time, location, people, and specific details of the event. Event information can be represented as (4W, when, where, who, what), where when indicates the time the event occurred, where indicates the location the event occurred, who indicates the people, and what indicates the specific object of the event (e.g., animals, plants, and activities), with activities including, for example, running and cycling.

[0197] In some embodiments, if the target information includes only event information of one event, the electronic device 200 extracts the event information from the target information and then filters the event image set from the image set based on the event information.

[0198] The image collection for an event may include images of multiple objects, or it may include an image of a single object. For example, such as... Figure 1B The scenario shown has a target message: "On Sunday, my family went to the zoo and saw giant pandas and fierce dogs." The event information extracted from this target message includes Sunday, zoo, giant pandas, and dogs. Based on this event information, images of giant pandas and dogs that simultaneously meet the time (Sunday) and location (zoo) requirements are retrieved from the image set, thus obtaining the image set for this event. At this point, the image set for this event includes images of "dogs" and "giant pandas," meaning it includes images of both "dogs" and "giant pandas."

[0199] If the image set for an event contains only images of a single object, the electronic device 200 can select a corresponding number of images from the image set based on the number of images that can be displayed on the first screen, according to the matching degree of each image and / or the image score (e.g., images can be scored based on clarity and composition), and display the selected images on the first screen. The number of selected images is less than or equal to the number of images that can be displayed on the first screen.

[0200] The electronic device 200 can also select the image to be displayed on the first screen of the event from the image set of the event in other ways. For example, it can select the image to be displayed on the first screen of the event from the image set of the event in chronological order, from newest to oldest or from oldest to newest. Another example is to filter the image set of the event based on the matching degree of each image, selecting images with a matching degree greater than or equal to a matching degree threshold, and then selecting the image to be displayed on the first screen of the event from the images with a matching degree greater than or equal to a matching degree threshold in chronological order, from newest to oldest or from oldest to newest.

[0201] If the image collection for an event includes images of multiple objects, to ensure that the initial screen displays images of all objects, a corresponding number of images can be selected from the images of each object, based on the number of images and categories that can be displayed on the initial screen. The total number of images displayed for all objects on the initial screen should be less than or equal to the number of images that can be displayed on the initial screen.

[0202] For example, the initial screen can display 16 images. An event's image set includes 30 images of "dogs" and 40 images of "pandas." In this case, 8 images are selected from the 30 "dog" images to display as the "dog" object on the initial screen; similarly, 8 images are selected from the 40 "panda" images to display as the "panda" object. Displaying images of multiple objects within an event on the initial screen allows users to easily access images of all objects without having to flip through pages, thus improving the convenience of image selection.

[0203] Optionally, when selecting an image to display on the home screen for a specific object, the selection can be based on the matching degree of each image. For example, based on the matching degree of each image with the word "giant panda," the image to be displayed on the home screen for that object can be selected from images in the "giant panda" category.

[0204] When selecting an image to display on the home screen for a specific object, you can also choose based on the scores of the images. For example, you can score images based on their clarity, content, and composition; and select the image to display on the screen for that object based on its score. Alternatively, you can randomly select an image from a list of images for that object to display on the home screen.

[0205] However, by selecting images for display on the homepage based on their matching accuracy or score, the quality of the images displayed can be better, and they are more likely to be the images the user needs to upload, thus improving the user's image selection experience. Optionally, after selecting images for each object in the event to display on the homepage, the electronic device 200 can first determine the priority of each object, and then display its images on the homepage according to that priority. Objects with higher priority will have their images displayed earlier on the homepage. This prioritizes high-priority images, improving the ease of image selection for the user.

[0206] For example, the electronic device 200 can determine the priority of objects based on the number of images of each object. For instance, when the candidate image set includes 30 images of "dogs" and 40 images of "pandas," the priority of "dogs" is lower than that of "pandas."

[0207] Of course, the electronic device 200 can also determine the priority of objects in other ways. For example, the priority of each object can be determined based on its frequency of occurrence and description complexity in the target information. In this case, assuming the candidate image set for an event includes two objects, "dog" and "panda," and the target information includes a lengthy text description of "panda," then the frequency of occurrence and description complexity of "panda" are considered higher than that of "dog," thus determining that "panda" has a higher priority than "dog." For example, priority can be sorted by the distance between the cursor position of the inserted image and the position of the text of each object. The closer the distance, the higher the priority. The position of the object's text refers to the position of the text describing the object on the interface; the priority of each object is determined based on the distance between this position and the position of the inserted image (i.e., the cursor position). Alternatively, the priority of each object can be determined by at least two of the following: the number of images of the object, the frequency of occurrence and description complexity of the object, and the distance between the object's text position and the cursor position of the inserted image.

[0208] In determining the number of images displayed for each object on the first screen based on the number of images that can be displayed on the first screen (i.e., the number of first images), the electronic device 200 can use an average distribution principle. Alternatively, the electronic device 200 can use other methods. For example, it can determine the number of images displayed for each object based on the proportion of images displayed for each object, with the number of images for an object being positively correlated with the number of images displayed on the first screen. Another example is that it can determine the number of images displayed for each object based on its priority; higher-priority objects have more images displayed on the first screen, meaning the object's priority is positively correlated with the number of images displayed on the first screen.

[0209] Optionally, the electronic device 200 can aggregate and display images of the same object on the main screen. This arranges the images of the same object side-by-side on the main screen, further improving the ease of image selection for the user.

[0210] Optionally, the electronic device 200 can also display tabs for each object. This reduces interference from images of other objects when the user selects an image of a particular object, thus improving the user experience.

[0211] For example, see Figure 6A The illustrated diagram shows a single-event, multi-category image display provided in an embodiment of this application, based on... Figure 1A and Figure 1B In the scenario described, mobile phone 100 displays the Weibo creation interface 115. The Weibo creation interface 115 includes the text content entered by the user: "During the National Day holiday, my family went to the Shanghai Wild Animal Park and saw giant pandas, fierce dogs, and beautiful cats." When the user clicks the image insertion button 116 on the Weibo creation interface 115, mobile phone 100 responds to this click operation and obtains the target information of Weibo 103. At this time, the target information is the text content information, specifically: "During the National Day holiday, my family went to the Shanghai Wild Animal Park and saw giant pandas, fierce dogs, and beautiful cats."

[0212] Mobile phone 100 extracts event information from the target information. This event information may include multiple keywords such as National Day, Shanghai Wild Animal Park, giant pandas, dogs, and cats. Based on a combined search using these keywords, it filters images from image library 102 that meet both the time requirement (National Day) and the location requirement (Shanghai Wild Animal Park), resulting in an image set for the event. In other words, it selects images of dogs, giant pandas, and cats taken at the Shanghai Wild Animal Park during National Day from the image set. At this point, the target information includes event information for one event.

[0213] After obtaining the image set of the event, the mobile phone 100 determines the number of images of each object to be displayed on the first screen based on the number of images that can be displayed on the first screen. Then, based on the number of images of each object to be displayed on the first screen, it selects the corresponding number of images from the images of dogs, pandas, and cats respectively, and displays the selected images on the first screen.

[0214] For example, suppose the image set for an event includes 10 pictures of dogs, 20 pictures of pandas, and 15 pictures of cats. The initial screen can display 16 images, with each object displaying 4 images on the initial screen. In this case, 4 images are selected from the 10 dog images; 4 images are selected from the 20 panda images; and 4 images are selected from the 15 panda images; these 4 images are displayed as the "dogs" on the initial screen. Alternatively, 5 dog images, 6 panda images, and 5 cat images could be selected and displayed on the initial screen.

[0215] At this point, the phone can select the images for each object to be displayed on the homepage based on their image scores. For example, for 20 images of giant pandas, the phone can score the images based on factors such as image clarity, content, and composition, and then sort the images according to their scores. The top four images with the highest scores will be selected as the images for displaying "Giant Panda" on the homepage.

[0216] The phone can also determine the priorities of cats, dogs, and pandas to determine the display order of their images on the home screen. In this case, let's assume the cat has the highest priority and the panda has the lowest.

[0217] Based on the priority of cats, dogs, and pandas, and the four images of the three selected objects (cats, dogs, and pandas) displayed on the home screen, mobile phone 100 displays image selection interface 144.

[0218] On the initial screen of the image selection interface 144, four cat images are displayed in the first row, four dog images in the second row, and four panda images in the third row. The image selection interface 144 also displays a "Recommendation Page" button 145. Figure 6A Zhongzheng is located at the bottom of the recommended page.

[0219] Optionally, the phone 100 can also display tabs for three objects: cat, dog, and panda, with the tab buttons arranged in the same order as the order in which these three objects are displayed on the home screen. In this case, the order in which the three objects are displayed on the home screen is: cat, dog, panda. Therefore, the phone 100 displays the cat tab button 146, the dog tab button 147, and the panda tab button 148 on the image selection interface 144. The panda tab button 148 is displayed outside the image selection interface 144, and users can find it by swiping. The cat tab button 146 is closest to the recommendation page button 145, while the panda tab button 148 is furthest from the recommendation page button 145.

[0220] Users can trigger the display of the corresponding tab on mobile phone 100 by clicking the tab button. The tab displays all images in that category. For example, when a user clicks the cat tab button 146, mobile phone 100 responds to the click and displays... Figure 6B The cat tag page 149 can display pictures of all the cats on the phone 100, instead of just the pictures of cats taken at the Shanghai Zoo during the National Day holiday. Figure 6B This is a schematic diagram of a cat's tag page provided in an embodiment of this application.

[0221] exist Figure 6A and Figure 6B In this app, the phone displays images of dogs, cats, and pandas that meet the time and location requirements on the home screen. This means displaying images of all the desired objects, allowing users to easily access images of the corresponding objects when creating a Weibo post, eliminating the need to flip through pages. This significantly improves the convenience of image selection. Furthermore, the app aggregates and prioritizes images of dogs, cats, and pandas, ensuring that higher-priority images are displayed first, making it even easier for users to select the images they want to upload.

[0222] In other embodiments, if the target information includes event information of at least two events, the electronic device 200 extracts the event information from the target information and then filters out the image set of each event from the image set based on the event information of each event.

[0223] To ensure that all event images are displayed on the first screen, the electronic device 200 selects a corresponding number of images from the image set for each event, based on the number of images that can be displayed on the first screen. The total number of images displayed for all events on the first screen is less than or equal to the number of images that can be displayed on the first screen. The number of images displayed for each event on the first screen can be the same or different.

[0224] When determining the number of images to display for each event on the first screen based on the total number of images that can be displayed, an average distribution method can be used. For example, if the first screen can display 16 images and there are 2 events, then each event will display 8 images. Alternatively, other methods can be used, such as considering the importance of each event or its proportion in the image count. Events with higher importance or a larger proportion of images will display more images on the first screen. For example, if the first screen can display 16 images and there are two events, and the first event is more important than the second, then the first event will display 10 images, and the second event will display 6 images.

[0225] For each event, the electronic device 200 can select a corresponding number of images from the event's image set based on the number of images displayed on the first screen of the event. For example, if the event's image set contains 50 images, and 8 images are displayed on the first screen, these 50 images are sorted according to their matching degree, and the top eight matching images are selected as the images displayed on the first screen of the event. The matching degree of the images refers to the degree to which the images match the event information. Of course, the electronic device 200 can also select a corresponding number of images from the event's image set in other ways. For example, it can randomly select a corresponding number of images from the event's images, or it can score each image in the event's image set (e.g., based on clarity and composition), and select a corresponding number of images from the set based on the scores.

[0226] Specifically, when selecting images for an event from the event's image set based on the number of images displayed on the first screen, selection can be based on the degree of matching between each image and an object in the event (i.e., the "what"), the image score, or the chronological order of the images. When the event includes multiple objects (i.e., the "what" includes multiple objects), a corresponding number of images can be selected from each object, ensuring that the total number of images selected from all objects is less than the number of images displayed on the first screen.

[0227] In comparison, selecting images from the event's image set based on matching degree or image score for the first screen can result in higher quality images displayed on the first screen, or at a higher probability that the images are the ones the user needs to upload, thereby further improving the user's image selection experience.

[0228] Optionally, the electronic device 200 can also sort multiple events to determine the priority of each event. The priority of an event is related to the order in which its image is displayed on the first screen. Generally, the higher the priority of an event, the earlier its image is displayed on the first screen.

[0229] For example, an electronic device can calculate the importance of an event based on at least one of the following: the completeness of the event content, its frequency of occurrence and descriptive complexity, the distance between the insertion point and the location of the corresponding text, and time precision and location precision. The device can then rank the events according to their importance (i.e., determine their priority). Events with higher importance have higher priority.

[0230] The completeness of event content refers to the completeness of event information. For example, the completeness of event content can be determined based on the missing 4W information (when, where, who, what). The higher the completeness of event content, the greater the importance of the event.

[0231] Frequency of occurrence and descriptive complexity refer to how often the event appears in the target information and the length of the description of the event. The higher the frequency of occurrence and descriptive complexity, the greater the importance of the event.

[0232] The distance between the insertion point and the corresponding text of the event refers to the distance between the image insertion point and the corresponding text of the event, in the case of inserting an image into text. The smaller the distance, the higher the importance of the event.

[0233] Time precision and location precision refer to the accuracy of time and location information in an event. The higher the precision, the greater the importance of the event. For example, if the first event is in October and the second event is on October 1st, the time precision of the second event is higher than that of the first event.

[0234] When determining event priority based on at least two of the following factors: completeness of event content, frequency of occurrence, complexity of description, distance between the insertion position and the corresponding text position, and time and location precision, a weight can be assigned to each factor. The scores of each factor are then multiplied by their respective weights, and the products are summed to obtain the total score for the event. Based on the total scores of all events, the importance of each event is determined, thus determining its priority.

[0235] In addition, event priority can be determined according to the order in which they occurred. For example, the further back in time an event occurred, the higher its priority. The priority of events can also be determined based on the number of images associated with each event. For example, the more images an event has, the higher its priority.

[0236] After obtaining the images of each event displayed on the main screen and the priority of each event, the electronic device 200 can display images of multiple events on the main screen. Images of the same event can be displayed together on the main screen, or they can be displayed separately.

[0237] Electronic device 200 displays images of multiple events on its home screen, allowing users to access these images directly without having to flip through pages, thus improving image selection convenience. Furthermore, the events are sorted to determine their order of appearance on the home screen, prioritizing images of higher-priority events and further enhancing image selection ease.

[0238] Optionally, if the image set for an event includes images of one or more objects, the electronic device 200 can also display an object tab. For example, if the image set for an event includes images of cats, the electronic device 200 can display a tab that includes images of all cats.

[0239] For each of multiple events, the image set for that event may include images of multiple objects or images of a single object. If the image set for an event includes images of only one object, the electronic device 200 can select a corresponding number of images from the image set for the event based on the number of images displayed on the first screen, according to the matching degree of each image and / or the image score (e.g., scoring images based on clarity and composition), and display the selected images on the first screen. The number of selected images is less than or equal to the number of images displayed on the first screen for the event.

[0240] If the image set for an event includes images of multiple objects, optionally, to ensure that the first screen displays images of multiple objects, a corresponding number of images can be selected from the images of each object, based on the number of images and categories displayed for the event on the first screen, and used as the images for each object displayed on the first screen. The total number of images of all objects displayed on the first screen is less than or equal to the number of images of the event displayed on the first screen.

[0241] For example, the home screen can display 16 images, and a certain event displays 8 images on the home screen. The image set for a certain event includes 30 images of "dogs" and 40 images of "pandas," with each object displaying 4 images on the home screen. In this case, 4 images are selected from the 30 "dog" images to be displayed as the "dog" images on the home screen; and 4 images are selected from the 40 "panda" images to be displayed as the "panda" images on the home screen.

[0242] Displaying images of multiple objects within an event on the first screen allows users to easily access these images without having to flip through pages, thus improving the ease of image selection.

[0243] Optionally, after selecting the images to display on the first screen for each object of the event, the electronic device 200 can first determine the priority of each object, and then display the images of each object on the first screen according to their priority. The higher the priority of an object, the more prominent its image will be on the first screen. This prioritizes displaying high-priority images, improving the user's ability to edit selected images.

[0244] Optionally, the electronic device 200 can aggregate and display images of the same object on the main screen. This arranges the images of the same object side-by-side on the main screen, further improving the ease of image selection for the user.

[0245] Optionally, the electronic device 200 can also display tabs for each object. This reduces interference from images of other objects when the user selects an image of a particular object, thus improving the user experience.

[0246] For example, see Figure 7 The illustrated diagram shows a multi-event image display provided in the embodiments of this application, based on... Figure 1A In the scenario described, after launching Weibo on phone 100 (version 103), the Weibo creation interface 159 is displayed. The Weibo creation interface 159 includes the text entered by the user: "On October 1st, my family went to the Shanghai Wild Animal Park. On October 2nd, my family went to Haichang Ocean Park and watched the orca show."

[0247] When a user clicks the image insertion button 116 on the Weibo creation interface 159, the mobile phone 100 responds to the click operation and obtains the target information of Weibo 103. At this time, the target information is text content information, specifically: "On October 1st, my family went to the Shanghai Wild Animal Park. On October 2nd, my family went to Haichang Ocean Park and watched the orca show."

[0248] Mobile phone 100 extracts event information from the target information, obtaining event information for Event 1 and Event 2. Event information for Event 1 may include multiple keywords such as October 2nd, Haichang Ocean Park, and orcas. Event information for Event 2 may include multiple keywords such as October 1st and Shanghai Wild Animal Park.

[0249] Mobile Phone 100 performs image retrieval based on event information for each event. Specifically, for Event 1, it performs a combined search using multiple keywords such as October 2nd, Haichang Ocean Park, and orcas, filtering images from Image Library 102 that meet the time (October 2nd) and location (Haichang Ocean Park) requirements to obtain a candidate image set for this event. In other words, it selects images of orcas taken at Haichang Ocean Park on October 2nd from the image set.

[0250] For event 2, a combined search was performed using multiple keywords, including October 1st and Shanghai Wild Animal Park. Images meeting both the time (October 1st) and location (Shanghai Wild Animal Park) criteria were selected from images in image library 102 to obtain a candidate image set for the event. In other words, images taken at Shanghai Wild Animal Park on October 1st were selected from the image set.

[0251] When determining the importance of Event 1 and Event 2, Mobile Phone 100 determined that the completeness of Event 1's event content was higher than that of Event 2 because Event 2's event content did not include "what" information, while Event 1's event content included "what" information (i.e., the orca). Therefore, Event 1 was deemed more important than Event 2.

[0252] In other words, on the first screen, the image for event 1 is displayed earlier than the image for event 2.

[0253] Based on the number of images that can be displayed on the first screen, phone 100 selects images from the image sets of Event 1 and Event 2. Assuming the first screen can display 16 images, and both Event 1 and Event 2 display 8 images on the first screen, phone 100 can select 8 orca images from Event 1's image set and 8 images from Event 2's image set based on image scores and / or matching degrees.

[0254] Based on the images displayed on the home screen for each event and the event priority, mobile phone 100 displays an image selection interface 151. The image selection interface 151 includes a recommended page button 151. Figure 7 The image selection interface is located on the recommended page. The first screen of the image selection interface 151 displays images of Event 1 and Event 2, with the eight orca images of Event 1 displayed together and the eight images of Event 2 displayed together.

[0255] In this way, when users create a Weibo post, if they need to insert images, they can obtain the images for Event 1 and Event 2 from the first screen of the image selection interface 151, without having to flip through pages to find the images for Event 1 and Event 2, making it more convenient. In addition, the aggregated display of multiple images for the same event, as well as the priority presentation of images for events with higher priority, can further improve the convenience for users to select images.

[0256] At this time, the phone 100 also displays the Orca tab. That is, the image selection interface 151 also displays the Orca tab button 153. The user can click the Orca tab button 153 to make the phone 100 display the Orca tab.

[0257] exist Figure 3A , Figure 4 , Figure 5A , Figure 6A and Figure 7 In the scenario shown, when a user creates text (such as notes and microblogs), if they need to upload images, the mobile phone recommends images based on the obtained text information (such as keywords and the text content entered by the user). The recommended images are then intelligently sorted and displayed on the first screen. This allows the first screen to display images of multiple elements (such as multiple keywords, multiple events, multiple objects within events, and multiple subcategories of keywords), making it easier and more convenient for users to find the images they want to upload directly from the first screen.

[0258] In some embodiments, when the electronic device 200 performs image retrieval based on event information, it may perform the retrieval based on multiple dimensions of information. For example, it may perform a combined retrieval based on dimensions such as the time, location, and object of the event. In this embodiment, if an image retrieval is performed based on event information and no results are found, intelligent backtracking retrieval can be performed to obtain the results.

[0259] Intelligent rollback retrieval refers to removing one or more dimensions of information before performing a search. For example, if event information includes multiple keywords such as October 2nd, Haichang Ocean Park, and orcas, and a search for images based on these keywords yields no matching images (i.e., no search results), then at least one of October 2nd, Haichang Ocean Park, and orcas can be removed before performing the image search again. For instance, after removing the time dimension of October 2nd, a search for images based on the keywords "Haichang Ocean Park" and "orcas" will retrieve images of orcas taken at Haichang Ocean Park.

[0260] In this embodiment of the application, when no results are found in the image search, intelligent rollback can be performed to avoid a poor user experience caused by no search results.

[0261] In the embodiments described above, when selecting images, the electronic device 200 can first perform similarity clustering on the images, and then select one or more preferred images from the same cluster, placing the preferred images from the same cluster at the front of the list of preferred images. This avoids interference from multiple identical images, further improving the convenience and experience of image selection.

[0262] For example, in a scenario involving a single keyword and a single subcategory, the electronic device 200, after selecting an image set for the keyword from an image collection, performs similar image clustering on the keyword's image set to obtain a similar image set. Optionally, the electronic device 200 can aggregate and categorize similar images based on information such as the image content, the time the image was captured, and the location where the image was captured, to generate a similar image set.

[0263] For each set of similar images, the images are sorted, and a predetermined number of images at the top of the sort are selected as preferred images. Optionally, for each similar image in the same set of similar images, the electronic device 200 can score the images based on information such as image composition, image color, and image clarity to obtain a score for each similar image; the images are then sorted according to their scores, and preferred images are selected based on their scores.

[0264] When displaying images that match keywords, the electronic device 200 prioritizes the display of preferred images and prioritizes the display of non-preferred images within the same set of similar images.

[0265] For example, see Figure 8 The diagram shown is a schematic of the similar image sorting optimization provided in the embodiment of this application. After the mobile phone 100 displays the cup template details interface 154 of Xiaohongshu 104, the user clicks the "Use Now" button on the cup template details interface 154, and the mobile phone 100 displays the image selection interface 155.

[0266] After a user clicks the "Use Now" button on the cup template details page 154, mobile phone 100 obtains the target information from Xiaohongshu 104. At this time, the target information includes the keyword "cup".

[0267] Mobile phone 100 filters images matching the cup from image library 102 to obtain a set of cup images. Similar images in the cup image set are then clustered to obtain similar image sets. Assuming images 156, 158, and 159 are in one similar image set, and images 157, 160, and 161 are in another, an aesthetic evaluation is performed on each image in the two similar image sets based on factors such as composition, color, and sharpness, resulting in a score for each image. At this point, within the same similar image set, image 156 has the highest score, which is higher than image 158, and higher than image 159. Image 156 is selected as the preferred image in this similar image set, while images 157 and 158 are considered non-preferred images.

[0268] Similarly, within the same set of similar images, image 157 has the highest score, which is higher than that of image 160, and higher than that of image 160. Therefore, image 157 is selected as the preferred image in this set of similar images, while images 160 and 161 are not preferred images.

[0269] In the image selection interface 155, for the same set of similar images, the image with the highest score 156 is displayed first, and the image with the lowest score 159 is displayed last. Similarly, for the same set of similar images, the image with the highest score 157 is displayed first, and the image with the lowest score 161 is displayed last.

[0270] To better illustrate the solutions provided in the embodiments of this application, the following is combined with... Figure 9 The flowchart illustrating the process of recommending and displaying images based on keywords and text content is provided for explanation.

[0271] like Figure 9 As shown, when obtaining application keywords, the electronic device 200 performs image retrieval based on the keywords. When obtaining application text, the electronic device 200 can extract event information from the text and perform image retrieval based on the event information.

[0272] In practical applications, applications can pass keywords or text content to the gallery app by calling an image picker (such as PhotoPicker). After obtaining the keywords or text, the image picker can then recommend and display images based on them. The image picker can be a component of the gallery app.

[0273] For example, in Figure 3A In the process, after the user clicks the "Use Now" button 112, Xiaohongshu 104 calls PhotoPicker and passes the keyword "pet" to the photo library 102. For example, in Figure 6A In the middle, after the user clicks the insert image button 116, Weibo 103 calls PhotoPicker and passes the text "On National Day, my family went to Shanghai Wild Animal Park and saw giant pandas, fierce dogs, and beautiful cats" to the image library 102.

[0274] After receiving the text sent by the application, the electronic device 200 intelligently generates event groups, that is, it extracts event information (4Ws: when, where, who, what) by parsing the text content. Figure 9 As shown, event information for event 1, event 2, ..., event n can be extracted. n is a positive integer greater than or equal to 1.

[0275] If event information from multiple events is extracted, intelligent multi-event sorting is performed, that is, the multiple events are sorted. Specifically, the importance of an event can be calculated based on information such as the completeness of the event content, frequency of occurrence and complexity of description, the position of the image insertion location in the text, time precision and location precision, and then the events are prioritized according to their importance.

[0276] Optionally, if the number of events exceeds a threshold, a certain number of target events can be selected based on their importance, and images of these target events can be displayed on the first screen. For example, if the threshold is 3, and the number of events exceeds 3, then the top three most important events will be selected based on their importance, and images of these three events will be displayed on the first screen.

[0277] Optionally, if no results are found when searching for images based on event information, a smart rollback search can be performed. Please refer to the above text for an introduction to smart rollback search; it will not be repeated here.

[0278] If you search for images based on event information, you can retrieve images for each event. For example... Figure 9 As shown, we can obtain the image for event 1, the image for event 2, ..., the image for event n.

[0279] After obtaining the search results from the image search, the search results can be categorized.

[0280] Search result categorization can be done by classifying objects within an event. For example, in Figure 6A In this scenario, the events involve three objects: cats, dogs, and pandas. Search results can be further categorized by cat, dog, or panda. For example, assuming the search results for cat images are categorized, the categorization results show 20 images of cats wearing hats and 30 images of cats wearing scarves. When selecting images for "cat" to display on the first screen, to ensure that both hat-wearing and scarf-wearing states are shown, the appropriate number of images can be selected from the 20 images of cats wearing hats and the 30 images of cats wearing scarves, based on the number of images of "cat" displayed on the first screen.

[0281] Search result categorization can also be done by classifying images related to keywords. For example, in... Figure 5A and Figure 5B In this scenario, the search results for graduation photos can be further categorized. Please refer to the above for details, which will not be repeated here.

[0282] After categorizing the search results, similar image clustering and aesthetic evaluation can be performed sequentially. These two processes aim to select the best images from multiple similar images, avoiding excessive duplication of similar images that could interfere with the user's selection.

[0283] Similar image clustering refers to aggregating and classifying similar images based on information such as image content, shooting time, and shooting location to generate a set of similar images. Aesthetic evaluation refers to scoring similar images within the same set based on information such as composition, color, and sharpness, and then ranking them according to the scores.

[0284] It can perform similar image clustering and aesthetic evaluation on events, objects in events, keywords, and subcategories of keywords.

[0285] For example, in a multi-keyword scenario, after retrieving image sets for each keyword from the image collection, similar images are clustered for each keyword's image set to obtain similar image sets and images not clustered into similar image sets; for each similar image set, aesthetic evaluation is performed on each similar image, and the preferred image is selected based on the score of each similar image; from the preferred images and images not clustered into similar image sets, the image for that keyword displayed on the first screen is selected.

[0286] It should be noted that the search result classification, similar image clustering, and aesthetic evaluation are optional steps, meaning that these three steps can be omitted.

[0287] In the completeness display calculation step, the electronic device 200 can reasonably select an appropriate number of images from images of various events, images of objects in the events, images of keywords, or images of subcategories of keywords, based on the number of images that can be displayed on the first screen interface, to ensure that images of multiple events are displayed on the first screen interface (e.g., Figure 7 (As shown in the scene), displaying images with multiple keywords on the first screen (e.g.) Figure 5A (As shown in the scenario), display images of multiple objects in the event on the first screen, or display images of multiple subcategories on the first screen (e.g.) Figure 3A and Figure 4 (The scene shown).

[0288] After calculating the completeness of the display, the images displayed on the first screen are obtained, which is the recommended image list. The recommended image page is then displayed based on this list.

[0289] As can be seen from the above, the embodiments of this application can ensure the richness of the content displayed on the first screen when the user selects images, thereby ensuring that the user can find the core element images on the homepage. Here, richness of content refers to the fact that images of multiple key elements expressed in the target information (such as text or keywords), or elements related to the target information, can be displayed on the first screen (i.e., the first page of the image selection interface), avoiding the need to swipe the screen to flip through pages to find the key element images. This improves the convenience for users to select images.

[0290] Please see Figure 10A The illustrated flowchart represents a method for displaying images provided in an embodiment of this application. This method may include the following steps:

[0291] Step S1001: Electronic device 200 displays the application interface.

[0292] For example, the applications could be Weibo 103 and Xiaohongshu 104 mentioned above. The application interface could be... Figure 7 In the Weibo creation interface, 159, or Figure 4 The puppy outfit template interface 128.

[0293] In step S1002, the electronic device 200 responds to the target operation on the application interface by obtaining the target information of the application. The target information is related to the content of the application interface, and the target operation is used to upload an image.

[0294] For example, the target operation could be aimed at Figure 7 The clicking operation of the "Insert Image" button 116 in the Weibo creation interface 159, or for... Figure 4 Clicking the "Use Now" button on the puppy outfit template interface 128.

[0295] The target information can include text content or keywords.

[0296] Target information can be information sent by an application in response to a target action. For example, Xiaohongshu 104 can respond to a target action. Figure 4 Clicking the "Use Now" button on the puppy outfit template interface 128 calls PhotoPicker to send the keyword "dog" to the gallery 102.

[0297] The application's interface content can be the content displayed by the application's interface itself, such as... Figure 4 The puppy outfit template interface 128 displays "Puppy Outfit Diary"; it can also be content entered by the user on the application interface, such as... Figure 7 The microblog creation interface 159 includes the text content entered by the user.

[0298] Step S1003: The electronic device 200 obtains a set of target candidate images for each target element from the image set based on the first image quantity and target information. The target element is determined based on the target information. The set of target candidate images includes at least one target candidate image. The total number of target candidate images for each target element is less than or equal to the first image quantity. The first image quantity is the number of images that can be displayed on the first screen of the image selection interface.

[0299] Target elements can be keywords in the target information, for example, Figure 5A The target information includes multiple keywords such as graduation photo, podium, classroom, and playground. Graduation photo, podium, classroom, and playground are the target elements.

[0300] Target elements can be categories of objects described by keywords in the target information. For example, Figure 3A The target information includes the keyword "pet". Pets include two categories (or subcategories) of cats and dogs, with cats and dogs being the target elements.

[0301] Target elements can be events described in the target information. For example, Figure 7 The target information is the text content sent on Weibo, which describes Event 1 and Event 2. Event 1 and Event 2 are the target elements.

[0302] Target elements are objects within an event described by the target information. For example, Figure 6A In this context, the target information is the text content sent on Weibo. The event described in the text content includes three objects: cats, dogs, and pandas. Cats, dogs, and pandas are the target elements. Typically, the object in an event is the "what" in the event, which can refer to animals, plants, activities, or other things; it is not limited here.

[0303] The total number of candidate images for each target element being less than or equal to the number of images in the first screen means that, in order for the first screen to display the candidate images for each target element, the total number of images displayed for each target element on the first screen is less than or equal to the number of images that can be displayed on the first screen.

[0304] For example, when the target element is a keyword, see Figure 5A In the scenario shown with multiple keywords, each keyword displays four images on the first screen. At this point, the target candidate image set includes four images displayed on the first screen for the graduation photo, four images for the podium, four images for the classroom, and four images for the playground. The specific selection process can be found above and will not be repeated here.

[0305] For example, when the target element is a subcategory of a keyword, see [link to relevant documentation]. Figure 4 In scenarios with a single keyword and multiple sub-states, each state displays four images on the initial screen. The target candidate image set for states 1 through 4 each includes four images displayed on the initial screen (i.e., target candidate images).

[0306] For example, when the target element is an event, see the multi-event scenario shown in Figure 7, where each event displays 8 images on the first screen. In this case, the target candidate image set for each of events 1 to 2 includes 8 images displayed on the first screen (i.e., target candidate images).

[0307] The target candidate images for a target element are the images displayed on the first screen of the interface. The number of images displayed on the first screen for various target elements can be the same or different; this is not limited here.

[0308] When retrieving candidate images for each target element from the image collection based on the number of images displayed on the first screen, selection can be made according to at least one of the following: image chronological order, image score, and image matching degree. The specific selection process can be found above and will not be repeated here.

[0309] In step S1004, the electronic device 200 displays candidate images of each target element on the first screen interface.

[0310] For example, see Figure 7 In the scenario shown, mobile phone 100 displays images of event 1 and event 2 on the home screen.

[0311] It should be noted that, normally, all images displayed on the first screen are shown in their entirety, meaning all images are fully displayed within the display area of ​​the first screen. However, in some cases, due to issues such as image layout on the first screen, some images may not be displayed completely; that is, only a portion of an image may be visible on the first screen, and only a part of the image may be displayed.

[0312] For example, see Figure 10B The diagram shown illustrates the image display on the first screen. The first screen cannot display images 162-165 completely; only portions of images 162-165 are visible. Taking image 162 as an example, image 162 comprises two parts, part 1 and part 2. Part 1 is displayed on the first screen, while part 2 is not. Therefore, only part 1 of image 162 is visible on the first screen; part 2 is not.

[0313] In this embodiment, for an image that is not fully displayed on the first screen, its inclusion on the first screen can be determined by the proportion of the area of ​​the portion of the image displayed on the first screen to the total area of ​​the image. This proportion can be set according to actual needs. For example, it can be set to 50%, meaning that if the area of ​​an image displayed on the first screen exceeds 50% of the total image area, the image is considered to be displayed on the first screen; otherwise, it is considered not to be displayed on the first screen.

[0314] As can be seen from the above, by displaying the target candidate images of each target element on the first screen, users can obtain images of multiple target elements on the first screen without having to flip through pages to obtain images of target elements. This makes it simpler and faster to select the image to be uploaded, thus improving the user experience.

[0315] In some possible implementations, if at least two target elements are included, and these at least two target elements include a first target element and a second target element, during the process of displaying the target candidate images of each target element on the first screen interface, the electronic device 200 can display the target candidate images of the first target element and the second target element on the first screen interface according to the priority of the first target element and the second target element. The priority of the first target element is higher than that of the second target element, and the display position of the target candidate image of the first target element is earlier than that of the target candidate image of the second target element.

[0316] For example, when the target element is an event, the priority of the two target elements can be determined by their relative importance. When the target element is a keyword, the priority can be determined by the order in which the keywords were retrieved. When the target element is an object within an event, the priority of the object can be determined by the number of images of the object. When the target element is a subcategory within a keyword, the priority of the object can be determined by the number of images of the subcategory.

[0317] In some possible implementations, the first target element among the target elements includes a first sub-element and a second sub-element. In this case, during the process of displaying the target candidate images of each target element on the first screen, the electronic device 200 can determine the priority of the first sub-element and the second sub-element; according to the priority, the images of the first sub-element and the second sub-element are displayed on the first screen, with the first sub-element having a higher priority than the second sub-element, and the image of the first sub-element being displayed earlier than the image of the second sub-element. The target candidate images of the target element include the images of the first sub-element and the second sub-element.

[0318] For example, when the target element is an event, the child elements can be objects within the event. The method for determining the priority of objects can be found above and will not be repeated here. When the target element is a keyword, the child elements are subcategories within the keyword. For example, the subcategories of the keyword "graduation photo" are "wearing a hat" and "wearing sunglasses." For example, the priority of a child element can be determined based on the number of images for each child element; the number of images for a child element is directly proportional to its priority.

[0319] In some possible implementations, the electronic device 200 may also display a tab for target elements or a tab for sub-elements on the image selection interface. The tab for target elements includes target candidate images of the target elements, and the tab for sub-elements includes images of the sub-elements. The target elements include sub-elements.

[0320] In some possible implementations, during the process of obtaining a set of candidate images for each target element from the image set based on the first number of images and target information, the electronic device 200 can obtain a set of candidate images for each target element from the image set based on the target information; for each target element, it selects a target candidate image from the candidate image set; wherein the number of selected target candidate images is determined based on the first number of images, and the number of selected target candidate images is the number of images of the target element displayed on the first screen interface. The image set may include images from the image library 102.

[0321] In some possible implementations, during the process of selecting a target candidate image from a set of candidate images, the electronic device 200 can perform similar image clustering on the candidate image set to obtain a set of similar images; for each set of similar images, after sorting each similar image in the set of similar images, select a first preset number of similar images, which are the target similar images of the set of similar images; and select the target candidate image from the target similar images of each set of similar images, as well as the candidate images that have not been clustered into the set of similar images.

[0322] The target similar image can be one of the preferred images mentioned above. It can score images based on aesthetic evaluation and select the preferred image based on the score.

[0323] In some possible implementations, in the image selection interface, the target similar image in the similar image set is displayed earlier than the non-target similar images in the similar image set.

[0324] In some possible implementations, if the target element includes at least two sub-elements, the electronic device can perform similar image clustering on the images of each sub-element to obtain a set of similar images for each sub-element, and the candidate image set includes the images of each sub-element.

[0325] In some possible implementations, the target information is textual information obtained from the application's interface content.

[0326] In some possible implementations, the target element is the event described in the target information, the object in the event described in the target information, the keyword in the target information, or the classification of the object described by the keyword in the target information (e.g., a subcategory of the keyword).

[0327] In some possible implementations, the target element is an event or an object within an event. During the process of obtaining candidate image sets for each target element from an image set based on the target information, the electronic device 200 can extract event information from the target information; use the event information to perform image retrieval in the image set to obtain candidate image sets for each event or each object within an event. When at least two events are included, the electronic device 200 can also determine the importance of each event; based on the importance of each event, it can prioritize the at least two events to determine the order in which the images of each event are displayed on the first screen interface.

[0328] In some possible implementations, the electronic device 200 can also perform a new image search in the image set based on target event information when it fails to find an image matching the event information during image retrieval from the image set based on event information. The target event information is the event information obtained after removing one or more dimensions of the event information. This is known as intelligent backtracking retrieval.

[0329] In some possible implementations, the target element is a category of objects described by keywords; in the process of obtaining candidate image sets for each target element from the image set based on the target information, the electronic device 200 can perform image retrieval based on the keywords in the target information to obtain the keyword retrieval results; the keyword retrieval results are classified to obtain target candidate image sets for each category.

[0330] It should be noted that any similarities or differences between this embodiment and the embodiments described above can be found in the corresponding content above, and will not be repeated here.

[0331] Please see Figure 11 The illustrated flowchart represents a method for displaying images provided in an embodiment of this application. This method may include the following steps:

[0332] Step S1101: Electronic device 200 displays the application interface.

[0333] In step S1102, the electronic device 200 responds to the target operation on the application interface by obtaining the target information of the application. The target information is related to the content of the application interface, and the target operation is used to upload an image.

[0334] Step S1103: The electronic device 200 obtains images of each target element from the image set based on the target information. The target elements are determined based on the target information.

[0335] Step S1104: Electronic device 200 determines the priority of each target element among at least two target elements.

[0336] The target elements are the events described in the target information, the objects in the events described in the target information, the keywords in the target information, or the classification of the objects described by the keywords in the target information.

[0337] When the target element is an event, extract event information for at least two events from the target information; based on the event information, determine the priority of each event among the at least two events; and use the event information of each event to retrieve the images (or image sets) of each event from the image set.

[0338] When the target element is a keyword, you can use the keyword to search for images in the image collection that have been searched for each keyword.

[0339] When the target element is an object in an event, the event information is extracted from the target information; using the event information of each event, the event images (or image sets) are retrieved from the image set, thereby obtaining the images of each object in the event.

[0340] When the target element is a subcategory of a keyword, you can use the keyword to search for images that have been searched for the keyword in the image collection, and then categorize the search results of the keyword images to obtain images for each subcategory.

[0341] In step S1105, the electronic device 200 displays images of each target element in the image selection interface according to the priority of the target elements; wherein, at least two target elements include a first target element and a second target element, the priority of the first target element is higher than the priority of the second target element, and the image of the first target element is displayed earlier in the image selection interface than the image of the second target element.

[0342] Electronic device 200 can display images with higher priority first, and then display images with lower priority.

[0343] In this way, by prioritizing each target element and displaying the images related to higher-priority target elements earlier than the images related to lower-priority target elements, the images related to higher-priority target elements are presented first, improving the convenience for users to select images.

[0344] In some possible implementations, the first target element in the target element includes a first sub-element and a second sub-element; the first sub-element has a higher priority than the second sub-element, the image of the first sub-element is displayed earlier in the image selection interface than the image of the second sub-element, and the image of the target element includes the images of the first sub-element and the second sub-element.

[0345] In some possible implementations, during the process of obtaining images of various target elements from an image set based on target information, the electronic device 200 can obtain candidate image sets for each target element from the image set based on the target information; for each target element, cluster the candidate images in the candidate image sets to obtain at least one similar image set; for each similar image set, sort the similar images in the similar image set and select a first preset number of similar images, which are the target similar images of the similar image set; for each target element, select the image of the target element from the target similar images of each similar image set and the candidate images not clustered into the similar image set.

[0346] In some possible implementations, when the target element is an event or an object in an event, the electronic device can extract event information from the target information and use the event information to filter images of each event or each object in the event from the image collection.

[0347] In some possible implementations, when the target element is a category of the object described by the keyword, the electronic device can use the keyword to filter images from the image collection, then classify the search results of the keyword images to obtain images for each category.

[0348] In some possible implementations of the second aspect, when the target element is a keyword, the priority of each keyword is determined according to the order in which the keywords are passed in. Specifically, the keyword passed in earlier has a higher priority than the keyword passed in later.

[0349] In some possible implementations, when the target element is an event, the importance of each event is determined based on at least one of the following: the completeness of the event content, the complexity of the description, the precision of the time and location, and the distance between the location of the event and the location of the insertion cursor. Events with higher importance have higher priority.

[0350] It should be noted that any similarities or differences between this embodiment and the embodiments described above can be found in the corresponding content above, and will not be repeated here.

[0351] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0352] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a photographing device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0353] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0354] In the embodiments provided in this application, it should be understood that the disclosed devices, electronic devices, and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings or direct couplings or communication connections may be through some interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

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

[0356] The electronic device provided in this application embodiment may include a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the method as described in any of the above method embodiments.

[0357] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps described in the various method embodiments above.

[0358] This application provides a computer program product that, when run on an electronic device, enables the electronic device to perform the steps described in the various method embodiments above.

[0359] This application also provides a chip system, which includes a processor coupled to a memory. The processor executes a computer program stored in the memory to implement the methods described in the above embodiments. The chip system may be a single chip or a chip module composed of multiple chips.

[0360] In the above embodiments, the descriptions of each embodiment have their own emphasis. Parts not detailed or described in a particular embodiment can be referred to in the relevant descriptions of other embodiments. It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. Furthermore, in the description of this application specification and appended claims, the terms "first," "second," "third," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, features defined with "first," "second," "third," and "fourth" may explicitly or implicitly include one or more of that feature. Additionally, it should be understood that at least one in the embodiments of this application includes one or more; where "more" means greater than or equal to two. In the embodiments of this application, "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the objects before and after it are in an "or" relationship.

[0361] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized.

[0362] Finally, it should be noted that the above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for displaying an image, characterized in that, The method includes: Displays the application's interface; In response to a target operation on the interface of the application, target information of the application is obtained, the target information being related to the interface content of the application, the target operation being used to upload an image; Based on the target information, images of at least two target elements are obtained from the image set, wherein the at least two target elements are determined based on the target information; Determine the priority of each of the at least two target elements; Based on the priority of the target elements, images of each target element are displayed on the image selection interface; The at least two target elements include a first target element and a second target element. The first target element has a higher priority than the second target element, and the image of the first target element is displayed earlier in the image selection interface than the image of the second target element.

2. The method according to claim 1, characterized in that, The priority of each of the target elements is determined based on at least one of the following: The distance between the position of the text of the target element in the target information and the cursor position, wherein the priority is negatively correlated with the distance. The completeness of the event content corresponding to the target element, wherein the priority is positively correlated with the completeness of the event content, and the completeness of the event content is determined by the absence of the time, place, people, and objects of the event. The frequency of occurrence of the target element, wherein the priority is positively correlated with the frequency of occurrence; The length of the description of the target element, wherein the priority level is positively correlated with the length of the description; The time precision of the event content corresponding to the target element, wherein the priority level is positively correlated with the time precision level; The location precision of the event content corresponding to the target element, wherein the priority level is positively correlated with the location precision level.

3. The method according to claim 1 or 2, characterized in that, The first target element in the target element includes a first sub-element and a second sub-element; The first sub-element has a higher priority than the second sub-element. The image of the first sub-element is displayed earlier in the image selection interface than the image of the second sub-element. The image of the target element includes the images of the first sub-element and the second sub-element.

4. The method according to claim 1 or 2, characterized in that, Based on the target information, images of at least two target elements are obtained from the image set, including: Based on the target information, obtain a candidate image set for each target element from the image set; For each target element, the candidate images in the candidate image set of the target element are clustered to obtain at least one similar image set; For each set of similar images, after sorting each similar image in the set of similar images, a first preset number of similar images are selected, and the first preset number of similar images are the target similar images of the set of similar images; For each target element, the image of the target element is selected from the target similar images in each set of similar images, as well as the candidate images that are not clustered into the set of similar images.

5. The method according to claim 1 or 2, characterized in that, The step of obtaining images with at least two target elements from the image set based on the target information includes: Based on the first number of images and the target information, a target candidate image set for each target element is obtained from the image set. The target candidate image set includes at least one target candidate image. The total number of target candidate images for each target element is less than or equal to the first number of images. The first number of images is the number of images that can be displayed on the first screen of the image selection interface. The step of displaying images of each of the target elements in the image selection interface includes: displaying the target candidate images of each of the target elements in the first screen interface.

6. The method according to claim 5, characterized in that, The at least two target elements include a first target element and a second target element; the target candidate images for each of the target elements are displayed on the first screen interface, including: Based on the priority of the first target element and the second target element, the target candidate images of the first target element and the target candidate images of the second target element are displayed on the first screen interface. The priority of the first target element is higher than that of the second target element, and the display position of the target candidate image of the first target element is earlier than that of the target candidate image of the second target element.

7. The method according to claim 5, characterized in that, The first target element in the target element includes a first sub-element and a second sub-element; The first screen displays the candidate images of each of the target elements, including: Based on the priority of the first sub-element and the second sub-element, the images of the first sub-element and the second sub-element are displayed on the first screen interface. The priority of the first sub-element is higher than that of the second sub-element, and the display position of the image of the first sub-element is earlier than that of the image of the second sub-element. The target candidate image of the first target element includes the images of the first sub-element and the second sub-element.

8. The method according to claim 5, characterized in that, The method further includes: The image selection interface displays a tab for the target element, or a tab for sub-elements. The target element tab includes an image of the target element, and the sub-elements tab includes an image of the sub-elements.

9. The method according to claim 5, characterized in that, Based on the first number of images and the target information, a target candidate image set for each target element is obtained from the image set, including: Based on the target information, obtain a candidate image set for each target element from the image set; For each of the target elements, a target candidate image is selected from the candidate image set; wherein, the number of selected target candidate images is determined based on the number of the first images, and the number of selected target candidate images is the number of images of the target element displayed on the first screen interface.

10. The method according to claim 9, characterized in that, Selecting the target candidate image from the candidate image set includes: The candidate image set is clustered to obtain a similar image set; For each set of similar images, after sorting each similar image in the set of similar images, a first preset number of similar images are selected, and the first preset number of similar images are the target similar images of the set of similar images; The target candidate image is selected from the target similar images in each of the various similar image sets, and from the candidate images that are not clustered into the similar image sets.

11. The method according to claim 10, characterized in that, Sort the similar images in the set of similar images, including: The similar images are sorted according to their scores, whereby the scores are determined based on at least one of the following: composition, color, and clarity.

12. The method according to claim 10, characterized in that, In the image selection interface, the target similar image in the similar image set is displayed earlier than the non-target similar images in the similar image set.

13. The method according to claim 10, characterized in that, If the target element includes at least two sub-elements, the step of clustering similar images in the candidate image set to obtain a similar image set includes: The images of each sub-element are clustered to obtain a set of similar images for each sub-element, and the candidate image set includes the images of each sub-element.

14. The method according to claim 1 or 2, characterized in that, The target information is text information obtained based on the interface content of the application.

15. The method according to claim 1 or 2, characterized in that, The target element is the event described in the target information, the object in the event described in the target information, the keyword in the target information, or the classification of the object described by the keyword in the target information.

16. The method according to claim 4, characterized in that, The target element is the event described in the target information or an object in the event described in the target information; Based on the target information, a candidate image set for each target element is obtained from the image set, including: Extract event information from the target information; The event information is used to perform image retrieval in the image set to obtain the candidate image set for each event or object in the event.

17. The method according to claim 16, characterized in that, The method further includes: If no image matching the event information is found when performing an image search from the image set based on the event information of the event, then the image search is performed again from the image set based on the target event information, which is the event information obtained after removing one or more dimensions of the event information.

18. The method according to claim 5, characterized in that, The target element is a classification of objects described by keywords in the target information; based on the target information, a candidate image set for each target element is obtained from the image set, including: Image retrieval is performed based on keywords in the target information to obtain retrieval results for those keywords; The search results for the keywords are categorized to obtain a set of target candidate images for each category.

19. A method for displaying an image, characterized in that, The method includes: Displays the application's interface; Obtain target information from the application, the target information being information sent by the application in response to a target operation on the application's interface, the target operation being for uploading an image; Based on the target information, images of at least two target elements are obtained from the image set, wherein the at least two target elements are determined based on the target information; Determine the priority of each of the at least two target elements; Based on the priority of the target elements, images of each target element are displayed on the image selection interface; The at least two target elements include a first target element and a second target element. The first target element has a higher priority than the second target element, and the image of the first target element is displayed earlier in the image selection interface than the image of the second target element.

20. The method according to claim 19, characterized in that, The priority of each of the target elements is determined based on at least one of the following: The distance between the position of the text of the target element in the target information and the cursor position, wherein the priority is negatively correlated with the distance. The completeness of the event content corresponding to the target element, wherein the priority is positively correlated with the completeness of the event content, and the completeness of the event content is determined by the absence of the time, place, people, and objects of the event. The frequency of occurrence of the target element, wherein the priority is positively correlated with the frequency of occurrence; The description complexity of the target element, wherein the priority is positively correlated with the description complexity; The time precision of the event content corresponding to the target element, wherein the priority is positively correlated with the description complexity; The location precision of the event content corresponding to the target element, wherein the priority is positively correlated with the description complexity.

21. An electronic device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method as claimed in any one of claims 1 to 20.

22. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 20.

Citation Information

Patent Citations

  • Photo displaying method and device

    CN107239207A

  • Search method and electronic equipment

    CN111368119A