Atlas acquisition method, electronic device, and computer-readable storage medium

By analyzing and clustering images in the image library of terminal devices, personalized image set recommendation templates are generated, which solves the problem of the monotony of traditional image browsing methods, improves user experience, and enriches the ways of image display and sharing.

CN120561327BActive Publication Date: 2026-08-04HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2024-02-20
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

Traditional image browsing methods are limited and offer a poor user experience, making it difficult to effectively recommend and display images on terminal devices.

Method used

By analyzing and clustering images in the image library of terminal devices, recommended templates are generated based on timelines and various image elements (location, people, events). Matching image sets are then selected and recommended cards are displayed on the desktop, providing personalized image set display and video generation functions.

Benefits of technology

It enables accurate recommendations for important dates and events for users, enriches the ways images are displayed, improves the user experience, and enhances the diversity of image browsing and sharing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120561327B_ABST
    Figure CN120561327B_ABST
Patent Text Reader

Abstract

The application relates to the terminal technical field and provides a picture set acquisition method, an electronic device and a computer readable storage medium. The method comprises the following steps: acquiring a historical event record, the historical event record comprising the corresponding relationship of a plurality of historical picture elements and a plurality of historical dates, the plurality of historical picture elements comprising one or more of a generation place, a character identification and the generation place; acquiring at least one picture element to be recommended corresponding to a current date from the historical event record; screening at least one recommendation template corresponding to the at least one picture element to be recommended from a plurality of recommendation templates according to the at least one picture element to be recommended; and screening a first picture set matching the component elements of a first picture element to be recommended from a picture library according to the component elements of the first picture element to be recommended. The first picture element to be recommended is any one of the at least one picture element to be recommended. The above method can automatically trigger the recommendation of pictures, the display mode of the pictures is enriched, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, specifically to a method for acquiring image atlases, an electronic device, and a computer-readable storage medium. Background Technology

[0002] With the development of internet and terminal technologies, terminal devices are being used more and more widely and deeply into people's production and lives, becoming an inseparable part of them.

[0003] Modern mobile devices are no longer limited to traditional communication functions; they also have the ability to take photos and store them. When a mobile device stores a large number of photos, they can be categorized for easier viewing. For example, a user can open the Gallery app, click on the "Camera" folder to view photos taken with the camera app, or click on the "Screenshots" folder to view screenshots.

[0004] However, traditional image browsing methods are rather limited and offer a poor user experience. Summary of the Invention

[0005] This application provides a method, apparatus, chip, electronic device, computer-readable storage medium, and computer program product for acquiring image sets, which can enrich the ways of displaying images and improve the user experience.

[0006] Firstly, a method for acquiring image sets is provided, which involves acquiring historical event records, including the correspondence between various historical image elements and multiple historical dates. The various historical image elements include one or more of the following: generation location, person identifier, and generation location. The method further involves acquiring at least one image element to be recommended from the historical event records that corresponds to the current date; selecting at least one template to be recommended from multiple recommendation templates based on the at least one image element to be recommended; and selecting a first image set from the image library that matches the constituent elements of the first template to be recommended, based on the constituent elements of the first template to be recommended. The first template to be recommended is any one of the at least one template to be recommended.

[0007] By analyzing and clustering images and making timely and accurate recommendations to users based on a timeline, terminal devices can accurately recommend events even on floating dates that are not fixed holidays, promptly reminding users not to miss relevant key dates and improving the user experience.

[0008] In some possible implementations, the difference in the number of days between the first historical date corresponding to the first image element to be recommended and the first query date corresponding to the first historical date is less than or equal to a preset number of days threshold. The first image element to be recommended is any one of at least one image element to be recommended. The first historical date is the historical date corresponding to the first image element to be recommended from multiple historical dates. The first query date is N days later than the current date, where N is a natural number.

[0009] The difference in the number of days between the first historical date and the first query date corresponding to the first historical date is less than or equal to a preset number of days threshold. Here, the number of days difference can disregard the year and only consider the month and day.

[0010] Taking N as an example, the month and day of the historical date are the same as or similar to the month and day of the query date. For example, today is February 14, 2024, and the query date can be February 17, 2024. Based on this, the terminal device can query historical dates, such as events that occurred on February 17th of previous years (last year or the year before), and use this information to make recommendations and remind users to avoid missing holidays, anniversaries, etc.

[0011] Optionally, the terminal device can obtain historical dates corresponding to the month and day of the query date, which can also be a range of days adjacent to February 17th of previous years. For example, the range of historical dates could be seven days before February 17th of previous years, or seven days after February 17th of previous years, or even three days before February 17th of previous years to three days after February 17th of previous years. In this embodiment, the range of historical dates obtained based on the month and day of the query date is not limited. Since users' celebrations of certain anniversaries may not be limited to the exact historical date due to personal arrangements, they may also celebrate and take photos in the days before and after February 17th. Therefore, obtaining the range of historical dates corresponding to the month and day of the query date can expand the image search range, thereby avoiding omissions and achieving accurate recommendations.

[0012] In some possible implementations, the theme of the first template to be recommended contains the first image element to be recommended.

[0013] Specifically, the terminal device searches multiple topics in the first image element to be recommended configuration file, and selects multiple recommendation templates from these topics that contain the first image element to be recommended as recommendation templates. Optionally, the terminal device can search multiple image elements to be recommended one by one from historical dates to obtain recommendation templates that contain some or all of the multiple image elements to be recommended.

[0014] In some possible implementations, the constituent elements of the first template to be recommended include at least one of the following: time element, location element, person element, and event element. Based on the constituent elements of the first template to be recommended, a first image set matching the constituent elements of the first template to be recommended is selected from the image library, including: generating at least one set of search keyword combinations based on the constituent elements of the first template to be recommended; searching the image library based on at least one search keyword in the first search keyword combination to obtain a first image set matching at least one search keyword, wherein the first search keyword combination is any one of the at least one set of search keyword combinations.

[0015] The specific process by which the terminal device generates the corresponding image set based on the components of the recommended template can be found in the relevant description in the text, and will not be repeated here.

[0016] In some possible implementations, the method also includes: displaying a desktop recommendation card on the desktop, the desktop recommendation card including a card name, the card name corresponding to the title of the first template to be recommended.

[0017] Specifically, the terminal device can generate a card name by filling in elements in the title or receiving external parameters. The terminal device can also generate desktop recommendation cards and display them in the top area of ​​the screen. The title is defined in the configuration information as "title". When "title": null, it indicates that external parameters are used for generation. Optionally, it can also be "title": %human% of %event%, or %human% of birthday. The terminal device fills the "title" with the element corresponding to "human": Qiuqiu, and the element corresponding to "event": birthday, generating the corresponding card name: Qiuqiu's birthday, which is displayed in the desktop recommendation cards. Optionally, the title here is an example; the actual title can be different combinations of different types of constituent elements, and each constituent element can be filled with different elements to obtain the corresponding card name, which will not be elaborated here.

[0018] In some possible implementations, the background image of the desktop recommendation card is an image generated based on the cover of the first image set.

[0019] This method enables the desktop recommendation cards to clearly display the people involved in the corresponding image collections, thus improving the user experience.

[0020] In some possible implementations, the method further includes: receiving a first operation input by the user to a first control in the desktop recommendation card; and in response to the first operation, displaying a first interface, the first interface including icons corresponding to the first image set.

[0021] For a description of the first interface, please refer to the relevant description in the text, which will not be repeated here.

[0022] In some possible implementations, the method further includes: generating a first recommendation statement based on the first recommendation statement template of the first recommendation template, and the first interface also includes the first recommendation statement.

[0023] The terminal device generates a first recommendation statement based on the first recommendation statement template of the first recommendation template. A detailed description of this process can be found in the preceding description of recommendation statement generation, and will not be repeated here. After the recommendation statement is generated, if the user taps the screen to enter the first interface, the first recommendation statement can also be displayed on the first interface.

[0024] In some possible implementations, the first interface also includes a second control, and the method further includes: receiving a second operation input by the user to the second control; in response to the second operation, generating a video file containing a first image set according to a first template to be recommended; and playing and / or storing the video file.

[0025] Specifically, the first interface also includes a second control, such as "Generate Video". When the user performs a second operation on the second control, i.e., clicks "Generate Video", the terminal device generates a corresponding video file from the images in the first image set according to the first recommended template corresponding to the first recommended statement. The text, display effects, watermark, and background music in the video file are defined by the corresponding first recommended template. The terminal device can play the video file, and can also store and forward the video file. This enriches the ways to browse and share images and enhances the user experience.

[0026] In some possible implementations, before displaying the desktop recommendation card on the desktop, the method further includes: if the number of images in the first image set does not meet the preset quantity requirement, then according to the constituent elements of the second recommendation template, a second image set matching the second recommendation template is selected from the image library; wherein, the second recommendation template is a recommendation template that is different from the first recommendation template among at least one recommendation template, and the recommendation priority of the second recommendation template is lower than that of the first recommendation template.

[0027] Optionally, if the number of images in the first image set does not meet the preset requirement, for example, less than six images, the terminal device will filter out a second image set from the image library that matches the second recommended template, based on the components of the second recommended template with a priority lower than the first recommended template. Optionally, if the second image set still does not meet the preset requirement, the device will continue to filter out a third image set from the image library that matches the third recommended template, based on the components of the third recommended template with a priority lower than the second recommended template, and so on, until an image set that meets the preset requirement is selected. Optionally, the preset requirement can also be other natural numbers such as 10 or 20, and this embodiment of the application does not limit this.

[0028] In some possible implementations, the method also includes: detecting multiple newly added images in the image library; analyzing and clustering the multiple newly added images to obtain the image elements of the newly added images; and selecting at least one recommendation template corresponding to the image elements of the newly added images from multiple recommendation templates based on one or more of the image elements of the newly added images.

[0029] Optionally, in this embodiment, the timing for triggering recommendations to the user can also be the timing of the generation of a new event. This new event is obtained by analyzing and clustering newly added images from the image library. This method can automatically trigger template recommendations based on newly added images, ensuring that the recommended content matches the user's behavior, making it easier for the user to recall previous travel experiences and improving the user experience.

[0030] In some possible implementations, the method further includes: when it is detected that the current location does not match the user's permanent residence, and the duration of stay at the current location exceeds a preset duration threshold, then it is determined that at least one image element to be recommended includes the travel event; based on the travel event, at least one template to be recommended corresponding to the travel event is selected from multiple recommendation templates.

[0031] Terminal devices can automatically trigger recommendations for travel events based on changes in location, making it easier for users to recall previous travel experiences and improving the user experience.

[0032] In some possible implementations, the method further includes: when it is detected that the current location and the user's permanent residence do not match, and the current location is one of the generated locations among multiple historical image elements, then it is determined that at least one image element to be recommended includes the travel event and the current location; based on the travel event and the current location, at least one template to be recommended corresponding to the travel event and / or the current location is selected from multiple recommendation templates, and the location element in at least one template to be recommended is the current location.

[0033] Terminal devices can automatically trigger recommendations for travel events based on changes in location, making it easier for users to recall previous travel experiences and improving the user experience.

[0034] In some possible implementations, at least one image element to be recommended that matches the current date is obtained from historical event records, including: when the screen is first turned on on the indicated current date, at least one image element to be recommended is obtained from historical event records.

[0035] When a terminal device first lights up each day, it can retrieve at least one image element to be recommended from historical event records, thereby initiating the recommendation process.

[0036] In some possible implementations, obtaining historical event records includes: analyzing multiple images in a photo library to obtain image elements of the multiple images, including one or more of the following: generation time, generation location, person feature vector, and semantic feature vector, where the semantic feature vector is used to characterize the image content; and clustering the image elements of the multiple images according to date to obtain historical event records.

[0037] The system analyzes multiple images in the terminal device's image library to obtain the image elements of each image. These image elements are then clustered by date to obtain historical event records. This enables the system to recommend relevant image sets to users based on time, preventing the omission of important dates and improving the user experience.

[0038] In a second aspect, an atlas acquisition device is provided, comprising a unit consisting of software and / or hardware, the unit being used to perform any one of the methods described in the first aspect.

[0039] Thirdly, embodiments of this application provide a chip including a processor; the processor is used to read and execute a computer program stored in a memory to perform any one of the methods described in the first aspect.

[0040] Optionally, the chip further includes a memory, which is connected to the processor via a circuit or wire.

[0041] Alternatively, the chip may further include a communication interface.

[0042] Fourthly, an electronic device is provided, comprising: a processor, a memory, and an interface; the processor, memory, and interface cooperate with each other to enable the electronic device to perform any one of the methods described in the first aspect.

[0043] Fifthly, a computer-readable storage medium is provided, wherein a computer program is stored therein, and when the computer program is executed by a processor, the processor performs any one of the methods described in the first aspect.

[0044] In a sixth aspect, a computer program product is provided, the computer program product comprising: computer program code, which, when executed on an electronic device, causes the electronic device to perform any one of the methods described in the first aspect. Attached Figure Description

[0045] Figure 1 This is a schematic diagram of the structure of a terminal device 100 provided in an embodiment of this application;

[0046] Figure 2This is a software structure block diagram of the terminal device 100 provided in the embodiments of this application;

[0047] Figure 3 This is a schematic diagram illustrating the correspondence between a timeline and image elements provided in an embodiment of this application;

[0048] Figure 4 This is an interactive diagram of an example of an image set acquisition method provided in an embodiment of this application;

[0049] Figure 5 This is a schematic diagram of an interface related to smart film processing provided in an embodiment of this application;

[0050] Figure 6 This is another example of an interface diagram related to smart film processing provided in the embodiments of this application;

[0051] Figure 7 This is another example of an interface diagram related to smart film processing provided in the embodiments of this application;

[0052] Figure 8 This is a schematic diagram of an interface related to smart film processing provided in an embodiment of this application;

[0053] Figure 9 This is a schematic diagram of a desktop recommendation card and a smart image processing interface provided in an embodiment of this application;

[0054] Figure 10 This is a flowchart illustrating an example of an image set acquisition method provided in an embodiment of this application;

[0055] Figure 11 This is a schematic diagram of the structure of an example image acquisition device provided in an embodiment of this application. Detailed Implementation

[0056] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; "and / or" in this text 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. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.

[0057] Hereinafter, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first," "second," or "third" may explicitly or implicitly include one or more of that feature.

[0058] The image acquisition method provided in this application can be applied to terminal devices such as mobile phones, tablets, wearable devices, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, and personal digital assistants (PDAs). This application does not impose any restrictions on the specific type of terminal device.

[0059] For example, Figure 1 This is a schematic diagram of the structure of a terminal device 100 provided in an embodiment of this application. The terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0060] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the terminal device 100. In other embodiments of this application, the terminal device 100 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.

[0061] It is understood that 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 terminal device 100. In other embodiments of this application, the terminal device 100 may also adopt different interface connection methods or a combination of multiple interface connection methods as described in the above embodiments.

[0062] The software system of terminal device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses the layered architecture Android system as an example to exemplify the software structure of terminal device 100.

[0063] Figure 2 This is a software structure block diagram of the terminal device 100 according to an embodiment of this application. The layered architecture divides the software into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer. The application layer may include a series of application packages.

[0064] like Figure 2 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.

[0065] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0066] like Figure 2 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

[0067] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.

[0068] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.

[0069] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.

[0070] The phone manager is used to provide communication functions for terminal device 100. For example, it manages call status (including connection, hang-up, etc.).

[0071] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.

[0072] The notification manager allows applications to display notification information in the status bar. It can be used to convey informational messages and can disappear automatically after a short time without user interaction.

[0073] In this embodiment, the application framework layer also includes a media recommendation service, cloudification parameters, and a recommendation database.

[0074] The cloud-based parameters include a configuration file for a recommended template. This configuration file can be downloaded from the cloud or pre-installed on the terminal device and updated periodically from the cloud.

[0075] The media recommendation service (MrsgService) includes a media recommendation generation engine and a recommendation template parser. Both the engine and parser can adapt different graph atlases to different recommendation templates based on configuration files and generate corresponding recommendation statements.

[0076] A recommendation database is used to store adapted image sets and recommendation statements for easy presentation later.

[0077] The Android runtime consists of core libraries and a virtual machine. The Android runtime is responsible for scheduling and managing the Android system.

[0078] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.

[0079] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0080] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.

[0081] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.

[0082] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.

[0083] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0084] A 2D graphics engine is a graphics engine for 2D drawing.

[0085] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.

[0086] For ease of understanding, the following embodiments of this application will be described using the following methods: Figure 1 and Figure 2 Taking the terminal device with the structure shown as an example, and in conjunction with the accompanying drawings and application scenarios, the atlas acquisition method provided in this application embodiment will be specifically described.

[0087] Typically, users can take photos using the camera application (hereinafter referred to as the camera app) installed on their terminal device. Photos taken can include pictures of people, landscapes, other objects, or different objects together. Photos taken by the camera app can be stored in the gallery application (hereinafter referred to as the gallery). Terminal devices can store not only photos taken by the camera app, but also images from other sources, such as screenshots, images downloaded from web pages, and images transmitted through other communication tools (such as chat applications).

[0088] When users want to browse images, they can open the gallery. For example, a user can open the gallery, click the "Camera" folder to view photos taken with the camera app, or click the "Screenshots" folder to view screenshots. Due to the limited screen size of terminal devices, the number of images displayed at once is limited. Users can also navigate to folders and scroll up and down to view other images within those folders. Traditional image display methods are relatively simple, making image browsing monotonous and resulting in a poor user experience.

[0089] The image atlas acquisition method provided in this application can cluster images in an image library according to one or more elements, and then select images from the image library whose image elements match the elements of the recommended template to form an image atlas. This allows the resulting image atlas to vary based on the image elements of different images. It should be noted that the image atlas obtained by this method based on the image elements is used to recommend images to users, thereby personalizing the image display according to the recommended template. This image display method is richer and more diverse, enhancing the user's browsing experience.

[0090] In this embodiment, when new images are stored in the image library, the terminal device can perform computer vision (CV) analysis on each image stored in the library in the background. CV analysis can include the following three aspects:

[0091] Aspect 1: Location information conversion.

[0092] Specifically, the terminal device can convert longitude and latitude location information into specific generated locations, such as cities and / or points of interest (POIs).

[0093] When generating an image, the terminal device can record the image's location information and then convert that information into a specific location. Taking a camera application taking a photo as an example, if the terminal device's positioning function (such as GPS) is enabled when taking the photo, it can obtain and record its current longitude and latitude as the location information of the photo. For instance, if the terminal device's longitude and latitude at the time of taking image P1 are (X+Y) / 2 E, (Z+W) / 2 N, and city C1's longitude range is XX to YY E, and its latitude range is ZZ to WW N, then the terminal device, through CV analysis, can determine that image P1 was generated in city C1, thus converting the location information of image P1 into the location of city C1. Optionally, the terminal device can also determine the POI area corresponding to the longitude and latitude of image P1 as the location of image P1 based on the longitude and latitude ranges of some preset POI areas. Optionally, the POI area can be a tourist attraction, an office building, a residential area, etc.

[0094] If the location function of the terminal device is not enabled when taking a photo, the terminal device cannot obtain the longitude and latitude at that time, so the location information of the captured image can be empty, and the generated location is also empty.

[0095] Optionally, if the terminal device's location function is not enabled when taking a picture, the user can manually input the image's location information. For example, the user can directly input their current longitude and latitude for the image. In this case, the terminal device can store the user-input longitude and latitude as the location information of the captured image. The user can also directly input the name of their current city, the name of a scenic spot, or a user-defined location, such as "Old Place." The terminal device can then store the user-input location name as the image's generated location. Optionally, the terminal device can also determine its current location based on the coverage of the currently connected local area network and use that area as the image's generated location.

[0096] After the terminal device performs location information conversion on multiple images, it can obtain the generation locations of these images. The terminal device can also perform cluster analysis on the generation locations of the multiple images; for example, it can take the union of the generation locations of the multiple images to obtain multiple locations. Optionally, these generation locations can be cities and / or POI areas, which is not limited in this embodiment. Some or all of these multiple locations can be used in the configuration information of the recommendation template to form location elements.

[0097] Aspect 2: Extracting character feature vectors.

[0098] Specifically, the terminal device can use a facial recognition model to identify faces appearing in an image, thereby obtaining facial feature vectors corresponding to different faces. It should be noted that if an image contains multiple faces, a corresponding facial feature vector can be extracted from each face, resulting in multiple facial feature vectors. After the terminal device extracts multiple facial feature vectors from multiple images, it can also perform cluster analysis on these extracted facial feature vectors to obtain a person feature vector representing each individual. If the same person's face appears in multiple images, then the faces in these multiple images correspond to the same person feature vector (TagID). It should also be noted that the terminal device can set up a list of people, where each person's name corresponds to a TagID. That is, each TagID represents a natural person. Therefore, if an image contains multiple faces, multiple TagIDs corresponding one-to-one with each face can be extracted from that image.

[0099] Optionally, the terminal device can also employ a human body recognition model to identify the shape of human bodies appearing in an image, thereby obtaining human body feature vectors corresponding to different human bodies. It should be noted that if an image contains multiple human bodies, a corresponding human body feature vector can be extracted for each human body, resulting in multiple human body feature vectors. After the terminal device extracts multiple human body feature vectors from multiple images, it can also perform cluster analysis on the extracted multiple human body feature vectors to obtain a person feature vector representing each person. If the same person's body appears in multiple images, then the body of that person in all these images corresponds to the same person feature vector (ReID). It should also be noted that the terminal device can set up a list of people, where each person's name corresponds to a ReID. That is, each ReID represents a natural person. Therefore, if an image contains multiple human bodies, multiple ReIDs corresponding one-to-one with each human body can be extracted from the image.

[0100] Optionally, the terminal device can also use a combination of face recognition model and human body recognition model to recognize both faces and bodies in the image, as long as it can obtain the TagID, ReID, or combined ID that represents each person.

[0101] The following explanation uses TagID as an example. The names of the people included in the above list can be entered by the user. For example, after the terminal device identifies and clusters people in multiple images, it obtains two TagIDs: TagID-1 and TagID-2. When a user browses the album, if the user selects to browse by portrait, the terminal device can display two folders. For example, by taking the union of the facial and / or body feature vectors of multiple people, multiple person feature vectors are obtained. The names of the people corresponding to these multiple person feature vectors can be used as multiple elements in the person element. Folder 1 stores the images of the person corresponding to TagID-1, and folder 2 stores the images of the person corresponding to TagID-2. Folder 1 can use an image corresponding to TagID-1 as its cover, and folder 2 can use an image corresponding to TagID-2 as its cover. The user can name these two folders separately. For example, if the user names folder 1 corresponding to TagID-1 as "Little Daughter," it means that the person corresponding to TagID-1 is "Little Daughter." If a user names the folder 2 corresponding to TagID-2 as "lover", it means that the person corresponding to TagID-2 is "lover".

[0102] Users can also tag individual people in an image. For example, tagging an image with the tag "young daughter" means that the image's TagID corresponds to the young daughter. If other images have the same TagID, it means that those other images also correspond to the young daughter.

[0103] Users can use any of the above methods to label different people in the album one by one. Some or all of the names of these people can be used in the configuration information of the recommendation template to form the person element.

[0104] Additionally, user-defined names, such as "youngest daughter" and "lover," can be added to the character list. In other words, some or all of the names of characters in the character list can serve as character elements that make up the character element.

[0105] If the user does not enter a name for a person for a certain TagID, the terminal device can set the name of the person corresponding to that TagID to empty, for example, displaying: Unnamed (or Add Name).

[0106] It should be noted that a single person's face can correspond to one or more TagIDs. If an image contains the faces of multiple people, it can correspond to multiple TagIDs. Optionally, a single person's body can correspond to one or more ReIDs. If an image contains the bodies of multiple people, it can correspond to multiple ReIDs.

[0107] Optionally, the same face or body may correspond to both TagID-1 and ReID-1, or the same face may be identified with different TagIDs due to recognition errors. Users can then operate their terminal devices to change the name of the person corresponding to TagID-1 and ReID-1 to the same name, thus establishing a connection between the person's feature vectors and defining TagID-1 and ReID-1 as the same person. During image search, if searching for images of this person, images with the person's feature vector set to either TagID-1 or ReID-1 can be filtered out.

[0108] When new images are added to the photo library, the terminal device can also perform facial and / or human body recognition on the new images to obtain the corresponding TagID. Optionally, if the new image contains a person already in the album, the image can be associated with an existing TagID. Optionally, if the new image contains a person not present in the album, a new TagID can also be obtained to correspond to the newly added person.

[0109] Optionally, the aforementioned face recognition model and body recognition model can be trained neural network models.

[0110] Aspect 3: Extracting semantic feature vectors.

[0111] Specifically, the terminal device can employ a semantic recognition model to perform semantic recognition on the images, thereby obtaining a semantic feature vector (ClipID) corresponding to each image. A semantic feature vector represents the image content contained in the corresponding image. Optionally, the image content can include objects different from people, such as pets, cats, dogs, food, etc.; it can also include scenes, such as painting, traveling, sports, dancing, weddings, parties, etc. This application embodiment does not limit the image content that can be recognized. The objects and scenes contained in the image content of an image can be one or more. For example, if the image is a scene of many people having a picnic in the wild, and there is also a pet dog in the picture, then the recognized semantic feature vector can represent that the image includes image content such as: traveling, parties, pets, and pet dogs.

[0112] Optionally, the semantic recognition model described above can be a trained neural network model.

[0113] The aforementioned CV analysis process can be performed when the terminal device is in an idle period. This idle period can be any time when the user does not use the terminal device, such as when the device is charging and the screen is off, or between 2:00 AM and 4:00 AM, or when the screen is off. This embodiment of the application does not limit this. Performing CV analysis on the terminal device during idle periods does not affect user operation and is therefore highly reasonable.

[0114] The objects of the aforementioned CV analysis can include not only individual images stored in the image library, but also frame images from video files within the library. CV analysis of video files can be performed by analyzing each frame image individually, or by extracting frames from the video to obtain frame images, and then performing the aforementioned CV analysis on these frame images to obtain the CV analysis results. Optionally, during frame extraction, the terminal device can choose to extract one frame at fixed intervals, such as one frame every ten frames, or it can extract one frame at fixed time intervals, such as one frame per second. This application embodiment does not limit the specific method of frame extraction. Including video frame images as objects of CV analysis expands the selection range of the image set, making the selected image set more comprehensive and the subsequent presentation richer, thus improving the user experience.

[0115] As mentioned above, the result of CV analysis is the identification of image elements, which can include one or more of the following: location, person feature vectors, and semantic feature vectors. It should be noted that when images in the image library are generated, the terminal device also records the image's generation time. Specifically, the image generation time can include the year, month, and day, such as February 15, 2023; it can also include the hour and minute, such as 14:00. The generation time of each image, along with one or more of its location, person feature vectors, and semantic feature vectors, can be associated with that image and stored together with the image in the recommendation database for later use.

[0116] Optionally, after the terminal device completes the CV analysis, the images are clustered by day based on their image elements. Specifically, this can include clustering the semantic feature vectors of the images to obtain a correspondence between various events and dates (generation times). If the image library contains multiple photos of birthday parties, outdoor sports, and paintings on a certain day, then by clustering the semantic feature vectors of the images, three events can be identified: birthday (or birthday party), sports (or outdoor sports), and painting. These three events then correspond to the date of that day.

[0117] The above images are clustered by day based on image elements. This can also include clustering the feature vectors of people in the images to obtain the correspondence between the feature vectors of people and the date (generation time). If the image library contains multiple photos of my partner's birthday party, multiple photos of myself exercising outdoors, and some photos of my young daughter drawing, then by clustering the feature vectors of people in the images, we can obtain the correspondence between the feature vectors of my partner, myself, and my young daughter and the date.

[0118] Optionally, the above-mentioned images are clustered by day based on image elements, and may also include: clustering the image generation locations to obtain multiple correspondences between generation locations and dates (generation times).

[0119] Optionally, the terminal device can also cluster images by day based on various image elements, so that each date can correspond to one or more events, people, and locations.

[0120] For example, if a user's photos involve: the user traveling to scenic spot B1 on date 1, the youngest daughter painting at the cultural center on date 2, and the spouse on a business trip in city C1 on date 3, then the terminal device can generate the following correspondences: date 1 corresponds to the user, scenic spot B1, and travel; date 2 corresponds to the youngest daughter, cultural center, and painting; and date 3 corresponds to the spouse, city C1, and business trip.

[0121] After the terminal device completes the clustering of image elements, it can record the obtained correspondence in the historical event record according to the date and timeline.

[0122] Optionally, historical event records can be dynamically updated during use. For example, when a user takes a new set of travel photos, the terminal device can cluster the newly taken photos to obtain new correspondences between image elements and dates, and update the historical event records.

[0123] In other words, the results of the above clustering can also be expressed as a series of dates on a timeline corresponding to: people, places, and events. For example, historical event records can be formatted as follows: Figure 3 As shown. Figure 3 The report states that on July 1, 2023, at location B1 in the scenic area of ​​City C1, the user took photos covering events including: sightseeing, scenery, lake views, boating, water activities, and a birthday celebration. The photos included two individuals, TagID-1 and TagID-2. No other photos were taken between July 2 and July 7, 2023. On July 8, 2023, the user took some photos in City C1, covering an event including a wedding; however, the people and POI areas in these photos were empty.

[0124] Optionally, the source of the images for clustering by the terminal device can also include screenshots. Optionally, if the image contains text, the terminal device can use the events expressed by the text recognized by Optical Character Recognition (OCR) as the recognized events. For example, if a user takes a screenshot of an email, and the screenshot is clustered to include the characters "Happy Birthday," then the event "Birthday" is identified. Optionally, if the image is a photo of an ID card, the terminal device can use OCR to recognize the text on the ID card photo to obtain the corresponding name (corresponding to a person's feature vector) and birthday (corresponding event).

[0125] Optionally, the dates in the historical event record can be dates that do not include the year, but only the month and day. For example, May 1st, January 1st, etc.

[0126] Optionally, clustering image features can be performed using a pre-trained classification model. The terminal device can input the CV analysis results of each image into the classification model for classification, obtain the image features of each image, and label the image features with their names.

[0127] Optionally, clustering image elements can also be performed using a pre-trained image classification model. This model can also perform CV analysis. The terminal device directly inputs images from the image library into the image classification model for recognition and classification, obtaining the name of each image element and labeling it as the corresponding image. The image label can include any one or more of the following: people, events, and locations. Each label can be one or more, specifically related to the image content itself. For example, if an image contains two faces, then the image can be clustered with two people labels.

[0128] Both the classification model and the image classification model mentioned above can be neural network models.

[0129] Optionally, the terminal device can also recognize text stored in other applications on the terminal device to obtain corresponding events. For example, if a note application stores notes such as "My youngest daughter's birthday is XX year XX month XX day," the terminal device can recognize the note content and generate a corresponding relationship: the youngest daughter's TagID (person), XX year XX month XX day (date), and birthday (event), and then store this relationship in the historical event record. Optionally, the terminal device can also recognize text in applications such as chat logs and emails to obtain the corresponding relationship. This application embodiment does not limit the method of obtaining historical event records.

[0130] After the terminal device generates the above-mentioned historical event records, it can store them in the recommended database or other databases.

[0131] The terminal device can also parse the recommended template according to the configuration file of the recommended template during idle periods. Optionally, the terminal device can pre-install the configuration file of the recommended template locally, or it can download the configuration file of the recommended template from the cloud; this embodiment of the application does not limit this. Optionally, the terminal device can also periodically query whether there is a new configuration file in the cloud. When a new configuration file exists in the cloud, it can download the new configuration file to replace the original configuration file, thereby ensuring that the configuration file is updated in a timely manner.

[0132] Optionally, when downloading a new configuration file, the terminal device can also determine whether it currently supports the execution of the new configuration file. If it does, the terminal device can download the new configuration file to replace the original configuration file. If the terminal device does not currently support the execution of the new configuration file, for example, if the system version installed on the terminal device does not match the configuration file, the terminal device can use the original configuration file for template analysis.

[0133] The configuration information in the above configuration file can be called cloudification parameters, which can be used to describe the recommendation templates. Optionally, the configuration file can include multiple topics. Each topic includes multiple different recommendation templates. The configuration information of each recommendation template includes four components. Specifically, the four components of a recommendation template are: time, location, human, and event. To clearly illustrate the meaning of the configuration information of the recommendation template, an example of a recommendation template is used here:

[0134] Component 1: Time element.

[0135] The configuration information for recommended templates can include time elements. Specifically, time elements can include one or more time descriptive words, each descriptive word being one of the elements of a time element, called a time element. Time descriptive words do not need to use dates; instead, they use colloquial descriptive words, ensuring that the descriptions in the later presentation conform to users' expression habits and improving user experience. For example, time descriptive words (time elements) can include, but are not limited to, one or more of the following: today, yesterday, last weekend, this week, last week, this month, this year, last year, the year before last, New Year's Eve, Spring Festival, Mid-Autumn Festival, Father's Day, Mother's Day, Children's Day, Valentine's Day, Qixi Festival, Christmas, Thanksgiving, wedding anniversary, graduation anniversary, and birthday. The number and types of time elements in the configuration information of different recommended templates can be the same or different.

[0136] Component 2: Location.

[0137] In this embodiment, the location element in the configuration information can be empty. In the actual template parsing process, since locations cannot be exhaustively listed, the location element can be obtained by clustering the generation locations of multiple images obtained from CV analysis. Therefore, compared to listing a large number of existing locations to cover user needs, it is unnecessary to search for invalid locations unrelated to the images in the image library; only the generation locations of the images obtained from image clustering need to be searched, which can effectively narrow the search scope. For example, in the above CV analysis process, if the results of CV analysis of multiple images are clustered, and some images have location C1, some images have location B2, and other images have empty locations, then if the recommended template includes the location element during template parsing, the terminal device can search only by city C1 and location B2, without needing to search for images by searching other locations. The specific template parsing process can be found in the description below, which will not be repeated here.

[0138] Component 3: Character elements.

[0139] The recommended template configuration information also includes a "person element." Specifically, a person element can include descriptive terms for one or more people, each descriptive term being an element of the person element, referred to as a person element. Descriptive terms for people can use colloquial terms, nicknames, names, and descriptions of relationships, including but not limited to: spouse, eldest daughter, youngest son, boyfriend, Zhang San, grandfather, grandmother, maternal grandfather, maternal grandmother, etc. Optionally, the person element in the recommended template configuration information can be empty. In the actual template parsing process, it can be obtained by exhaustively listing the names of people or relationships, or by clustering images. Using image clustering analysis to obtain the elements of the person element is more effective in narrowing the search scope compared to listing a large number of people or relationships. For example, in the above CV analysis process, after clustering the results of CV analysis of multiple images, if all the images contain only the youngest daughter and spouse, then in the template parsing process, only these two people need to be searched, without searching for other people.

[0140] Component 4: Event Element.

[0141] The recommended template configuration information also includes event elements. Specifically, event elements can include one or more event descriptors, each descriptor being an element of the event element, called an event element. The descriptors for event element types can also use colloquial terms, ensuring the descriptions conform to user expression habits and improving user experience. Event element descriptors include, but are not limited to: travel, daily exercise, hobbies, daily gatherings, group photos, food, food preparation process, cats, dogs, pets, travel experiences, travel, happy parties, team building meals, playing music, drawing, singing, dancing, etc., one or more of these. Optionally, since the types of events cannot be exhaustively listed, the event fields in the configuration information can be treated as open fields, passed in by developers during the development phase. In the actual template parsing process, the terminal device can search for images based on the event fields passed in by the developers, a process known as value-based search matching.

[0142] The configuration information for the aforementioned recommendation template also includes a recommendation statement template. This template sets one or more of several element slots. These slots can include: a time slot for time elements, a location slot for location elements, a person slot for person elements, and an event slot for event elements. Once the elements of these four components are filled into their corresponding slots, a complete recommendation statement is generated. It should be noted that the recommendation statement templates differ across different recommendation templates. Even using the same template, different elements will result in different generated recommendation statements. Furthermore, the number, type, and order of element slots vary between different recommendation statement templates.

[0143] Optionally, elements within the same component can also be multiple similar synonyms. For example, elements of an event element can include: travel, play, and outing. When generating recommendation statements, travel, play, and outing can be interchanged or alternated, making the recommendation statements richer and improving the user experience.

[0144] Optionally, multiple element slots may also include modifier slots for filling in modifiers. Based on this, modifier slots in the same recommendation statement template, besides element slots, can also use synonyms or related words interchangeably to conform to everyday language expression habits and ensure differentiated descriptions of the recommendation statements. For example, the recommendation statement template is "Generate %_time% videos of outings". Here, "generate" is the modifier, and the corresponding slot is the modifier slot. Taking "time" as today as an example, the recommendation statement generated by the terminal device would be any one of: Generate videos of today's outings, Create videos of today's playtime, or Generate videos of today's picnic. The position of the modifier slots and the corresponding modifiers in the recommendation statements differ in different recommendation statement templates.

[0145] Optionally, the configuration file may include configuration information for multiple recommendation templates, such as the types of the four components of each recommendation template, the types and number of elements for each component, and whether the recommendation statement template is partially or completely different.

[0146] Based on the meaning of the above configuration information, the following section will detail the template parsing process and the process of matching the atlas based on the results of template parsing, using the element slots in the recommendation statement template as an example.

[0147] This section uses the example of a terminal device searching for images one by one based on the four components of a recommended template's configuration information to obtain an image set that matches the four components. The process includes the following four steps:

[0148] Step 1: Generate an initial keyword combination based on the four components of the configuration information.

[0149] For specific examples of configuration information, please refer to the following:

[0150]

[0151]

[0152] In this configuration, "topic" represents the name of the topic, and each topic can correspond to one or more recommended templates. "_time" represents the time element; "_location" represents the location element; "_human" represents the human element; and "_event" represents the event element. It should be noted that one or more of these components may be empty, but not all of them will be empty, and among the non-empty components, one or more elements can be present. In the example configuration information above, the topic "topic" represents daily Vlogs, "_time" includes the five elements: today, yesterday, last weekend, this week, last week, and this month, "_human" is empty (no element, represented by []), and the element "_event" is travel. In other words, each component can be understood as a defined range. For example, if the time element includes the elements "today, yesterday, and last weekend," then the range of this time element is: today, yesterday, and last weekend.

[0153] Taking the time element as an example, the time element and its corresponding element can be understood as a key-value pair relationship. For example, if the time element includes the elements: today, yesterday, and last weekend, then the resulting key-value pairs can include: time-today, time-yesterday, and time-last weekend.

[0154] Optionally, in the configuration information, if a component is empty, it can be represented by "[]", that is, the recommendation template corresponding to the configuration information does not include the element of the component, and the recommendation statement corresponding to the recommendation template does not have the element slot corresponding to the component (e.g., "_location":[] and "_human":[]" in the example above); if the element of a component is written by passing values ​​from outside, such as the result of image clustering or the result obtained by learning user profiles, it can be represented by "null" (e.g., "title":null" in the example above); if the element of a component uses the descriptive words in the configuration information, it can be represented by "%***%" (where *** represents the category of the component, such as ["%_time%"] and ["%_event%"] in the example above).

[0155] Optionally, the configuration information can also include other components, such as "_argument," which can be used as an extended component. This component can act as an extended variable, enriching the recommendation statement template. The specific types of extended variables can be any one or more of the four types of components mentioned above. Optionally, the number of extended variables can also be one or more. For example: "_argument": [certain little daughter], "sentence": "Generate videos of %_human% and %_argument%%_time% going on an outing". Another example: "_argument": [whole little daughter], where "whole" indicates that the people are the intersection, meaning that the search should retrieve images of the person "human" and his little daughter. Correspondingly, the recommendation statement template includes the corresponding element slots, and the generated recommendation statement contains elements of the extended component.

[0156] Optionally, the configuration information may also include a field for the search strategy, such as "how_", which characterizes the search strategy for the images. If "how_" is "TIME_AXIS", it means that the image set corresponding to the recommended template can be searched from far to near based on the timeline during the search process. This application embodiment does not limit the specific form of the search strategy.

[0157] Optionally, in the configuration information, "sentence" is the recommended statement template. The space between the two % symbols is filled with the element corresponding to the feature slot. "priority" indicates the recommendation priority of the corresponding statement; the smaller the number, the higher the priority.

[0158] Optionally, the same recommendation template may correspond to different recommendation statement templates. For example, a recommendation template might have two different phrases: "sentence": "Generate videos of %_human% and %_argument%%_time% traveling" and "sentence": "Generate videos of %_human% and %_argument% traveling". Based on this, the terminal device can generate a set of recommendation statements for the same recommendation template. This set of recommendation statements can be one or more, with the number of recommendation statements corresponding to the number of recommendation statement templates. When generating recommendation statement templates, the terminal device can prioritize recommendation statements based on their "priority," recommending those with the highest priority first.

[0159] Optionally, the configuration information may also include a field limiting the number of recommended statements, such as "topk". When "topk":1, it means one set of recommended statements is generated. When "topk":3, it means three sets of recommended statements are generated.

[0160] Optionally, the configuration information may also include a scheduling level field, indicating the priority level for parsing the corresponding recommendation template. For example, "level". When "level": 0, it means that the priority level for parsing the corresponding recommendation template is based on other recommendation timings, and will not be triggered based on the background polling strategy of the terminal device, i.e., it will not be triggered during idle periods. When "level" is not 0, it means that the corresponding recommendation template is parsed based on the background polling strategy, such as being triggered during idle periods.

[0161] Optionally, the configuration information may also include a field for the scan interval, such as "scan_interval_hour", which indicates the minimum interval for parsing the recommended template, and can be in hours. For example, "scan_interval_hour":4 means that the recommended template will not repeatedly search the image library within four hours to update the image atlas corresponding to the recommended template.

[0162] Optionally, the configuration information may also include a name field, such as "title", which represents the name of the recommended card when the template is displayed on the desktop. When "title":null, it means that the card name corresponding to the recommended template can be entered as a value.

[0163] The following are the configuration details for several recommended templates for everyday Vlog themes:

[0164]

[0165]

[0166] The following are the configuration details for several recommended templates corresponding to the food collection theme:

[0167]

[0168]

[0169] The above configuration information is just an example. It should be noted that the configuration file can also include more configuration information for recommended templates, which will not be elaborated here.

[0170] Optionally, the elements in the time element above can also be specific dates. When the elements in the time element are specific dates, no conversion is required.

[0171] During template parsing, elements from the four components mentioned above can be used as initial keywords. Then, the image library is queried according to different combinations of these initial keywords to obtain the corresponding image sets. Specifically, the initial keyword combinations can be obtained by combining each element in "_time" with each element in "_location", each element in "_human", and each element in "_event". For ease of description, taking the elements in "_time" (today and yesterday), "_location" (city C1 and attraction B2), "_human" (youngest daughter and lover), and "_event" (painting and dancing) as examples, the generated initial keyword combinations include the following 16 types:

[0172] Today + City C1 + Little Daughter + Dancing;

[0173] Today + City C1 + Little Daughter + Painting;

[0174] Today + City C1 + Lover + Dancing;

[0175] Today + City C1 + Lover + Painting;

[0176] Today + Attraction B1 + Little Daughter + Dancing;

[0177] Today + Scenic Spot B1 + Little Daughter + Painting;

[0178] Today + Attraction B1 + Lover + Dancing;

[0179] Today + Attraction B1 + Lover + Painting;

[0180] Yesterday + City C1 + Little Daughter + Dancing;

[0181] Yesterday + City C1 + Little Daughter + Drawing;

[0182] Yesterday + City C1 + Lover + Dancing;

[0183] Yesterday + City C1 + Lover + Painting;

[0184] Yesterday + B1 of the attraction + my youngest daughter + dancing;

[0185] Yesterday + B1 of the tourist attraction + my youngest daughter + painting;

[0186] Yesterday + B1 of the attraction + my lover + dancing;

[0187] Yesterday + Scenic Spot B1 + My Lover + Painting.

[0188] When any of the four components contains an empty element, it indicates that the recommendation template does not consider empty elements, and therefore, the generated initial keyword combinations will not contain initial keywords corresponding to empty elements. For example, if "_time" includes elements such as "today" and "yesterday," "_location" includes elements such as "city C1," "_human" contains an empty element, and "_event" contains an empty element, then the generated initial keyword combinations will include the following two types:

[0189] Today + City C1;

[0190] Yesterday + City C1.

[0191] Optionally, the number of elements in the above four components can also be other numbers, and the specific composition and number of the resulting initial keyword combinations will vary accordingly, making them impossible to exhaustively list. As long as the same initial keyword combination does not contain two or more elements of the same type of component, and the same initial keyword combination contains one element of a component whose elements are not empty, it is acceptable; further details will not be elaborated here.

[0192] Step 2: Keyword conversion.

[0193] After obtaining the initial keyword combination, the terminal device converts the time-related and person-related keywords within the initial keyword combination. For example, consider the initial keyword combination: Today + City C1 + Little Daughter + Dancing.

[0194] Specifically, the terminal device converts the initial keyword "today" into a specific date. If today's date is February 14, 2024, then the initial keyword "today" is converted to the time period from 0:00:00 to 23:59:59 on February 14, 2024, as the time search keyword. Optionally, if the time keyword in the initial keyword combination is "yesterday," and today is February 14, 2024, then the initial keyword "yesterday" is converted to the time period from 0:00:00 to 23:59:59 on February 13, 2024, as the time search keyword.

[0195] Optionally, when converting time elements in the time element, the time element is described as start time and end time, and optionally, a validity period may also be included.

[0196] For example, the initial keyword "today" is converted to a start time of 0:00:00 on February 14, 2024, and an end time of 23:59:59 on February 14, 2024. Optionally, the validity period corresponding to the initial keyword "today" is 23:59:59 on February 14, 2024.

[0197] The terminal device can also convert the initial keyword "youngest daughter" into the TagID corresponding to the person "youngest daughter". For example, in the photo album, if the TagID corresponding to the youngest daughter's face or body is TagID-1, then the initial keyword "youngest daughter" can be converted into the corresponding TagID-1.

[0198] If the location keywords are cities, attractions, or other locations whose corresponding longitude and latitude can be obtained, then the location keywords do not need to be converted. If the location keywords are manually set addresses, then the location keywords can be converted to the corresponding map address, and the location keywords corresponding to this map address can be obtained. For example, the location keyword is: "My Company". The terminal device, after learning user habits, can obtain the user's workplace as "XX Office Building". The terminal device can then convert "My Company" to the map address "XX Office Building", and then use the keyword "XX Office Building" corresponding to the map address "XX Office Building" as the converted location keyword. This "XX Office Building" is an already identified POI area.

[0199] After keyword conversion, the initial keyword combination described above can be replaced with the converted keywords by the terminal device, thus transforming the initial keyword combination into a corresponding search keyword combination. For example:

[0200] The initial keyword combination: Today + My Company can be converted into the search keyword combination: February 13, 2024, 0:00 to 23:59 + XX Office Building.

[0201] It should be noted that event keywords do not need to be converted.

[0202] When the initial keywords do not need to be converted, such as when the location keywords are cities or attractions, or when the initial keywords are event keywords, the initial keywords can be used as search keywords to form a combination of search keywords to search the image library.

[0203] Step 3: Search the image library based on the converted search keyword combinations to obtain the image sets corresponding to the search keyword combinations.

[0204] Specifically, terminal devices can search for and match images with search keywords in the image library, which will then be used as the image set corresponding to that search keyword combination.

[0205] Let's continue with an example using an initial keyword combination: Today + City C1 + Little Daughter + Dancing. After keyword conversion, the search keyword combination can be obtained as: 0:00 to 23:59 on February 14, 2024 + City C1 + TagID-2 + Dancing.

[0206] The terminal device first searches the image library to obtain all images generated between 0:00 and 23:59 on February 14, 2024, as the first image set. Then, it searches the first image set for all images located in city C1, as the second image set. Next, it searches the second image set for all images with TagID corresponding to TagID-2, as the third image set. Finally, it searches the third image set for all images whose semantic feature vectors match the drawing event, resulting in the fourth image set. Based on this, the terminal device selects the image set corresponding to: Today + City C1 + Little Daughter + Dancing. The images in this set are all photos of the little daughter dancing in city C1 taken between 0:00 and 23:59 on February 14, 2024. Optionally, the order of the four components searched during the process of obtaining the fourth image set can be adjusted. For example, the terminal device first searches for all images whose semantic feature vectors match the event of drawing. Then, it searches for images whose creation time was between 0:00 and 23:59 on February 14, 2024. Next, it searches for images featuring a young daughter. Finally, it searches for images with the location city C1. The order in which the terminal device searches for the four elements is not limited in this embodiment; the only requirement is to select image sets that match all four elements.

[0207] Optionally, when searching the image library, the terminal device can also determine whether an image matches the search keywords in the aforementioned search keyword combination. If so, the image is added to the image set; otherwise, it is not added. The terminal device checks each image individually to determine whether it matches the search keywords in the search keyword combination, thereby generating the required image set.

[0208] It should be noted that the specific process of searching for images that match semantic feature vectors and events can be as follows: The terminal device can traverse the semantic feature vectors of all images to be searched according to the semantic feature vectors describing event elements, such as the semantic feature vector of drawing. If the similarity between the semantic feature vector ClipID-1 corresponding to image 1 and the semantic feature vector of drawing is higher than or equal to a preset similarity threshold, for example, higher than 90%, it means that the image content of image 1 likely contains the event of drawing, and the terminal device determines that the semantic feature vectors of image 1 and drawing match. If the similarity between the semantic feature vector ClipID-2 corresponding to image 2 and the semantic feature vector of drawing is lower than the preset similarity threshold, it means that the image content of image 2 likely does not contain the event of drawing, and the semantic feature vectors of image 2 and drawing do not match. Optionally, the preset similarity threshold can also be other values ​​such as 85% or 80%, and this embodiment does not limit this.

[0209] It should be noted that one or more of the four components of a recommendation template may be empty, such as the location component being empty. When a component is empty, there is no need to search for that component. Additionally, a component of a recommendation template may have multiple elements; for example, the "person" component may include "lover" and "young daughter." When a component has multiple elements, all elements of that component need to be searched. Optionally, AND / OR relationships between multiple elements can be distinguished using symbols. Taking the "person" component as an example, if two elements are written within the same square bracket in the configuration file, such as "human":[["I", "lover"]], it represents "I" and "lover". Therefore, the retrieved images should include both "I" and "lover". If the elements are written within two separate square brackets in the configuration file, such as "human":[["I"], ["lover"]], it represents "I" or "lover". Therefore, the retrieved images may include "I", or any one or both of "lover". Alternatively, other components, such as time, location, and event elements, can also be distinguished by symbols to indicate the AND or OR relationship between multiple elements, which will not be elaborated here.

[0210] Optionally, after the terminal device finds the image set corresponding to the recommended template, it can determine whether the number of images in the image set meets a quantity threshold. The quantity threshold can be a natural number, such as six. If the number of images in the image set is less than the quantity threshold, for example, less than six, it means that the number of images in the searched image set is too small, and the effect of generating a video is not rich enough. Therefore, the image set will no longer be recommended to the user, and the corresponding recommendation statement will not be displayed. The terminal device can then execute a search for the next combination of search keywords. If the number of images in the image set is greater than or equal to the quantity threshold, for example, greater than or equal to six, then the image set can be recommended to the user, and the corresponding recommendation statement can be displayed.

[0211] Optionally, if the image set searched by the terminal device includes multiple frames from a video, these frames can be used as images in the image set to generate a short video. Alternatively, the video segment containing these frames can be extracted, and all frames from this extracted segment can be combined with other images from the image set to generate a short video. It should be noted that the playback order of all frames from the extracted video segment remains unchanged from the original video's playback order in the generated short video to ensure optimal playback quality.

[0212] After keyword conversion, the terminal device can generate a recommendation statement. The specific process for generating the recommendation statement is as follows: the terminal device can fill the initial keywords from the initial keyword combination into the corresponding recommendation statement template, thereby generating the corresponding recommendation statement. This process can be called recommendation statement instantiation. In the configuration information, the recommendation statement template "sentence" is: "Generate a video of %_time%%%_human% at %_location%%%_event%". This recommendation statement template includes a time slot: time, a human slot: human, a location slot: location, and an event slot: event. Each element slot to be filled is distinguished by the symbol %; two consecutive % represent one slot. For example, if the terminal device fills the time "today" into the time slot of the recommendation statement template, the human slot "little daughter" into the human slot, the location slot "attraction B" into the location slot, and the event slot "dancing" into the event slot, the recommendation statement generated is: Generate a video of the little daughter dancing at attraction B today. Optionally, the initial keyword in the above recommended statement template is: %_time%%_human%%_location%%_event%.

[0213] For example, if the recommended statement template "sentence" is: "Generate a video of %_time%%%_event%", this template includes a time slot: time and an event slot: event. Optionally, if the event slot in this template is already filled with "travel", then the recommended statement template "sentence" would be: "Generate a video of %_time% travel". During template parsing, the terminal device can search for the keywords %_time% and travel to obtain the corresponding image set. Simultaneously, it fills the time slot with time information, thus generating the corresponding recommended statement: "Generate a video of today's travel". The initial keyword in this recommended statement template is: %_time%%%_event%.

[0214] Alternatively, the combination of the above search keywords can be implemented using the following five-level for loop:

[0215]

[0216] Based on this, the terminal device can obtain one or more sets of search keyword combinations corresponding to a recommendation template, as well as the image set corresponding to each set of search keyword combinations and the recommendation statement corresponding to each set of search keywords, thus obtaining the template parsing result. The terminal device then stores the template parsing result in the recommendation database. The image set is stored by storing the identifiers (IDs) of the images within the image set.

[0217] When there are configuration information for multiple recommendation templates in the configuration file, the above steps one to three can be executed for the configuration information of each recommendation template to complete the parsing of all recommendation templates and form one or more recommendation statements for each recommendation template and the graph set corresponding to each recommendation statement.

[0218] The method described above, which generates recommendation statements by filling element slots with templates containing element slots, is more flexible than pre-set fixed recommendation statements. The generated recommendation statements conform to users' conversational expression habits, resulting in a better reading experience. Furthermore, the elements within the location and people elements can be clustered from images in the gallery, allowing the generated recommendation statements to vary from user to user, achieving personalized recommendation statements and enhancing the user experience.

[0219] Optionally, the template analysis process mentioned above can also be triggered at other times, such as a fixed time each day. Optionally, the fixed time can be 8:00 AM every day. Optionally, other triggering times can also be the moment when the terminal device first lights up each morning; this embodiment of the application does not limit this.

[0220] Taking 8:00 AM as an example, for instance, the current date, which is February 14, 2024. The terminal device is set to retrieve the query date N days in advance. Optionally, N can be a natural number such as 1, 2, 3, or 5. For example, if the terminal device retrieves the query date three days in advance, the query date retrieved today will be February 17, 2024. If it is set to retrieve the query date one day in advance, the query date retrieved by the terminal device will be February 15, 2024.

[0221] Continuing with the example of retrieving the query date three days in advance, the terminal device retrieves the corresponding historical date based on the month and day of the query date. Optionally, the month and day of this historical date are the same as or similar to the month and day of the query date, for example, it could be February 17th of a previous year. Based on this, the terminal device can query events that occurred on February 17th of previous years and use this information to make recommendations and remind users to avoid missing holidays, anniversaries, etc.

[0222] Optionally, the terminal device can obtain historical dates corresponding to the month and day of the query date, which can also be a range of days adjacent to February 17th of previous years. For example, the range of historical dates could be seven days before February 17th of previous years, or seven days after February 17th of previous years, or even three days before February 17th of previous years to three days after February 17th of previous years. In this embodiment, the range of historical dates obtained based on the month and day of the query date is not limited. Since users' celebrations of certain anniversaries may not be limited to the exact historical date due to personal arrangements, they may also celebrate and take photos in the days before and after February 17th. Therefore, obtaining the range of historical dates corresponding to the month and day of the query date can expand the image search range, thereby avoiding omissions and achieving accurate recommendations.

[0223] Taking the son's wedding on February 17th last year as an example, the user took many photos of the wedding that day. After these wedding photos were clustered using a classification model, the image elements of the son and the wedding were obtained. The terminal device then establishes a correspondence between "son" and "wedding" and February 17th, 2023, storing it in the historical event record. At 8:00 AM on February 14th, 2024, the terminal device retrieves the query date as February 17th, 2024, and the corresponding historical date is February 17th, 2023. The terminal device then queries the aforementioned historical event record and finds that the events corresponding to February 17th, 2023 are "son" and "wedding".

[0224] The terminal device then queries the recommended templates in the aforementioned configuration file based on the names "son" and "wedding," filtering to obtain one or more recommended templates that match the names "son" and "wedding." Specifically, the terminal device can query multiple recommended templates corresponding to the theme of a recommended template in the configuration file, and can also filter other related recommended templates to obtain recommended templates as candidate templates (also known as templates to be recommended).

[0225] The following is an example of the configuration information for two templates to be recommended obtained from the terminal device. The first template to be recommended includes the theme "wedding" in it, and the second template to be recommended is a template for important events (such as graduation ceremonies):

[0226]

[0227]

[0228] For the two templates to be recommended, the user can execute the template parsing process described above to obtain the wedding image set corresponding to the first template and the graduation ceremony image set corresponding to the second template. The terminal device can also refer to the recommendation statement generation method described above to generate the first recommendation statement: "Generate a video of my son's wedding," and the second recommendation statement: "Generate a video of my son's graduation ceremony." Optionally, when multiple templates exist, the terminal device can determine the parsing order of different templates based on their recommendation priorities. For example, if the recommendation priority of the first template is 1 and the recommendation priority of the second template is 2, the terminal device will parse the first template first and generate the first recommendation statement first.

[0229] Optionally, if a high-priority template, after parsing, yields too few images (e.g., fewer than six), it is considered an invalid template. The terminal device can then parse the next lower-priority templates based on their recommendation priority, obtain the corresponding image sets, and generate appropriate recommendation statements. The template parsing process will not be elaborated further here.

[0230] Optionally, the preceding description of an embodiment where the triggering time is a fixed time each day and the query date is a fixed date each year. The attributes of the fixed date can be a birthday, wedding anniversary, or a holiday, such as the Spring Festival, Labor Day, National Day, etc., where the month and day are fixed or relatively fixed. Optionally, the dates used in this application can be Gregorian calendar dates or lunar calendar dates; this embodiment does not limit the specific dates. For example, the Spring Festival and Lunar New Year's Eve can use lunar calendar dates.

[0231] In this embodiment, the terminal device analyzes and clusters images, and makes timely and accurate recommendations to users based on a timeline. It can accurately recommend events even on floating dates that are not fixed holidays, promptly reminding users not to miss the corresponding key dates and improving the user experience.

[0232] Optionally, in this embodiment, the triggering time for recommending to the user can also be the time when a new event is generated. For example, if the terminal device queries the image library at a fixed time each day, such as 18:00 every evening, and many new images have been added to the image library that day, then CV analysis and clustering of the new images can be initiated to obtain the corresponding events. For example, if the user went on a trip that day and took many pictures, the image library's clustering of the newly taken pictures will include "trip" as an event. The terminal device can then filter out recommendation templates related to the trip as recommendation templates based on the name of the "trip" event in the configuration file, and then make recommendations based on the recommendation templates. In other words, the user's current trip can trigger recommendations for the previous trip, making it easier for the user to recall previous trip experiences and improving the user experience.

[0233] Optionally, in this embodiment, the triggering time for recommending to the user can also be when the location located by the terminal device is different from the user's usual residence. For example, when the terminal device obtains that its current location is not at the user's usual residence (including the user's home and company), and the user stays at the current location for more than a certain period of time, such as more than half an hour, the terminal device determines that the user is not just passing by, but is exploring the current location. The terminal device can then trigger a recommendation for the travel event. Optionally, the user's usual residence can be a user profile obtained by the terminal device from learning the user's behavior, which will not be elaborated here.

[0234] Optionally, the terminal device can also trigger a travel event recommendation when it obtains that the current location is not the user's usual residence and the current location is scenic spot B1.

[0235] For example, if a terminal device detects that the current location is not the user's usual residence, and the current location is scenic spot B1, it triggers a recommendation for an event that occurred during a previous visit to the same location, scenic spot B1. Specifically, the terminal device can obtain a template related to the trip. Then, based on the event element "trip" and the location element "scenic spot B1" in the template, it generates a corresponding initial keyword combination. Afterward, it performs keyword replacement and image library search based on the generated initial keyword combination, thereby obtaining one or more recommendation statements and corresponding image sets. For example, if the time element in the recommendation template obtained by the terminal device includes "last month" and "last year," then the initial keyword combination can include: "scenic spot B1 + last month + trip," and "scenic spot B1 + last month + last year." The terminal device can then search the image library based on these two initial keyword combinations to obtain the corresponding image sets and make recommendations.

[0236] It should be noted that triggering a recommendation for a certain event means triggering the parsing of the template to be recommended corresponding to that event, thereby obtaining the corresponding image set, generating a recommendation statement, and displaying the corresponding desktop recommendation card.

[0237] To clearly describe the recommendation scenarios, the correspondence between the definitions of recommendation scenarios and configuration information is explained in detail here, referring to Tables 1 to 3:

[0238] Table 1

[0239]

[0240] Table 2

[0241]

[0242]

[0243] Table 3

[0244]

[0245]

[0246] In Tables 1-3 above, "Portrait Dependence" represents the source of the corresponding scene, "Card Title" is the name of the corresponding scene displayed on the desktop recommendation card, "Recommendation Timing" represents the timing of the recommendation of the corresponding scene, "time" is the time when the corresponding scene is recommended, "time_start" is the start time of the scene, "time_end" is the end time of the scene, "time_expire" is the expiration time of the scene, "human" represents the person corresponding to the scene, "person_id" represents the feature vector of the person corresponding to the scene, "location_city" represents the location of the scene, "location_poi" represents the POI area of ​​the scene, "Recommendation Statement" represents the recommendation statement of the scene, and "Recommendation Topic" represents the topic of the scene (corresponding to the topic in the configuration file).

[0247] The descriptions in Tables 1-3 above are merely examples and are not intended to limit the technical solutions of this application.

[0248] To clearly describe the template parsing process of this application embodiment, combined with Figure 4 The interaction diagram shown is described in detail. For example... Figure 4 As shown, it includes:

[0249] S301. The user uses the camera application to take pictures or videos.

[0250] S302. The camera application responds to the user's shooting action, generates images or videos, and records the generation time and location information of the images or videos.

[0251] S303. The camera application sends images and / or videos, along with the time and location information of their creation, to the gallery for storage.

[0252] S304. During idle periods, the image library performs CV analysis and daily clustering on frame images of pictures and videos to obtain image features and scene parameters.

[0253] Optionally, the gallery can also cluster the locations where images were generated to obtain location elements.

[0254] Specifically, the scene parameters can be the events obtained from clustering, and the names of the events obtained from clustering can be the labels of the corresponding images.

[0255] S305. After analyzing and clustering all images and frames, the gallery sends a start command to the media recommendation generation engine.

[0256] Specifically, the startup command carries scene parameters, and this startup service is used to launch the media recommendation generation engine.

[0257] S306. In response to the startup command, the media recommendation generation engine sends an initialization command to the recommendation template parser.

[0258] S307. In response to the initialization directive, it is recommended that the template parser be initialized.

[0259] Specifically, the process of initializing the recommended template parser involves obtaining a configuration file. Optionally, the configuration file can be a JSON file. The configuration file includes the configuration information for the recommended templates. For a detailed description of the configuration information, please refer to the preceding text; it will not be repeated here.

[0260] S308. After the template parser initialization is complete, it returns an initialization completion message and a configuration file (or configuration information in the configuration file) to the media recommendation generation engine.

[0261] Optionally, if the recommendation template parser has not completed initialization, it is not necessary to send a message returning initialization complete, or to return a message returning initialization incomplete to the media recommendation generation engine.

[0262] S309. In response to the initialization completion message, the media recommendation generation engine selects at least one template to be recommended from the configuration file (or configuration information) based on the scene parameters and executes the template parsing process.

[0263] The template parsing process includes: repeatedly executing steps S310 to S317 for each template to be recommended based on its configuration information.

[0264] S310. The media recommendation generation engine splits the recommendation statement template in the configuration information into at least one initial keyword combination according to the four element slots and the elements of at least one of the four component elements.

[0265] It should be noted that the split recommendation statement template is based on the element slots corresponding to the four constituent elements. Each initial keyword combination resulting from the split includes at least one initial keyword. Taking one set of initial keyword combinations as an example, each initial keyword in a set of initial keyword combinations corresponds to an element in one of the four constituent elements.

[0266] The terminal device executes steps S311 to S317 for each initial keyword group. Taking an initial keyword group as an example, the initial keyword group includes at least one initial keyword.

[0267] S311. The media recommendation generation engine performs keyword transformation on at least one initial keyword to obtain at least one search keyword.

[0268] It should be noted that initial keywords that do not require conversion can be used as corresponding search keywords.

[0269] S312. The media recommendation generation engine sends a search command to the image library, the search command carrying at least one search keyword.

[0270] S313. The image library searches for images in the image library using at least one search keyword to obtain the corresponding image set.

[0271] The image elements in the image set match at least one search keyword. For example, the image in the image set was generated at a time within the time period indicated by the time search keyword in at least one search keyword; or the image in the image set was generated at a location indicated by the location search keyword in at least one search keyword.

[0272] S314. The image library uses the identifiers of images in the image collection as search results and returns them to the media recommendation generation engine.

[0273] S315. The media recommendation generation engine determines whether the number of images in the image set is greater than six based on the search results.

[0274] If the number of images in the image set is greater than or equal to six, then execute S316; if the number of images in the image set is less than six, then continue to execute the template parsing process for the next template to be recommended.

[0275] S316. The media recommendation generation engine instantiates recommendation statements.

[0276] Specifically, the media recommendation generation engine fills at least one of the above initial keywords into the corresponding element slots of the template for the recommended statement, thus completing the assembly of the recommended statement, which is to realize the instantiation of the recommended statement.

[0277] S317. The media recommendation generation engine sends the recommendation statement generated by at least one initial keyword and the search-obtained graph to the recommendation database for storage.

[0278] Optionally, the image set sent by the media recommendation generation engine can be a set of identifiers for images in the image set; alternatively, the media recommendation generation engine can also send the identifiers for images in the image set used as covers; alternatively, the media recommendation generation engine can also send assembled recommendation statements.

[0279] The set of image identifiers in the above image collection, the identifier of the cover image, and the recommendation statements can all be persistently stored in the recommendation database.

[0280] Optionally, if the terminal device retrieves two images of the son's wedding based on the first template to be recommended, then the first template is invalid. The parsing process for the second template can then be executed to obtain the corresponding graduation ceremony video, and instantiate it to generate the recommendation statement: "Generate the son's graduation ceremony video."

[0281] S318. The media recommendation generation engine sends display instructions to the desktop service.

[0282] The display instruction indicates that the media recommendation generation engine has successfully parsed the template to be recommended and successfully obtained the corresponding image set. The display instruction also carries the template title of the parsed template to be recommended. Optionally, the display instruction may also carry the cover image of the parsed template to be recommended.

[0283] After all the templates to be recommended have been parsed, the media recommendation generation engine can execute S320 and subsequent processes.

[0284] S319. Desktop Services displays recommended desktop cards.

[0285] The desktop recommendation card displays the title of the template to be recommended. For example, if the terminal device successfully parses the first template to be recommended, the desktop recommendation card will display the title: "Son's Wedding".

[0286] Optionally, the desktop recommendation card can also display the cover of the obtained image set as the card background.

[0287] S320. Media Recommendation Generation Engine End Process.

[0288] It should be noted that this application does not limit the execution order of S319 and S320, which are executed separately by the desktop service and the media recommendation generation engine, without conflict.

[0289] Optionally, if an anomaly occurs during the CV analysis process, such as a sudden change in the charging / screen-off state, indicating that the user may need to use the terminal device, the image library can send a termination command to the media recommendation generation engine. The media recommendation generation engine responds to the termination command by ending the template parsing process, thereby releasing resources to ensure the user can use the terminal device normally.

[0290] Optionally, after completing CV analysis and clustering, the library can also send a termination command to the media recommendation generation engine, instructing the media recommendation generation engine to release resources.

[0291] The above Figure 4 The implementation principles and technical effects of each step in the interactive diagram shown can be found in the previous text, and will not be repeated here.

[0292] After the terminal device completes the parsing of the recommended template, it can recommend corresponding statements to the user when the user interacts with the gallery, specifically including:

[0293] When a user opens the gallery, the terminal device displays the gallery's homepage interface, for example... Figure 5 As shown in Figure a. In Figure 5 The gallery homepage interface, shown in image a, includes a "Smart Photo" card. The homepage also includes other cards such as "One-Click Masterpiece," "Editing," and portrait thumbnails. At the bottom of the homepage interface are icons for several tabs, including: Photos, Albums, Moments, and Creations. Users can access different gallery interfaces by clicking on different tab icons.

[0294] When a user clicks the "Smart Photo Generation" card on the gallery homepage, the Smart Photo Generation function is activated. The terminal device can display images such as... Figure 5 The first-level page of the "Smart Projection" section, shown in image b, displays multiple recommendation quotes. Figure 5 Figure b in the example shows three recommendation statements. Each recommendation statement entry also displays a thumbnail of the corresponding cover image. Optionally, if the cover image is not defined in the image set corresponding to the recommendation statement, the recommendation statement entry may not display any image thumbnail; only the text of the corresponding recommendation statement needs to be displayed, for example... Figure 6 As shown in Figure a. Alternatively, as... Figure 5 Figure b in the middle and Figure 6 As shown in Figure a, on the first-level page of Smart Integration, a prompt can also be displayed above the recommended quotes.

[0295] by Figure 5 Taking image b as an example, the first-level page of the "Smart Integrated Display" also includes theme switching controls, such as "More Skills," and recommendation statement switching controls, such as "Change." When a user clicks the recommendation statement switching control, the terminal device can switch the recommendation statement. For example, when a user clicks the recommendation statement switching control, the terminal device can switch the recommendation statement. Figure 5 Clicking the "Change" control in image b will display the following on the terminal device: Figure 7 The recommended statements shown.

[0296] Users can click on a recommendation statement on the Smart Film page to enter a secondary page of Smart Film, for example... Figure 8 As shown. The secondary page of the smart image gallery can be displayed in a dialog format, including recommended statements and the response statements generated by the terminal device in response to the recommended statements, as well as cards for the image galleries corresponding to the recommended statements. Optionally, the image gallerie cards may include thumbnails of multiple images in the gallery; they may also include controls for displaying all images, such as "View All"; and they may include video generation controls, such as "Generate Video". When the user clicks the control for displaying all images, the terminal device displays all or part of the images in the gallery. Optionally, the control for displaying all images may also display the number of images in the gallery. When the user clicks the video generation control, the terminal device generates a short video from the images in the gallery according to the recommended template corresponding to the recommended statement. The text, display effects, watermark, and background music in the short video are defined by the corresponding recommended template.

[0297] When a user clicks the theme switching control on the main page of Smart Image Generation, the terminal device displays the theme selection interface, for example... Figure 6 As shown in Figure b, the theme selection interface includes cards for multiple themes, such as daily vlogs, personal photos, and family portraits. Clicking on any theme card displays a recommended quote for that theme. For example, clicking... Figure 6 When the card for the travel vlog theme in image b is displayed, the terminal device will show multiple recommended statements corresponding to the travel vlog theme, such as... Figure 8 As shown. Users can... Figure 8 On the secondary page shown, users can select the desired recommendation phrase to generate a corresponding short video. The terminal device can play, store, and forward this short video. This enriches the ways to browse and share images, enhancing the user experience.

[0298] Optionally, the recommended statements can be displayed on the secondary page according to their priority. For example, when the secondary page is first displayed, the three highest-priority recommended statements are shown. When the user clicks "Change," the three recommended statements with lower priority than the third highest-priority statement are then displayed. Optionally, the priority of the recommended statements can be based on the number of images in the corresponding image set. The more images in the image set, the higher the priority of the corresponding recommended statement; the fewer images in the image set, the lower the priority of the corresponding recommended statement. Optionally, the priority of the recommended statements can also be determined based on the update time of the recommendation template corresponding to the recommended statement. The more recent the update time of the recommendation template, the higher the priority of the corresponding recommended statement; the more distant the update time of the recommendation template, the lower the priority of the corresponding recommended statement. Optionally, if a recommended statement exists in the history of recommended statements, it means that the recommended statement has already been recommended to the user, and the priority of that recommended statement is reduced, while the priority of other unrecommended recommended statements is increased. This can improve the differentiation of the recommended statements, making the generated short videos more differentiated and enriching the user experience.

[0299] In this embodiment, when a user activates the smart video creation function, the terminal device can automatically display recommended statements, guiding the user to generate a short video corresponding to the recommended statement. Optionally, the user can also input similar statements via voice or text based on the guidance of the recommended statements. The terminal device can then perform semantic recognition on the user's input statements to obtain the initial keyword combination corresponding to the statements. Then, it performs keyword conversion on the initial keywords in the initial keyword combination to obtain the corresponding search keyword combination. The terminal device can search the image library based on this search keyword combination to obtain the image set corresponding to the user's input statement and display it. The display method can be seen in... Figure 8 The dialogue format shown here uses user-inputted statements as the recommended phrases. For details regarding the acquisition of initial keyword combinations, keyword conversion, and searching the gallery based on these keyword combinations, please refer to the preceding descriptions; they will not be repeated here.

[0300] Optionally, the above-described CV analysis process can also be executed after the user clicks on "Smart Image Generation". This application does not limit this approach.

[0301] Optionally, the interface for displaying desktop recommendation cards on the terminal device may also refer to, for example, Figure 9 As shown in Figure a. Users can also... Figure 9 In the desktop recommendation card shown in Figure a, clicking the control to activate the Smart Video Creation function, such as "Create Video," allows the terminal device to access... Figure 9 The second-level page for smart integration is shown in Figure b. Users can also... Figure 9In the interface shown in Figure b, clicking the back control will display the following on the terminal device: Figure 9 The desktop shown in Figure a includes recommended desktop cards. Further descriptions of this secondary page can be found above and will not be repeated here.

[0302] Figure 10 A flowchart illustrating a method for acquiring an atlas provided in an embodiment of this application. The method includes:

[0303] S1001. Obtain historical event records. Historical event records include various historical image elements and the correspondence between various historical dates. The various historical image elements include one or more of the following: the location of generation, the person's identifier, and the location of generation.

[0304] Optionally, the types of historical image elements may include one or more of the following: generation location, person identifier, and generation location. Each type of historical image element may contain one or more elements. Each image that generates a historical image element corresponds to its own generation time. Taking a single image as an example, the correspondence between all image elements and the generation time (date of generation) forms a set of correspondences in a historical event record. Optionally, while the correspondence is based on days, the time unit for the correspondence can also be weeks, months, years, or several years (e.g., the last three years), or a combination of different time units (e.g., the Spring Festival in the last three years). This application does not limit this.

[0305] S1002. Obtain at least one image element to be recommended from historical event records that corresponds to the current date.

[0306] Optionally, if the current date is February 14, 2024, the terminal device can obtain the date February 17, which is the third day after February 14 in previous years, and then query the historical image elements corresponding to February 17 in previous years (such as last year, the year before last, or the last three years) in the historical event record as image elements to be recommended.

[0307] If the terminal device finds no image elements to be recommended, no recommendation will be made.

[0308] S1003. Based on at least one image element to be recommended, select at least one template to be recommended from multiple recommended templates that corresponds to at least one image element to be recommended.

[0309] The terminal device searches its configuration file based on at least one image to be recommended, and selects at least one template to be recommended from multiple recommendation templates. Optionally, if the topic of a recommendation template includes all or part of the elements of the image to be recommended, then the recommendation template corresponding to that topic can be determined as the template to be recommended.

[0310] If no matching template is found on the terminal device, no recommendation will be made.

[0311] S1004. Based on the constituent elements of the first template to be recommended, select a first set of images from the image library that matches the constituent elements of the first template to be recommended. The first template to be recommended is any one of at least one template to be recommended.

[0312] Taking any first recommended template from at least one recommended template as an example, the terminal device can query the image library for images that match the constituent elements of the first recommended template, and use them as the first image set corresponding to the first recommended template.

[0313] Matching the constituent elements of the first template to be recommended means that the image elements of the image match one or more elements of at least one constituent element of the first template to be recommended. For example, if the image's generation time matches "last month" in the time element of the first template to be recommended, then the terminal device can search for images obtained last month as the first image set. See the description above for details, which will not be repeated here.

[0314] In this embodiment, the terminal device analyzes and clusters images, and makes timely and accurate recommendations to users based on a timeline. It can accurately recommend events even on floating dates that are not fixed holidays, promptly reminding users not to miss the corresponding key dates and improving the user experience.

[0315] In some possible implementations, the difference in the number of days between the first historical date corresponding to the first image element to be recommended and the first query date corresponding to the first historical date is less than or equal to a preset number of days threshold. The first image element to be recommended is any one of at least one image element to be recommended. The first historical date is the historical date corresponding to the first image element to be recommended from multiple historical dates. The first query date is N days later than the current date, where N is a natural number.

[0316] The difference in the number of days between the first historical date and the first query date corresponding to the first historical date is less than or equal to a preset number of days threshold. Here, the number of days difference can disregard the year and only consider the month and day.

[0317] Taking N as an example, the month and day of the historical date are the same as or similar to the month and day of the query date. For example, today is February 14, 2024, and the query date can be February 17, 2024. Based on this, the terminal device can query historical dates, such as events that occurred on February 17th of previous years (last year or the year before), and use this information to make recommendations and remind users to avoid missing holidays, anniversaries, etc.

[0318] Optionally, the terminal device can obtain historical dates corresponding to the month and day of the query date, which can also be a range of days adjacent to February 17th of previous years. For example, the range of historical dates could be seven days before February 17th of previous years, or seven days after February 17th of previous years, or even three days before February 17th of previous years to three days after February 17th of previous years. In this embodiment, the range of historical dates obtained based on the month and day of the query date is not limited. Since users' celebrations of certain anniversaries may not be limited to the exact historical date due to personal arrangements, they may also celebrate and take photos in the days before and after February 17th. Therefore, obtaining the range of historical dates corresponding to the month and day of the query date can expand the image search range, thereby avoiding omissions and achieving accurate recommendations.

[0319] In some possible implementations, the theme of the first template to be recommended contains the first image element to be recommended.

[0320] Specifically, the terminal device searches multiple templates in the configuration file based on the first image element to be recommended, and selects the recommended template whose theme contains the first image element to be recommended as the recommended template. Optionally, the terminal device can search multiple image elements to be recommended one by one from historical dates to obtain a recommended template that contains some or all of the multiple image elements to be recommended.

[0321] In some possible implementations, the constituent elements of the first template to be recommended include at least one of the following: time element, location element, person element, and event element. Based on the constituent elements of the first template to be recommended, a first image set matching the constituent elements of the first template to be recommended is selected from the image library, including: generating at least one set of search keyword combinations based on the constituent elements of the first template to be recommended; searching the image library based on at least one search keyword in the first search keyword combination to obtain a first image set matching at least one search keyword, wherein the first search keyword combination is any one of the at least one set of search keyword combinations.

[0322] The specific process by which the terminal device generates the corresponding image set based on the components of the recommended template can be found in the relevant description above, and will not be repeated here.

[0323] In some possible implementations, the method also includes displaying desktop recommendation cards. These cards include card names that correspond to the title of the first template to be recommended.

[0324] Specifically, the terminal device can generate a card name by filling in elements in the title or receiving external parameters. The terminal device can also generate desktop recommendation cards and display them in the top area of ​​the screen. The title is defined in the configuration information as "title". When "title": null, it indicates that external parameters are used for generation. Optionally, it can also be "title": %human% of %event%, or %human% of birthday. The terminal device fills the "title" with the element corresponding to "human": Qiuqiu, and the element corresponding to "event": birthday, generating the corresponding card name: Qiuqiu's birthday, which is displayed in the desktop recommendation cards. Optionally, the title here is an example; the actual title can be different combinations of different types of constituent elements, and each constituent element can be filled with different elements to obtain the corresponding card name, which will not be elaborated here.

[0325] In some possible implementations, the background image of the desktop recommendation card is an image generated based on the cover of the first image set.

[0326] Optionally, the cover of the image set can be selected from multiple images in the set. Optionally, the terminal device can crop the cover. For example, the terminal device can identify the area containing the person in the cover and then crop out a rectangle containing the smallest possible area of ​​the person. Then, the terminal device scales this rectangular area to generate a card with the same or similar size as the desktop card, which is then displayed as the background image of the desktop recommendation card. This ensures that the desktop recommendation card clearly displays the people involved in the corresponding image set, improving the user experience.

[0327] In some possible implementations, the method further includes: receiving a first operation input by a user to a first control in a desktop recommendation card; and in response to the first operation, displaying a first interface, the first interface including icons corresponding to the first image set.

[0328] Specifically, the desktop recommendation cards include the first control, for example... Figure 9 The "Creating Video" section is shown in Figure a. When the user performs the first action by clicking the first control, the terminal device enters the Smart Video Creation mode and displays the first interface. This first interface can be seen in... Figure 9 As shown in Figure b. Regarding Figure 9 For a description of graph b in the previous text, please refer to the section on... Figure 8 The relevant descriptions are the same, except for the content displayed; they will not be repeated here. Optionally, when the user clicks... Figure 9 When the return control in Figure b is accessed, the terminal device returns to displaying the desktop, for example, as shown below. Figure 9 Figure a shows the interface containing desktop recommendation cards.

[0329] In some possible implementations, the method further includes: generating a first recommendation statement based on the first recommendation statement template of the first recommendation template, and the first interface also includes the first recommendation statement.

[0330] The detailed description of how the terminal device generates the first recommended statement based on the first recommended statement template in the first recommended template can be found in the previous description of generating recommended statements, and will not be repeated here. After the recommended statement is generated, if the user clicks the screen to enter the first interface, the first recommended statement can also be displayed on the first interface. Optionally, other recommended statements can also be displayed on the first interface. The strategy for displaying recommended statements can also be found in the previous description, and will not be repeated here.

[0331] In some possible implementations, the first interface also includes a second control, and the method further includes: receiving a second operation input by the user to the second control; in response to the second operation, generating a video file containing a first image set according to a first template to be recommended; and playing and / or storing the video file.

[0332] Specifically, the first interface also includes a second control, such as "Generate Video". When the user performs a second operation on the second control, i.e., clicks "Generate Video", the terminal device generates a corresponding video file (the short video mentioned earlier) from the images in the first image set according to the first recommendation template corresponding to the first recommendation statement. The text, display effects, watermark, and background music in this video file are defined by the corresponding first recommendation template. The terminal device can play the video file, and can also store and forward it. This enriches the ways to browse and share images, enhancing the user experience.

[0333] In some possible implementations, before displaying the desktop recommendation card on the desktop, the method further includes: if the number of images in the first image set does not meet the preset quantity requirement, then according to the constituent elements of the second recommendation template, a second image set matching the second recommendation template is selected from the image library; wherein, the second recommendation template is a recommendation template that is different from the first recommendation template among at least one recommendation template, and the recommendation priority of the second recommendation template is lower than that of the first recommendation template.

[0334] Optionally, if the number of images in the first image set does not meet the preset requirement, for example, less than six images, the terminal device will filter out a second image set from the image library that matches the second recommended template, based on the components of the second recommended template with a priority lower than the first recommended template. Optionally, if the second image set still does not meet the preset requirement, the device will continue to filter out a third image set from the image library that matches the third recommended template, based on the components of the third recommended template with a priority lower than the second recommended template, and so on, until an image set that meets the preset requirement is selected. Optionally, the preset requirement can also be other natural numbers such as 10 or 20, and this embodiment of the application does not limit this.

[0335] In some possible implementations, the method also includes: detecting multiple newly added images in the image library; analyzing and clustering the multiple newly added images to obtain the image elements of the newly added images; and selecting at least one recommendation template corresponding to the image elements of the newly added images from multiple recommendation templates based on one or more of the image elements of the newly added images.

[0336] Optionally, in this embodiment, the triggering time for recommending to the user can also be the time when a new event is generated. For example, if the terminal device queries the image library at a fixed time each day, such as 18:00 every evening, and many new images have been added to the image library that day, then CV analysis and clustering of the new images can be initiated to obtain the corresponding events. Then, based on the obtained events, a recommendation template is retrieved to obtain at least one template that matches the newly generated event. The method by which the terminal device retrieves the template matching the event can be found in the relevant description above, and will not be repeated here. The terminal device can then make recommendations based on at least one template. This method can automatically trigger template recommendations based on newly added images, making the recommended content match the user's behavior, facilitating the user's recall of previous travel experiences, and improving the user experience.

[0337] In some possible implementations, the method further includes: when it is detected that the current location does not match the user's permanent residence, and the duration of stay at the current location exceeds a preset duration threshold, then it is determined that at least one image element to be recommended includes the travel event; based on the travel event, at least one template to be recommended corresponding to the travel event is selected from multiple recommendation templates.

[0338] For example, if a terminal device detects that the current location is not at the user's usual residence (including home and office), and the user remains at that location for more than a certain period of time, such as more than half an hour, the terminal device determines that the user is not just passing through, but is actually exploring the current location. The terminal device can then automatically trigger recommendations for travel events based on the change in location, making it easier for users to recall previous travel experiences and improving the user experience.

[0339] In some possible implementations, the method further includes: when it is detected that the current location and the user's permanent residence do not match, and the current location is one of the generated locations among multiple historical image elements, then it is determined that at least one image element to be recommended includes the travel event and the current location; based on the travel event and the current location, at least one template to be recommended corresponding to the travel event and / or the current location is selected from multiple recommendation templates, and the location element in at least one template to be recommended is the current location.

[0340] For example, if the terminal device detects that the current location is not the user's usual residence, and the current location is scenic spot B1, it triggers a recommendation for events related to a previous trip to scenic spot B1 at the same location. Specifically, the terminal device can obtain a template for recommendations related to the trip. Then, based on the event element "trip" and the location element "scenic spot B1" in the template, it generates corresponding initial keyword combinations. Afterwards, it performs keyword replacement and image library search based on the generated initial keyword combinations, thereby obtaining one or more recommendation statements and corresponding image sets. For example, if the time element in the recommendation template obtained by the terminal device includes "last month" and "last year," then the initial keyword combinations can include: "scenic spot B1 + last month + trip," and "scenic spot B1 + last month + last year." The terminal device can search the image library based on these two initial keyword combinations, obtain the corresponding image sets, and make recommendations. The terminal device can automatically trigger recommendations for trip events based on changes in location, making it easier for users to recall previous trip experiences and improving the user experience.

[0341] In some possible implementations, at least one image element to be recommended that matches the current date is obtained from historical event records, including: when the screen is first turned on on the indicated current date, at least one image element to be recommended is obtained from historical event records.

[0342] When a terminal device first lights up each day, it can retrieve at least one image element to be recommended from historical event records, thereby initiating the recommendation process.

[0343] In some possible implementations, obtaining historical event records includes: analyzing multiple images in a photo library to obtain image elements of the multiple images, including one or more of the following: generation time, generation location, person feature vector, and semantic feature vector, where the semantic feature vector is used to characterize the image content; and clustering the image elements of the multiple images according to date to obtain historical event records.

[0344] The generation method for historical event records can be found in the previous description and will not be repeated here. Multiple images in the terminal device's image library are analyzed to obtain image elements. These image elements are then clustered by date to generate historical event records. This enables the recommendation of relevant image sets to users based on time, avoiding the omission of important dates and improving the user experience.

[0345] The foregoing has detailed examples of the methods provided in this application. It is understood that the corresponding apparatus, in order to achieve the above functions, includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware 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.

[0346] This application can divide the atlas acquisition device into functional modules based on the above method example. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this application is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.

[0347] Figure 11 A schematic diagram of a picture atlas acquisition device provided in this application is shown. The device 1100 includes:

[0348] The acquisition module 1101 is used to acquire historical event records. The historical event records include various historical image elements and the correspondence between various historical dates. The various historical image elements include one or more of the following: the location of generation, the person's identifier, and the location of generation.

[0349] The query module 1102 is used to retrieve at least one image element to be recommended from historical event records that corresponds to the current date.

[0350] The filtering module 1103 is used to filter at least one recommended template corresponding to at least one recommended image element from multiple recommended templates based on at least one recommended image element.

[0351] Search module 1104 is used to filter out a first set of images from the image library that matches the constituent elements of the first template to be recommended, based on the constituent elements of the first template to be recommended; wherein the first template to be recommended is any one of at least one template to be recommended.

[0352] The specific method by which device 1100 performs the atlas acquisition method and the beneficial effects thereof can be found in the relevant descriptions in the method embodiments, and will not be repeated here.

[0353] This application also provides an electronic device, including the processor described above. The electronic device provided in this embodiment may be... Figure 1 The terminal device 100 shown is used to execute the above-described atlas acquisition method. When using integrated units, the terminal device may include a processing module, a storage module, and a communication module. The processing module can be used to control and manage the actions of the terminal device; for example, it can support the terminal device in executing the steps performed by the display unit, detection unit, and processing unit. The storage module can support the terminal device in executing stored program code and data. The communication module can support communication between the terminal device and other devices.

[0354] The processing module can be a processor or a controller. It can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination of functions that implement computing capabilities, such as a combination of one or more microprocessors, a digital signal processor (DSP), and a microprocessor, etc. The storage module can be a memory. The communication module can specifically be a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, or other devices that interact with other terminal devices.

[0355] In one embodiment, when the processing module is a processor and the storage module is a memory, the terminal device involved in this embodiment can be a device having... Figure 1 The device with the structure shown.

[0356] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the atlas acquisition method described in any of the above embodiments.

[0357] This application also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the atlas acquisition method described in the above embodiments.

[0358] In this embodiment, the electronic device, computer-readable storage medium, computer program product or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.

[0359] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus 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 device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between devices or units. The replaced units may or may not be physically separate. The component shown as a unit may be one physical unit or multiple physical units, that is, it may be located in one place or distributed in multiple different places. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0360] Furthermore, the functional units in the various embodiments of this application 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.

[0361] 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 readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0362] 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 that can be easily conceived by those skilled in the art within the scope of the technology 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 acquiring image atlases, characterized in that, include: Acquire historical event records, which include various historical image elements and correspondences between various historical dates. The various historical image elements include one or more of the following: the location of generation, the person identifier, and the image content. Obtain at least one image element to be recommended that corresponds to the current date from the historical event records; Based on the at least one image element to be recommended, at least one template to be recommended corresponding to the at least one image element to be recommended is selected from multiple recommendation templates; Based on the constituent elements of the first template to be recommended, a first image set that matches the constituent elements of the first template to be recommended is selected from the image library; Wherein, the first template to be recommended is any one of the at least one template to be recommended; The first template to be recommended comprises at least one of the following elements: time, location, people, and event. The step of selecting a first image set from the image library that matches the elements of the first template to be recommended, based on these elements, includes: Based on the constituent elements of the first template to be recommended, generate at least one set of search keyword combinations; Search the image library based on at least one search keyword from the first search keyword combination to obtain the first image set that matches the at least one search keyword, wherein the first search keyword combination is any one of the at least one set of search keyword combinations.

2. The method according to claim 1, characterized in that, The difference in the number of days between the first historical date corresponding to the first image element to be recommended and the first query date corresponding to the first historical date is less than or equal to a preset number of days threshold. The first image element to be recommended is any one of the at least one image element to be recommended. The first historical date is the historical date corresponding to the first image element to be recommended among the plurality of historical dates. The first query date is N days later than the current date, where N is a natural number.

3. The method according to claim 2, characterized in that, The first template to be recommended contains the first image element to be recommended.

4. The method according to claim 1, characterized in that, The method further includes: A desktop recommendation card is displayed on the desktop. The desktop recommendation card includes a card name, and the card name corresponds to the title of the first template to be recommended.

5. The method according to claim 4, characterized in that, The background image of the desktop recommendation card is an image generated based on the cover of the first image set.

6. The method according to claim 4, characterized in that, The method further includes: Receive a first operation input by the user to the first control in the desktop recommendation card; In response to the first operation, a first interface is displayed, which includes the icon corresponding to the first image set.

7. The method according to claim 6, characterized in that, The method further includes: Based on the first recommendation statement template of the first recommendation template, a first recommendation statement is generated, and the first interface also includes the first recommendation statement.

8. The method according to claim 7, characterized in that, The first interface also includes a second control, and the method further includes: Receive a second operation input by the user for the second control; In response to the second operation, a video file containing the first image set is generated according to the first template to be recommended; Play and / or store the video file.

9. The method according to any one of claims 4 to 8, characterized in that, Before displaying the desktop recommendation card on the desktop, the process also includes: If the number of images in the first image set does not meet the preset requirement, then a second image set matching the second recommended template is selected from the image library based on the composition elements of the second recommended template. Wherein, the second template to be recommended is a different template from the first template to be recommended among the at least one templates to be recommended, and the recommendation priority of the second template to be recommended is lower than that of the first template to be recommended.

10. The method according to any one of claims 4 to 8, characterized in that, The method further includes: Multiple new images have been detected in the gallery; The newly added images are analyzed and clustered to obtain the image elements of the newly added images; Based on one or more of the image elements of the newly added image, at least one template to be recommended is selected from the plurality of recommended templates that corresponds to the image elements of the newly added image.

11. The method according to any one of claims 1 to 8, characterized in that, The method further includes: When a mismatch is detected between the current location and the user's usual residence, and the duration of stay at the current location exceeds a preset duration threshold, it is determined that the at least one image element to be recommended includes a travel event. Based on the travel event, at least one template corresponding to the travel event is selected from the multiple recommended templates.

12. The method according to any one of claims 1 to 8, characterized in that, The method further includes: When it is detected that the current location does not match the user's permanent residence, and the current location is one of the generation locations among the various historical image elements, it is determined that the at least one image element to be recommended includes the travel event and the current location; Based on the travel event and the current location, at least one template to be recommended is selected from multiple recommended templates that corresponds to the travel event and / or the current location, and the location element in the at least one template to be recommended is the current location.

13. The method according to any one of claims 1 to 8, characterized in that, The step of retrieving at least one image element from the historical event records that matches the current date includes: When the screen is turned on for the first time on the current date, at least one image element to be recommended is obtained from the historical event record.

14. The method according to any one of claims 1 to 8, characterized in that, The acquisition of historical event records includes: The image elements of the multiple images in the image library are obtained by analyzing the multiple images. The image elements include one or more of the following: generation time, generation location, human feature vector, and semantic feature vector. The semantic feature vector is used to characterize the image content. The image elements of the multiple images are clustered according to date to obtain the historical event record.

15. An electronic device, characterized in that, include: Processor, memory, and interface; The processor, the memory, and the interface cooperate with each other to enable the electronic device to perform the method as described in any one of claims 1 to 14.

16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the method of any one of claims 1 to 14.