Image set acquisition method, electronic equipment and computer readable storage medium

By analyzing and clustering pictures in terminal devices and generating recommendation templates, the problem of a single traditional image browsing method is solved, timely reminders and personalized displays of important events are achieved, and user experience is improved.

CN120561327AActive Publication Date: 2025-08-29HONOR DEVICE CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410192342.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-20
Publication Date
2025-08-29
Estimated Expiration
2044-02-20

AI Technical Summary

Technical Problem

The traditional image browsing method is single, the user experience is not high, and it is difficult to efficiently manage and recommend important image events on terminal devices.

Method used

By analyzing and clustering pictures in terminal devices, we generate recommendation templates based on the timeline and a variety of image elements (locations, characters, events), accurately recommend image galleries of key dates, and generate rich user experience through desktop recommendation cards and videos.

Benefits of technology

It realizes timely reminders and personalized image displays for important events, improving users' browsing experience and image management efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120561327A_ABST
    Figure CN120561327A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of terminals, and provides an image set acquisition method, electronic equipment and a computer readable storage medium, the method comprises the following steps: acquiring a historical event record, the historical event record comprising a corresponding relationship between a plurality of historical image elements and a plurality of historical dates, the historical picture elements comprise one or more of a generation place, a character identifier and a generation place; obtaining at least one to-be-recommended picture element corresponding to the current date from the historical event record; screening at least one to-be-recommended template corresponding to the at least one to-be-recommended picture element from the plurality of recommendation templates according to the at least one to-be-recommended picture element; according to the components of the first to-be-recommended template, screening out a first picture set matched with the components of the first to-be-recommended template from a picture library; the first to-be-recommended template is any one of the at least one to-be-recommended template. According to the method, picture recommendation can be automatically triggered, so that picture display modes are rich, and user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a method for acquiring an atlas, an electronic device, and a computer-readable storage medium. Background Art

[0002] With the development of Internet technology and terminal technology, the use of terminal devices has become more and more extensive and penetrated into people's production and life, becoming an inseparable part.

[0003] Current terminal devices are no longer limited to traditional communication functions; they also have the ability to take photos and store captured images. When a terminal device stores a large number of images, it can also categorize and store them for easier viewing. For example, a user can open the Gallery app and tap the "Camera" folder to view photos taken with the camera app; they can also tap the "Screenshots" folder to view screenshots.

[0004] However, the traditional way of browsing pictures is relatively simple and the user experience is not good. Summary of the Invention

[0005] The present application provides a method, device, chip, electronic device, computer-readable storage medium and computer program product for obtaining an atlas, which can enrich the display of pictures and enhance the user experience.

[0006] In a first aspect, a method for obtaining an atlas is provided to obtain a historical event record, wherein the historical event record includes a correspondence between multiple historical picture elements and multiple historical dates, and the multiple historical picture elements include one or more of a generation location, a character identifier, and a generation location; at least one to-be-recommended picture element corresponding to the current date is obtained from the historical event record; based on the at least one to-be-recommended picture element, at least one to-be-recommended template corresponding to the at least one to-be-recommended picture element is screened out from multiple recommendation templates; based on the constituent elements of the first to-be-recommended template, a first atlas matching the constituent elements of the first to-be-recommended template is screened out from an atlas library; wherein the first to-be-recommended template is any one of the at least one to-be-recommended templates.

[0007] The terminal device analyzes and clusters images and makes timely and accurate recommendations to users based on the timeline. It can make accurate recommendations for events with floating dates even for non-fixed holidays, reminding users in time not to miss the corresponding key dates, thereby improving the user experience.

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

[0009] The difference in 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 day threshold. The day difference mentioned here may not consider the year, but only consider the month and day.

[0010] For example, if N is 3, the month and day of the historical date are the same or close to the month and day of the query date. For example, if today is February 14, 2024, the query date could be February 17, 2024. Based on this, the terminal device can query historical dates, such as events that occurred on February 17 in previous years (last year or the year before), and make recommendations to remind the user to avoid missing holidays or anniversaries.

[0011] Optionally, the terminal device obtains the historical date corresponding to the month and day of the query date, and can also be a range of several days adjacent to February 17th of previous years. For example, the range of historical dates is seven days before February 17th of previous years, or seven days after February 17th of previous years, or can also be three days before February 17th of previous years to three days after February 17th of previous years. In the embodiment of the present application, the range of historical dates corresponding to the month and day of the query date can be obtained without limitation. Since users may celebrate some anniversaries not only on the historical date due to personal arrangements and other factors, they may also celebrate and take celebratory photos on the days before and after February 17th. Therefore, the terminal device obtains the range of historical dates corresponding to the month and day of the query date, which can expand the search range of pictures, thereby avoiding omissions and achieving accurate recommendations.

[0012] In some possible implementations, the theme of the first template to be recommended includes a first picture element to be recommended.

[0013] Specifically, the terminal device searches multiple themes in the configuration file based on the first image element to be recommended, and selects multiple recommended templates whose themes include the first image element to be recommended as the templates to be recommended. Optionally, the terminal device may search the multiple image elements to be recommended found in the historical date query one by one to obtain recommended templates that include 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: time elements, location elements, person elements and event elements. According to the constituent elements of the first template to be recommended, a first atlas matching the constituent elements of the first template to be recommended is screened out from the gallery, including: generating at least one group of search keyword combinations according to the constituent elements of the first template to be recommended; searching the gallery according to at least one search keyword in the first search keyword combination to obtain a first atlas matching at least one search keyword, the first search keyword combination being any one of at least one group of search keyword combinations.

[0015] The specific process of the terminal device generating the corresponding atlas according to the components of the recommended template can be found in the relevant description in the article and will not be repeated here.

[0016] In some possible implementations, the method further includes: displaying a desktop recommendation card on the desktop, where the desktop recommendation card includes a card name, and the card name corresponds to the title of the first template to be recommended.

[0017] Specifically, the terminal device can generate a card name after filling elements in the title or receiving external parameters. The terminal device can also generate a desktop recommendation card and display it in the area at the top of the screen. The title is defined by "title" in the configuration information. When "title":null, it means that it is generated using external parameters. Optionally, it can also be "title":%human%'s%event%, or%human%'s birthday. The terminal device fills the element corresponding to human: Qiuqiu, and the element corresponding to event: birthday into "title", generates the corresponding card name: Qiuqiu's Birthday, and displays it in the desktop recommendation card. Optionally, the title here is an example. The actual title can also be a different combination of different types of components, and each component element can also be filled with different elements to obtain the corresponding card name, which will not be repeated here.

[0018] In some possible implementations, the background image of the desktop recommendation card is a picture generated according to the cover of the first picture album.

[0019] This method can clearly present the characters involved in the corresponding picture collection in the desktop recommendation card, thereby improving the user experience.

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

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

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

[0023] A detailed description of how the terminal device generates the first recommendation statement based on the first recommendation statement template of the first template to be recommended can be found in the previous description of generating the recommendation statement, which will not be repeated here. After the recommendation statement is generated, if the user clicks the screen to enter the first interface, the first recommendation statement can also be displayed in 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 for the second control; in response to the second operation, generating a video file containing the first picture set according to the first template to be recommended; and playing and / or storing the video file.

[0025] Specifically, the above-mentioned first interface also includes a second control, such as "Generate Video". When the user performs the second operation on the second control, that is, clicks "Generate Video", the terminal device generates a corresponding video file for the pictures in the first picture album according to the first recommendation template corresponding to the first recommendation statement). The text, display effect, watermark and background music in the video file are defined by the corresponding first recommendation template. The terminal device can play the video file, and can also store and forward the video file. As a result, the way of browsing and sharing pictures is enriched, and the user experience is improved.

[0026] In some possible implementations, before the desktop recommendation card is displayed on the desktop, it also includes: if the number of pictures in the first atlas does not meet the preset number requirement, then based on the components of the second template to be recommended, a second atlas matching the second template to be recommended is screened out from the gallery; wherein the second template to be recommended is a recommended template that is different from the first template to be recommended in at least one template 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.

[0027] Optionally, if the number of pictures in the first atlas does not meet the preset number requirement, for example, it is less than six, the terminal device will filter out a second atlas matching the second to-be-recommended template from the gallery based on the components of the second to-be-recommended template whose priority is lower than the first to-be-recommended template. Optionally, if the second atlas still does not meet the preset number requirement, the terminal device will continue to filter out a third atlas matching the third to-be-recommended template from the gallery based on the components of the third to-be-recommended template whose priority is lower than the second to-be-recommended template, and so on, until an atlas meeting the preset number requirement is filtered out. Optionally, the preset number requirement can also be other natural numbers such as 10, 20, etc., which is not limited in the embodiments of the present application.

[0028] In some possible implementations, the method also includes: detecting multiple new pictures added to the gallery; analyzing and clustering the multiple new pictures to obtain picture elements of the new pictures; and screening out at least one to-be-recommended template corresponding to the picture elements of the new pictures from multiple recommended templates based on one or more of the picture elements of the new pictures.

[0029] Optionally, in embodiments of the present application, recommendations to users can be triggered when a new event is generated. This new event is derived by analyzing and clustering newly added images in the gallery. This method can automatically trigger template recommendations based on newly added images, ensuring that the recommended content matches the user's behavior, facilitating user recall of previous travel experiences and improving the user experience.

[0030] In some possible implementations, the method also includes: when it is detected that the current location does not match the user's permanent residence, and the stay time at the current location is greater than a preset time threshold, determining that at least one image element to be recommended includes a travel event; based on the travel event, filtering out at least one template to be recommended corresponding to the travel event 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 user experience.

[0032] In some possible implementations, the method also 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 of multiple historical picture elements, determining that at least one picture element to be recommended includes a travel event and the current location; based on the travel event and the current location, screening out at least one template to be recommended corresponding to the travel event and / or the current location 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 user experience.

[0034] In some possible implementations, obtaining at least one image element to be recommended that matches the current date from historical event records includes: obtaining at least one image element to be recommended from historical event records when the screen is lit for the first time on the current date.

[0035] The terminal device can obtain at least one image element to be recommended from the historical event record when the screen is turned on for the first time every day, thereby starting the recommendation process.

[0036] In some possible implementations, obtaining historical event records includes: analyzing multiple pictures in a gallery to obtain picture elements of the multiple pictures, where the picture elements include: one or more of: generation time, generation location, character feature vectors, and semantic feature vectors, where the semantic feature vectors are used to represent the picture content of the picture; clustering the picture elements of the multiple pictures according to date to obtain historical event records.

[0037] By analyzing multiple pictures in the terminal device gallery, the image elements of multiple pictures are obtained, and the image elements of multiple pictures are clustered according to date to obtain historical event records. The corresponding picture albums are recommended to users based on time, avoiding missing important dates and improving user experience.

[0038] In a second aspect, a device for acquiring an atlas is provided, comprising a unit composed of software and / or hardware, which is used to execute any one of the methods in the technical solution described in the first aspect.

[0039] In a third aspect, an embodiment of the present application provides a chip comprising a processor; the processor is used to read and execute a computer program stored in a memory to execute any one of the methods in the technical solution described in the first aspect.

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

[0041] Further optionally, the chip also includes a communication interface.

[0042] In a fourth aspect, an electronic device is provided, comprising: a processor, a memory, and an interface; the processor, the memory, and the interface cooperate with each other so that the electronic device executes any one of the methods in the technical solution described in the first aspect.

[0043] In a fifth aspect, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the processor executes any one of the methods in the technical solution described in the first aspect.

[0044] In a sixth aspect, a computer program product is provided, comprising: a computer program code, which, when executed on an electronic device, enables the electronic device to execute any one of the methods in the technical solution described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0046] Figure 2is a software structure block diagram of the terminal device 100 provided in an embodiment of the present application;

[0047] Figure 3 This is a schematic diagram of the correspondence between a time axis and image elements provided in an embodiment of the present application;

[0048] Figure 4 This is an interactive diagram of an atlas acquisition method provided in an embodiment of the present application;

[0049] Figure 5 This is a schematic diagram of an interface related to smart filming provided in an embodiment of the present application;

[0050] Figure 6 This is another example of an interface diagram related to smart filming provided in an embodiment of the present application;

[0051] Figure 7 This is another example of an interface diagram related to smart filming provided in an embodiment of the present application;

[0052] Figure 8 This is a schematic diagram of an interface related to smart filming provided in an embodiment of the present application;

[0053] Figure 9 This is a schematic diagram of an interface for desktop recommendation cards and smart photos provided in an embodiment of the present application;

[0054] Figure 10 This is a flow chart of a method for obtaining an atlas provided in an embodiment of the present application;

[0055] Figure 11 It is a structural diagram of an atlas acquisition device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0056] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships can exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0057] In the following, 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 quantity of the technical features indicated. Therefore, a feature specified as "first," "second," or "third" may explicitly or implicitly include one or more of the features.

[0058] The atlas acquisition method provided in the embodiments of the present application can be applied to terminal devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, and personal digital assistants (PDAs). The embodiments of the present application do not impose any restrictions on the specific types of terminal devices.

[0059] For example, Figure 1 1 is a schematic diagram of the structure of an example terminal device 100 provided in an embodiment of the present 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, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identification module (SIM) card interface 195. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light 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 should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0061] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is merely an illustrative illustration and does not constitute a structural limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may also adopt a different interface connection method from the above embodiments, or a combination of multiple interface connection methods.

[0062] The software system of the terminal device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present application, the Android system with a layered architecture is used as an example to illustrate the software structure of the terminal device 100.

[0063] Figure 2 This is a software structure diagram of the terminal device 100 in an embodiment of the present application. The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer. The application layer can 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, short message, etc.

[0065] The application framework layer provides an application programming interface (API) and programming framework for the 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, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0067] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.

[0068] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0069] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.

[0070] The phone manager is used to provide communication functions of the terminal device 100, such as management of call status (including answering, hanging up, etc.).

[0071] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

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

[0073] In an embodiment of the present application, the application framework layer also includes a media recommendation service, cloud parameters, and a recommendation database.

[0074] Cloud-based parameters include configuration files for recommended templates. This configuration file can be downloaded from the cloud or pre-installed on the terminal device and regularly updated from the cloud.

[0075] The media recommendation service (MrsgService) includes a media recommendation generation engine and a recommendation template parser. The media recommendation generation engine and recommendation template parser can adapt the corresponding image collections for different recommendation templates according to the configuration file and generate corresponding recommendation statements.

[0076] The recommendation database is used to store adapted atlases and recommendation statements for later presentation.

[0077] The Android runtime includes the core library and the virtual machine. The Android runtime is responsible for scheduling and management of the Android system.

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

[0079] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0080] The system library can include multiple functional modules, such as a surface manager, media libraries, a 3D graphics processing library (such as OpenGL ES), and a 2D graphics engine (such as SGL).

[0081] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.

[0082] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[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 drawing engine for 2D drawings.

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

[0086] For ease of understanding, the following examples of this application will be described with Figure 1 and Figure 2 Taking the terminal device with the shown structure as an example, the atlas acquisition method provided in the embodiment of the present application is specifically explained in combination with the accompanying drawings and application scenarios.

[0087] Typically, a user can use a camera application (hereinafter referred to as the camera application) installed on a terminal device to take photos. The photos taken may include photos of people, photos of scenery, photos of other objects, or photos of different objects together. Photos taken by the camera application can be stored in a gallery application (hereinafter referred to as the gallery). The terminal device can store not only photos taken by the camera application, but also pictures from other sources, such as screenshots obtained by taking screenshots, pictures downloaded from web pages, and pictures transmitted through other communication tools (such as chat applications).

[0088] When users want to browse images, they can open the gallery. For example, they can open the gallery and tap the "Camera" folder to view photos taken with the camera app; they can also tap the "Screenshots" folder to view screenshots. Due to the limited screen size of terminal devices, the number of images that can be displayed at one time is limited. Users can also enter a folder and flip through the pages to view other images within it. Traditional image display methods are relatively simple, and the way users browse images is relatively monotonous, resulting in a poor user experience.

[0089] The atlas acquisition method provided in the embodiment of the present application can cluster and analyze the pictures in the gallery according to the picture elements based on one or more elements, and then screen out pictures from the gallery whose picture elements match the components of the recommendation template according to the components corresponding to the recommendation template to form an atlas, so that the formed atlas can be different according to the picture elements of different pictures. It should be noted that the corresponding atlas obtained by this method based on the picture elements of the pictures is used to recommend to the user, so that the pictures are personalized according to the recommendation template. This way of displaying pictures is richer and more diversified, and can enhance the user's browsing experience.

[0090] In the embodiment of the present application, when a new image is stored in the gallery, the terminal device can perform computer vision (CV) analysis on each image stored in the gallery in the background. The CV analysis can include the following three aspects:

[0091] Aspect 1: Location information conversion.

[0092] Specifically, the terminal device may convert the longitude and latitude location information into a specific generation location, such as a city and / or a point of interest (POI).

[0093] When a terminal device generates an image, it can record the image's location information and then convert that location information into a specific location. For example, if the terminal device's positioning function (e.g., GPS) is enabled when taking a photo using a camera app, the device can obtain the latitude and longitude at the time of capture and record them as the location information for the captured photo. For example, if the latitude and longitude of the terminal device at the time of capturing image P1 are (X+Y) / 2 east longitude and (Z+W) / 2 north latitude, and the longitude range of city C1 on Earth is from XX to YY degrees east longitude and from ZZ to WW degrees north latitude, the terminal device can determine, through CV analysis, that the location of image P1 is city C1, thereby converting the location information of image P1 into the location of city C1. Alternatively, the terminal device can also determine the POI area corresponding to the longitude and latitude ranges of pre-set POI areas as the location of image P1. POI areas can optionally be tourist attractions, office buildings, residential communities, and other areas.

[0094] If the positioning function of the terminal device is not turned on when the photo is taken, and the terminal device cannot obtain the longitude and latitude at the time, the location information of the taken picture may be empty and the generated location may also be empty.

[0095] Optionally, if the positioning function of the terminal device is not enabled when taking a picture, the user can also manually enter the location information of the picture. For example, the user can directly enter the current longitude and latitude for the picture. In this case, the terminal device can store the longitude and latitude entered by the user as the location information of the taken picture. The user can also directly enter the name of the current city, the name of a scenic spot, or the name of a user-defined place, such as "old place". The terminal device can then store the name of the place entered by the user as the location where the taken picture was generated. Optionally, the terminal device can also determine the current area based on the coverage of the local area network to which it is currently connected, and use the current area as the location where the picture was generated.

[0096] After the terminal device performs location information conversion on multiple images, the locations where these multiple images were generated can be obtained. The terminal device can also perform cluster analysis on the locations where multiple images were generated, for example, taking the union of the locations where multiple images were generated to obtain multiple locations. Optionally, these locations can be cities and / or POI areas, which is not limited in the embodiments of the present application. Some or all of these multiple locations can be used in the configuration information of the recommendation template to constitute the location elements of the location factor.

[0097] Aspect 2: Extracting character feature vectors.

[0098] Specifically, the terminal device can use a face recognition model to perform face recognition on the faces appearing in the image, thereby obtaining face feature vectors corresponding to different faces. It should be noted that if there are multiple faces in a picture, a corresponding face feature vector can be extracted for each face in the picture, thereby obtaining multiple face feature vectors. After the terminal device extracts multiple face feature vectors from multiple pictures, it can also perform cluster analysis on the extracted multiple face feature vectors to obtain a character feature vector representing each character. If the face of the same character appears in multiple pictures, the faces of the character in these multiple pictures correspond to the same character feature vector (TagID). It should be noted that a character list can also be set in the terminal device, and the name of each character in the character list corresponds to a TagID. In other words, each TagID represents a natural person. Then, if a picture contains multiple faces, the picture can extract multiple TagIDs that correspond one to one with the faces.

[0099] Optionally, the terminal device can also use a human body recognition model to identify the morphology of the human body appearing in the picture, thereby obtaining human body feature vectors corresponding to different human bodies. It should be noted that if there are multiple human bodies in a picture, a corresponding human body feature vector can be extracted for each human body in the picture, thereby obtaining multiple human body feature vectors. After the terminal device extracts multiple human body feature vectors from multiple pictures, it can also perform cluster analysis on the extracted multiple human body feature vectors to obtain a character feature vector representing each character. If the human body of the same character appears in multiple pictures, the human body of the character in these multiple pictures corresponds to the same character feature vector (ReID). It should be noted that a character list can also be set in the terminal device, and the name of each character in the character list corresponds to a ReID. In other words, each ReID represents a natural person. Then, if a picture contains multiple human bodies, the picture can extract multiple ReIDs corresponding one to one to the human bodies.

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

[0101] The following description uses TagID as an example. The names of the people included in the above-mentioned character list can be entered by the user. For example, after the terminal device identifies and clusters the people in multiple pictures, it obtains the TagIDs of two people: TagID-1 and TagID-2. When the user browses the album, if the user chooses to browse by portrait, the terminal device can display two folders. For example, the union of the facial and / or body feature vectors of multiple people is taken to obtain multiple character feature vectors. The names of the people corresponding to these multiple character feature vectors can be used as multiple elements in the character element. Folder 1 stores pictures of the person corresponding to TagID-1, and folder 2 stores pictures of the person corresponding to TagID-2. Folder 1 can use a picture corresponding to TagID-1 as its cover, and folder 2 can use a picture 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 "Little Daughter", it means that the person corresponding to TagID-1 is the Little Daughter. If the 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 label a person's name on a picture individually. For example, if a picture is labeled "little daughter," it means that the people corresponding to the TagID of the picture include the little daughter. If the TagID of other pictures contains the same TagID as the one in the picture, it means that the people corresponding to the other pictures also include the little daughter.

[0103] The user can use any of the above methods to mark different characters in the album one by one, and part or all of the names of these characters can be used in the configuration information of the recommendation template to constitute the character elements of the character factors.

[0104] At the same time, the names of the characters marked by the user, such as the little daughter and the lover, can be added into the character list. In other words, part or all of the names of the characters in the character list can be used as character elements that constitute the character elements.

[0105] If the user does not input the name of a person for a certain TagID, the terminal device may set the name of the person corresponding to the TagID to be empty, for example, displaying: Unnamed (or adding a name).

[0106] It should be noted that the face of the same person can be associated with one or more TagIDs. If a picture includes multiple faces, it can be associated with multiple TagIDs. Alternatively, the body of the same person can be associated with one or more ReIDs. If a picture includes multiple bodies, it can be associated with multiple ReIDs.

[0107] Alternatively, the same face or body may correspond to TagID-1 and ReID-1 respectively, or the same face may be identified by different TagIDs due to recognition errors. The user can then operate the terminal device and change the names of the people corresponding to TagID-1 and ReID-1 to the same name to achieve the association of the person's feature vectors, that is, to define TagID-1 and ReID-1 as the same person. During the image search process, if you want to search for pictures of the person, you can filter out pictures whose feature vectors are TagID-1 or ReID-1.

[0108] When a new picture is added to the gallery, the terminal device can also perform face and / or body recognition on the new picture to obtain the TagID corresponding to the picture. Optionally, if the new picture contains a person already in the album, the picture can be mapped to the existing TagID. Optionally, if the new picture contains a person not in the album, a new TagID can be identified to correspond to the newly added person.

[0109] Optionally, the above-mentioned face recognition model and body recognition model may be trained neural network models.

[0110] Aspect three: Extracting semantic feature vectors.

[0111] Specifically, the terminal device can use a semantic recognition model to perform semantic recognition on the image, 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 may include objects different from people, such as pets, cats, puppies, food, etc.; it may also include some scenes, such as painting, traveling, sports, dancing, weddings, parties, etc. The embodiment of the present application does not limit the image content that can be recognized. The objects and scenes contained in the image content of a picture can be one or more. For example, if the picture is a scene of multiple people having a meal outdoors, and there is a pet dog in the picture, the semantic feature vector obtained by recognition can represent the image content in the picture including: traveling, party, pets, pet dogs, etc.

[0112] Optionally, the semantic recognition model may be a trained neural network model.

[0113] The above-mentioned CV analysis process can be performed when the terminal device is in an idle period. Among them, the idle period can be a period when the user does not use the terminal device, such as the period when the screen is off during charging, from 2:00 to 4:00 in the morning, or the period when the screen is off. This embodiment of the application does not limit this. The terminal device performs CV analysis during the idle period, which does not affect the user's use of the terminal device and is highly reasonable.

[0114] In addition to the individual pictures stored in the gallery, the objects of the above-mentioned CV analysis may also include frame images in the video files in the gallery. The CV analysis of the video file may be to perform CV analysis on the frame images in the video file one by one, or to extract frames from the video to obtain frame images, and then perform the above-mentioned CV analysis on the frame images to obtain the CV analysis results of the frame images. Optionally, in the frame extraction process, the terminal device may choose to extract a frame at a fixed number of frame intervals, such as extracting a frame every ten frames, or to extract a frame at a fixed time interval, such as extracting a frame every second. The embodiment of the present application does not limit the specific method of frame extraction. Taking the frame images of the video as the object of CV analysis can expand the selection range of the atlas, make the screened atlas more comprehensive, and make the later presentation richer, which can enhance the user experience.

[0115] As can be seen from the above, the result of CV analysis is the picture elements obtained by identifying the picture, which may include: one or more of the location, character feature vector and semantic feature vector. It should be noted that when the pictures in the gallery are generated, the terminal device will also record the generation time of the picture. Specifically, the generation time of the picture may include year, month and day, such as February 15, 2023; it may also include hours and minutes, such as 14:00. The generation time of each picture, together with one or more of the location, character feature vector and semantic feature vector of the picture, can form a corresponding relationship with the picture, and be stored together with the picture in the recommendation database for subsequent use.

[0116] Optionally, after the terminal device completes the CV analysis, the above-mentioned pictures are clustered by day based on the picture elements. Specifically, it may include: clustering the semantic feature vectors of the pictures to obtain the correspondence between multiple events and dates (generation time). If the pictures in the gallery on a certain day include multiple birthday party photos, multiple outdoor sports photos, and some painting photos, then by clustering the semantic feature vectors of the pictures, three events can be obtained: birthday (or birthday party), sports (or outdoor sports), and painting. These three events form a corresponding relationship with the date of this day.

[0117] Clustering the images by day based on image elements can also include clustering the character feature vectors in the images to obtain a correspondence between the character feature vectors and the date (generation time). For example, if the image library contains multiple photos of my spouse's birthday party, multiple photos of me exercising outdoors, and some photos of my daughter drawing, clustering the character feature vectors in the images can obtain a correspondence between the character feature vectors of my spouse, me, and my daughter and the date.

[0118] Optionally, clustering the pictures by day based on picture elements may further include: clustering the generation locations of the pictures to obtain a plurality of corresponding relationships between the generation locations and dates (generation times).

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

[0120] For example, the pictures taken by the user involve: I traveled to scenic spot B1 on date 1, my youngest daughter painted at the Cultural Palace on date 2, and my lover was on a business trip in city C1 on date 3. The terminal device can generate corresponding relationships including: date 1 corresponds to me, scenic spot B1, travel, date 2 corresponds to my youngest daughter, Cultural Palace, painting, date 3 corresponds to my lover, city C1, business trip.

[0121] After the terminal device completes the clustering of the image elements, the corresponding relationship obtained above can be recorded in the historical event record according to the date and based on the time axis.

[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, obtain the new correspondence between image elements and dates, and update the historical event records.

[0123] That is, the above clustering results can also be expressed as a series of dates on the timeline corresponding to: people, places and events. For example, historical event records can be formatted as follows Figure 3 shown. Figure 3 This means: On July 1, 2023, at scenic spot B1 in city C1, a user took photos of the following events: sightseeing, scenery, lake, boating, water play, and birthday. The people in the photos are TagID-1 and TagID-2. From July 2, 2023, to July 7, 2023, the user did not take any other photos. On July 8, 2023, the user took some photos in city C1. These photos included the following event: wedding. The people and POI areas were empty.

[0124] Optionally, the source of the pictures that the terminal device identifies and clusters may also include pictures obtained by screenshots. Optionally, if there are some text in the picture, the terminal device may use the event expressed by the text recognized by optical character recognition (OCR) as the recognized event. For example, a user takes a screenshot of the content of an email, and the screenshot obtained by the screenshot is clustered, and the screenshot includes the characters "Happy Birthday", and the event "Birthday" is obtained. Optionally, if the picture is a photo of an ID card, the terminal device can use OCR to recognize the text on the photo of the ID card and obtain the corresponding name (corresponding character feature vector) and birthday (corresponding event).

[0125] Optionally, the date in the historical event record may be a date that does not include the year but only includes the month and day, such as May 1st, January 1st, etc.

[0126] Optionally, a pre-trained classification model may be used to cluster image elements. The terminal device may input the CV analysis results of each image into the classification model for classification, obtain the image elements of each image, and mark the image elements with the names as labels for the images.

[0127] Optionally, a pre-trained image classification model can be used to cluster image elements. The image classification model can also have the function of CV analysis. The terminal device directly inputs the images in the gallery into the image classification model for identification and classification, obtains the name of the image element of each image and marks it as the label of the corresponding image. The label of the image can include any one or more of person labels, event labels and location labels. Each label can be one or more, specifically related to the image content of the image itself. For example, if there are two faces in the image, two person labels corresponding to the image can be clustered.

[0128] The above classification model and image classification model can both be neural network models.

[0129] Optionally, the terminal device can also identify text stored in other applications on the terminal device to obtain corresponding events. For example, the note application stores the note content: the little daughter's birthday is XX year XX month and XX day, then the terminal device can identify the note content, thereby generating a corresponding relationship: the little daughter's TagID (person), XX year XX month and XX day (date) and birthday (event), and then store the corresponding relationship in the historical event record. Optionally, the terminal device can also identify text in applications such as chat records and emails to obtain corresponding corresponding relationships. The embodiment of the present application does not limit the method for obtaining historical event records.

[0130] After the terminal device generates the above historical event records, they can be stored in a recommendation 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 time. Optionally, the terminal device can pre-install the configuration file of the recommended template locally or download the configuration file of the recommended template from the cloud, which is not limited in this embodiment of the present application. Optionally, the terminal device can also periodically query the cloud for new configuration files. When a new configuration file is available in the cloud, the terminal device 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 may also determine whether the terminal device currently supports the new configuration file. If so, the terminal device may download the new configuration file to replace the original configuration file. If the terminal device currently does not support the new configuration file, for example, because the installed system version on the terminal device does not match the configuration file, the terminal device may use the original configuration file for template analysis.

[0133] The configuration information in the above configuration file can be called cloud parameters, which can be used to describe the recommendation template. 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 the recommendation template include: time element (time), location element (location), person element (human) and event element (event). In order to clearly describe the meaning of the configuration information of the recommendation template, a recommendation template is used as an example for explanation:

[0134] Component 1: Time element.

[0135] The configuration information of the recommendation template may include a time element. Specifically, the time element may include one or more time descriptors, each of which is one of the elements of the time element, called a time element. The time descriptors do not need to use dates, but instead use colloquial descriptors, so that the description in the later presentation conforms to the user's expression habits, thereby improving the user experience. For example, the time descriptors (time elements) may include, but are not limited to, one or more of: 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, Chinese Valentine's Day, Christmas, Thanksgiving, wedding anniversary, graduation anniversary, and birthday. The number and type of time elements in the configuration information of different recommendation templates may be the same or different.

[0136] Component 2: Location element.

[0137] In an embodiment of the present application, the location element in the configuration information can be empty. In the actual template parsing process, since the locations cannot be exhaustively listed, the location element can be obtained by clustering the generation locations of multiple pictures obtained by CV analysis of the pictures. Therefore, compared with the method of listing a large number of existing locations to cover user needs, there is no need to retrieve invalid locations that are not related to the pictures in the gallery. It is only necessary to retrieve the generation locations of the pictures obtained by clustering the pictures, which can effectively narrow the search scope. For example, in the above-mentioned CV analysis process, if the results of the CV analysis of multiple pictures are clustered, the locations of some pictures are C1, the locations of some pictures are scenic spot B2, and the locations of other pictures are empty. Then, during the template parsing process, if the recommended template includes the location element, the terminal device can only search according to the two locations of city C1 and scenic spot B2, without searching for pictures according to other locations. The specific template parsing process can be found in the description below, which will not be repeated here.

[0138] Component three: character elements.

[0139] The configuration information of the recommended template also includes character elements. Specifically, character elements can include one or more character descriptors, with each descriptor being an element of the character element, referred to as a character element. Character descriptors can use colloquial terms such as nicknames, given names, and character relationship descriptors, including but not limited to: lover, eldest daughter, youngest son, boyfriend, Zhang San, grandfather, grandmother, grandfather, grandmother, etc. Optionally, the character element in the recommended template configuration information can be empty. During the actual template parsing process, character elements can be obtained by exhaustively enumerating the names of characters or character relationships, or through cluster analysis of images. Using image cluster analysis to obtain character element elements effectively narrows the search scope compared to enumerating the names of a large number of characters or character relationships. For example, in the aforementioned CV analysis process, if the CV analysis results of multiple images are clustered and the only characters in all images are the youngest daughter and the lover, then during the template parsing process, the search can be performed solely on these two characters, eliminating the need to search for other characters.

[0140] Component four: event element.

[0141] The configuration information of the recommended template also includes event elements. Specifically, the event element may include one or more descriptive words for the event, and each descriptive word is one of the elements of the event element, which is called an event element. The descriptive words for the types of event elements can also use colloquial descriptive words, so that the description in the later presentation conforms to the user's expression habits, thereby improving the user experience. The descriptive words for event elements include but are not limited to: one or more of: outings, daily sports, hobbies, daily gatherings, group photos, food, food preparation processes, cats, dogs, pets, travel experiences, travel, happy gatherings, team-building dinners, performances, painting, singing, dancing, etc. Optionally, since the types of events cannot be exhaustive, the fields about events in the configuration information can be used as open fields and written by R&D personnel during the R&D stage. In the actual template parsing process, the terminal device can search for images based on the fields of the events passed in by the R&D personnel, which is referred to as value-passing search matching.

[0142] The configuration information of the above-mentioned recommendation template also includes: a recommendation statement template. One or more of the multiple element slots are set in the recommendation statement template. These multiple element slots may include: a time slot for filling the time element, a location slot for filling the location element, a character slot for filling the character element, and an event slot for filling the event element. After the elements of the above-mentioned four components are filled into the corresponding element slots, a complete recommendation statement can be generated. It should be noted that the recommendation statement templates in the configuration information of different recommendation templates are different. The same recommendation template uses the same recommendation statement template, but based on the different elements of the four components, the generated recommendation statements are different. In addition, the number, type and order of the element slots contained in different recommendation statement templates are also different.

[0143] Optionally, the same component element can also contain multiple similar synonyms. For example, the elements of the event element can include: outing, play, and picnic. When generating a recommendation sentence, outing, play, and picnic can be interchanged or used alternately, making the recommendation sentence more expressive and improving the user experience.

[0144] Optionally, multiple element slots may also include modifier slots for filling in modifiers. Based on this, in addition to the element slots, the modifier slots in the same recommendation sentence template may also be interchanged with synonyms or related words to conform to daily language expression habits and to make the recommendation sentence description differentiated. For example: the recommendation sentence template is "Generate a video of a trip at %_time%". Among them, "generate" is a modifier, and the corresponding slot is a modifier slot. Taking today as an example, the recommendation sentence generated by the terminal device is: Generate a video of today's trip, make a video of today's play, or generate a video of today's outing. The position of the modifier slots in different recommendation sentence templates and the corresponding modifiers in the recommendation sentence are different.

[0145] Optionally, the configuration file may include configuration information of multiple recommendation templates, and the types of the four components of each recommendation template, the types and quantities of elements of each component, and the recommendation statement templates are partially or completely different.

[0146] Based on the meaning of the above configuration information, the following describes in detail the template parsing process and the process of matching the atlas based on the template parsing results, combined with the element slots in the recommendation statement template.

[0147] Here, we use an example where a terminal device searches for images one by one based on the four components in the configuration information of a recommended template to obtain an atlas that matches the four components. This 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 configuration information, see the following example:

[0150]

[0151]

[0152] Among them, the theme "topic" is the name of the theme, and each theme can correspond to one or more recommended templates. Time "_time" is the time element; location "_location" is the location element; person "_human" is the person element; event "_event" is the event element. It should be noted that one or more of these components may be empty, but these multiple components will not all be empty, and among the components that are not empty, the elements can be one or more. In the example of the above configuration information, the theme "topic" is daily Vlog, "_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 of "_event" is travel, as an example. In other words, each component can be understood as a defined range. For example, the time element includes the elements: "today, yesterday, last weekend, then it means that the range of the time element is: the range of today, yesterday and last weekend.

[0153] Taking the time element as an example, the time element and the corresponding element can be understood as a key-value pair correspondence. For example, when the time element includes the elements: today, yesterday, and last weekend, the key-value formed 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 element slot corresponding to the component does not exist in the recommendation statement corresponding to the recommendation template (for example, "_location": [] and "_human": [] in the above example); if the element of a component is written by external value, for example, the result of image clustering or the result of learning user portraits needs to be used, it can be represented by "null" (for example, "title": null in the above example); if the element of a component uses the descriptive word in the configuration information, it can be represented by "%***%" (where *** represents the category of the component, such as ["%_time%"] and ["%_event%"] in the above example).

[0155] Optionally, the configuration information may also include other components, such as "_argument", which can be used as an extended component. This component can be used as an extended variable to enrich the recommendation statement template, and the specific type of the extended variable can be any one or more of the four components mentioned above. Optionally, the number of extended variables can also be one or more. For example: "_argument": [certain little daughter], "sentence": "Generate a video of %_human% and %_argument%%_time% traveling". Another example: "_argument": [whole little daughter], where whole means that the characters are an intersection, indicating that pictures of the character human and his little daughter need to be retrieved. Correspondingly, the recommendation statement template includes corresponding element slots, and the generated recommendation statement contains elements of the extended components.

[0156] Optionally, the configuration information may also include a search strategy field, such as "how_," which indicates the search strategy for images. If "how_" is "TIME_AXIS," this indicates that the image collection corresponding to the recommended template can be searched from far to near based on the time axis. The specific form of the search strategy is not limited in this embodiment of the application.

[0157] Optionally, in the configuration information, "sentence" is the recommended sentence template. The space between the two % characters corresponds to the element slot. "priority" indicates the priority of the recommended sentence; a smaller number indicates a higher priority.

[0158] Optionally, the recommendation statement templates corresponding to the same recommendation template may also be different, for example, a recommendation template: "sentence": "Generate a video of %_human% and %_argument%%_time% traveling" and "sentence": "Generate a video of %_human% and %_argument% traveling". Based on this, the terminal device can generate a group of recommendation statements for the same recommendation template. The group of recommendation statements can be one or more recommendation statements, and the number of recommendation statements corresponds to the number of recommendation statement templates. When generating the recommendation statement template, the terminal device can recommend the recommendation statement with the highest priority first according to the recommendation priority "priority" of the recommendation statement.

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

[0160] Optionally, the configuration information may also include a field for the scheduling level, which indicates the priority level of the corresponding recommendation template when parsing. For example, "level". When "level": 0, it indicates that the priority level of the corresponding recommendation template when parsing is triggered based on other recommendation opportunities, and will not be triggered based on the background rotation policy of the terminal device, that is, it will not be triggered during idle periods. When "level" is not 0, it indicates that the corresponding recommendation template is parsed based on the background rotation policy, for example, during idle periods.

[0161] Optionally, the configuration information may also include a scan interval field, such as "scan_interval_hour," which indicates the minimum interval for resolving the recommended template, in hours. For example, a value of "scan_interval_hour": 4 indicates that the recommended template will not search the gallery repeatedly within four hours, thereby updating the corresponding atlas.

[0162] Optionally, the configuration information can also include a name field, such as "title", which represents the card name of the recommended template when displayed on the desktop. If "title":null, the card name corresponding to the recommended template can be input by value.

[0163] The following is the configuration information of several recommended templates corresponding to daily Vlog themes:

[0164]

[0165]

[0166] The following is the configuration information of several recommended templates corresponding to the food collection theme:

[0167]

[0168]

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

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

[0171] During the template parsing process, the elements of the above four components can be used as initial keywords, and then the gallery can be queried according to different initial keyword combinations to obtain the corresponding atlas. Specifically, the initial keyword combination can be obtained by combining the above four components: each element in "_time" with each element in "_location", each element in "_human" and each element in "_event". In order to facilitate the description of logic, taking the elements included in "_time": today and yesterday, the elements included in "_location": city C1 and scenic spot B2, the elements included in "_human": little daughter and lover, and the elements included in "_event": painting and dancing as an example, 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 + Attraction B1 + Little Daughter + Drawing;

[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 + Painting;

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

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

[0184] Yesterday + Attraction B1 + Little Daughter + Dancing;

[0185] Yesterday + Attraction B1 + Little Daughter + Painting;

[0186] Yesterday + Attraction B1 + Lover + Dancing;

[0187] Yesterday + attraction B1 + lover + painting.

[0188] If any of the four elements is empty, it means that the recommendation template does not focus on the empty element. Therefore, the generated initial keyword combination does not contain the initial keyword corresponding to the empty element. For example, if the elements of "_time" include: today and yesterday, the elements of "_location" include: city C1, the elements of "_human" are empty, and the elements of "_event" are empty, the generated initial keyword combinations include the following two types:

[0189] Today + City C1;

[0190] Yesterday + City C1.

[0191] Optionally, the number of elements of the above four components can also be other numbers, and the specific composition and number of the initial keyword combination formed will vary accordingly, which cannot be exhaustively listed. As long as the same initial keyword combination does not contain two or more elements of the same component, and the same initial keyword combination contains an element of a component in which each element is not empty, no further details will be given here.

[0192] Step 2: Keyword conversion.

[0193] After obtaining the initial keyword combination, the terminal device converts the time keyword and the person keyword in the initial keyword combination. For example, a group of initial keyword combinations is: today + city C1 + little daughter + dance:

[0194] The terminal device converts the initial keyword "today" into a specific date. If today's date is February 14, 2024, 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. Alternatively, if the time keyword in the initial keyword combination is "yesterday" and today is February 14, 2024, 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 the time element in the time element is converted, the time element is described as a start time and an 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 "little daughter" into the TagID corresponding to the little daughter. For example, in the album, the TagID corresponding to the little daughter's face or body is TagID-1, then the initial keyword "little daughter" is converted into the corresponding TagID-1.

[0198] If the location keyword is a city, scenic spot, or other location that can obtain the corresponding longitude and latitude, the location keyword does not need to be converted. If the location keyword is a manually set reference address, the location keyword can be converted to the corresponding map address, and the location keyword corresponding to this map address can be obtained. For example, the location keyword is: My Company. After learning the user's habits, the terminal device can obtain that the user's workplace is XX Office Building. The terminal device can then convert "My Company" into 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. The XX Office Building is an identified POI area.

[0199] After the above initial keyword combination undergoes keyword conversion, the terminal device can replace the corresponding initial keyword with the converted keyword, thereby converting the initial keyword combination into the corresponding search keyword combination. For example:

[0200] The initial keyword combination: today + my company can be converted into a search keyword combination: 0:00 to 23:59 on February 13, 2024 + XX office building.

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

[0202] When the initial keyword does not need to be converted, for example, when the location keyword is a city or a scenic spot, or when the initial keyword is an event keyword, the initial keyword can be used as a search keyword to form a search keyword combination to search the gallery.

[0203] Step 3: Search the gallery based on the converted search keyword combination to obtain the gallery corresponding to the search keyword combination.

[0204] Specifically, the terminal device can search for pictures that match the search keyword in the gallery as the picture album corresponding to the search keyword combination.

[0205] Let's continue with an example using an initial keyword combination of: 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 gallery to obtain all pictures whose generation time is between 0:00 and 23:59 on February 14, 2024, as the first atlas; then, searches the first atlas for all pictures with the location of city C1 as the second atlas; then, searches the second atlas for all pictures with TagID corresponding to TagID-2 as the third atlas; finally, searches the third atlas for all pictures whose semantic feature vectors match the event of drawing to obtain the fourth atlas. Based on this, the terminal device filters out the atlas corresponding to: today + city C1 + little daughter + dancing. The pictures in this atlas are all pictures of the little daughter dancing in city C1 taken between 0:00 and 23:59 on February 14, 2024. Optionally, in the process of obtaining the fourth atlas, the order of the four search components can also be adjusted. For example, the terminal device first searches for all images whose semantic feature vectors match the event "drawing", then searches for images whose generation time is between 0:00 and 23:59 on February 14, 2024, then searches for images with the little daughter, and finally searches for images with the location being city C1. The order in which the terminal device searches for the four elements is not limited in this embodiment of the application, as long as the image set that matches the four components is selected.

[0207] Optionally, when searching the gallery, the terminal device may determine whether the image satisfies the search keyword in the search keyword combination. If so, the image is added to the gallery; if not, the image does not need to be added to the gallery. The terminal device determines whether each image satisfies the search keyword in the search keyword combination, thereby generating the required gallery.

[0208] It should be noted that the specific process of searching for pictures whose semantic feature vectors match events can be: the terminal device can traverse the semantic feature vectors of all pictures that need to be searched according to the semantic feature vectors that describe the event elements, such as the semantic feature vectors of drawing. If the similarity between the semantic feature vector ClipID-1 corresponding to picture 1 and the semantic feature vector of drawing is higher than or equal to the preset similarity threshold, for example, higher than ninety percent, it means that the picture content of picture 1 most likely contains the event of drawing, and the terminal device determines that the semantic feature vectors of picture 1 and drawing match. If the similarity between the semantic feature vector ClipID-2 corresponding to picture 2 and the semantic feature vector of drawing is lower than the preset similarity threshold, it means that the picture content of picture 2 most likely does not contain the event of drawing, and it is determined that the semantic feature vectors of picture 2 and drawing do not match. Optionally, the value of the preset similarity threshold can also be other values ​​such as eighty-five percent, eighty percent, etc., which is not limited in the embodiments of the present application.

[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. If a component is empty, there is no need to search for that component. Furthermore, a component within a recommendation template may contain multiple elements, such as the person component, which includes the two elements: lover and younger daughter. When a component contains multiple elements, it is necessary to search for all of them. Alternatively, symbols can be used to distinguish between "and" or "or" relationships between multiple elements. For example, if two elements are written within the same brackets in the configuration file, for example, "human":[["I", "lover"]], this represents "I" and "lover". Therefore, the retrieved images must include both "I" and "lover". If the elements are written within two brackets in the configuration file, for example, "human":[["I"], ["lover"]], this represents "I" or "lover". Therefore, the retrieved images may include "I", "lover", or both. Optionally, other components, such as time elements, location elements, and event elements, may also be distinguished by symbols to form AND or OR relationships between multiple elements, which will not be elaborated here.

[0210] Optionally, after the terminal device searches for the atlas corresponding to the recommended template, it determines whether the number of pictures in the obtained atlas meets the quantity threshold. The quantity threshold can be a natural number, such as six. If the number of pictures in the atlas is less than the quantity threshold, for example, less than six, it means that the number of pictures in the searched atlas is small, and the effect of the generated video is not rich enough, then the atlas will no longer be recommended to the user, and the corresponding recommendation statement will not be displayed. The terminal device can then perform a search for the next search keyword combination. If the number of pictures in the atlas is greater than or equal to the quantity threshold, for example, greater than or equal to six, then the atlas can be recommended to the user, and the corresponding recommendation statement can be displayed.

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

[0212] After performing keyword conversion, the terminal device can generate a recommendation statement. The specific process for generating a recommendation statement is as follows: the terminal device can populate the initial keyword from the initial keyword combination into the recommendation statement template corresponding to the initial keyword combination, thereby generating the corresponding recommendation statement. This process can be referred to as instantiating a recommendation statement. 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 person slot: person, a location slot: location, and an event slot: event. Each element slot to be filled is distinguished by the symbol %; each slot is separated by two consecutive %s. For example, the terminal device populates the time slot of the recommendation statement template with the time "today," the person slot "little daughter," the location slot "attraction B," and the event slot "dancing," thereby generating the recommendation statement: "Generate a video of little daughter dancing at attraction B today." Optionally, the initial keywords in the above recommendation statement template are: %_time% %_human% %_location% %_event%.

[0213] For another example, when the recommendation sentence template "sentence" is: "Generate a video of %_time%%_event%. The recommendation sentence template includes a time slot: time and an event slot: event. Optionally, the event slot in the recommendation sentence template has been filled with "travel", then the recommendation sentence template "sentence" is: "Generate a video of %_time% travel". During the template parsing process, the terminal device can search for the search keywords %_time% and travel to obtain the corresponding atlas. At the same time, the time is filled into the time slot to generate the corresponding recommendation sentence: Generate a video of today's travel. The initial keywords in the recommendation sentence template are: %_time%%_event%.

[0214] Optionally, the specific implementation of the above search keyword combination can be implemented using the following five-layer for loop statement:

[0215]

[0216] Based on this, the terminal device can obtain one or more search keyword combinations corresponding to a recommended template, as well as the corresponding atlas for each search keyword combination and the recommended sentence for each search keyword combination, thereby obtaining the template parsing result. The terminal device then stores the template parsing result in the recommendation database. The storage of the atlas refers to the storage of the IDs of the images in the atlas.

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

[0218] This method of generating recommendation sentences by filling element slots based on a recommendation sentence template containing element slots is more flexible than pre-setting fixed recommendation sentences. The generated recommendation sentences conform to the user's spoken language habits, providing a better reading experience. Furthermore, the location and person elements of the aforementioned components can be clustered by images in a gallery, allowing the generated recommendation sentences to be customized for each user, achieving personalized presentation 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 every day. Optionally, the fixed time can be 8 o'clock every morning. Optionally, other triggering times can also be the moment when the terminal device first turns on the screen every morning, which is not limited in this embodiment of the application.

[0220] For example, let's assume the trigger time is 8:00 AM. For example, the current date, today, is February 14, 2024. The terminal device is configured to obtain 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 obtains the query date three days in advance, the query date obtained today is February 17, 2024. If the query date is configured to be obtained one day in advance, the query date obtained by the terminal device is February 15, 2024.

[0221] Continuing with the example of obtaining 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 the historical date are the same as or close to the month and day of the query date, for example, February 17th of previous years. Based on this, the terminal device can query events that occurred on February 17th of previous years and make recommendations to remind the user to avoid missing out on holidays, anniversaries, etc.

[0222] Optionally, the terminal device obtains the historical date corresponding to the month and day of the query date, and can also be a range of several days adjacent to February 17th of previous years. For example, the range of historical dates is seven days before February 17th of previous years, or seven days after February 17th of previous years, or can also be three days before February 17th of previous years to three days after February 17th of previous years. In the embodiment of the present application, the range of historical dates corresponding to the month and day of the query date can be obtained without limitation. Since users may celebrate some anniversaries not only on the historical date due to personal arrangements and other factors, they may also celebrate and take celebratory photos on the days before and after February 17th. Therefore, the terminal device obtains the range of historical dates corresponding to the month and day of the query date, which can expand the search range of pictures, thereby avoiding omissions and achieving accurate recommendations.

[0223] For example, consider a son's wedding on February 17th of last year. The user took multiple photos of the wedding that day. After clustering these wedding photos using the classification model, the image elements of the son and the wedding were obtained. The terminal device then associates "son" and "wedding" with February 17, 2023, and stores them in the historical event record. At 8:00 a.m. on February 14, 2024, the terminal device receives a query date of February 17, 2024, which corresponds to the historical date of February 17, 2023. The terminal device then queries the historical event record and finds that the events corresponding to February 17, 2023 are "son" and "wedding."

[0224] The terminal device then searches for recommended templates in the configuration file based on "son" and "wedding," and filters out one or more recommended templates that match the names of "son" and "wedding." Specifically, the terminal device may search for multiple recommended templates corresponding to the theme of the recommended template in the configuration file, and may also filter out other related recommended templates to obtain a recommended template as a to-be-selected recommended template (also referred to as a to-be-recommended template).

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

[0226]

[0227]

[0228] For the above two templates to be recommended, the user can execute the template parsing process described above to obtain the wedding photo album corresponding to the first template to be recommended, and the graduation ceremony photo album corresponding to the second template to be recommended. The terminal device can also refer to the method for generating recommendation statements described above, and correspondingly generate the first recommendation statement: generate a video of the son's wedding, and generate the second recommendation statement: generate a video of the son's graduation ceremony. Optionally, when there are multiple templates to be recommended, the terminal device can also determine the parsing order of different templates to be recommended based on the recommendation priority of different templates to be recommended. For example: if the recommendation priority of the first template to be recommended is 1 and the recommendation priority of the second template to be recommended is 2, the terminal device will prioritize parsing the first template to be recommended and prioritize generating the first recommendation statement.

[0229] Optionally, if the number of images found after parsing a high-priority template to be recommended is too small, for example, less than six, then the template to be recommended is considered invalid. The terminal device can then parse the template to be recommended with a lower priority based on the recommendation priority, obtain the corresponding image set, and generate a corresponding recommendation statement. The parsing process of the recommended template is not further described here.

[0230] Optionally, the preceding description describes an embodiment in which the triggering time is a fixed time of day and the query date is a fixed date of year. The attributes of the fixed date can be birthdays or wedding anniversaries; the fixed date can also be a holiday, such as Spring Festival, Labor Day, National Day, and other dates with a fixed or relatively fixed month and day. Optionally, the dates used in this application can be public dates or lunar dates, which are not limited in this embodiment. For example, holidays such as Spring Festival and New Year's Eve can use lunar dates.

[0231] In an embodiment of the present application, the terminal device analyzes and clusters images and makes timely and accurate recommendations to users based on the timeline. It can make accurate recommendations for events with floating dates that are not fixed holidays, and remind users in time not to miss the corresponding key dates, thereby improving the user experience.

[0232] Optionally, the triggering time for making recommendations to users in the embodiments of the present application can also be the time when a new event is generated. For example, the terminal device queries the gallery at a fixed time every day, such as 18:00 every evening. When a lot of new pictures are added to the gallery that day, CV analysis and clustering of the new pictures can be started to obtain corresponding events. For example, if the user travels on that day and takes a lot of pictures. The events obtained by clustering the newly taken pictures in the gallery include: travel. The terminal device can filter out recommendation templates related to travel as templates to be recommended based on the name of the travel event in the configuration file, and then make recommendations based on the templates to be recommended. In other words, the user's current trip can trigger recommendations for the last trip, which makes it easier for the user to recall the previous travel experience and improves the user experience.

[0233] Optionally, in the embodiment of the present application, the triggering time for making recommendations to the user may also be when the location located by the terminal device is different from the user's permanent residence. For example, when the terminal device obtains that the current location is not in the user's permanent 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 passing by, but is visiting the current location. The terminal device can then trigger a recommendation for a travel event. Optionally, the user's permanent residence can be a user portrait obtained by the terminal device learning the user's behavior, which will not be repeated here.

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

[0235] For example, when the terminal device obtains that the current location is not the user's permanent residence and the current location is scenic spot B1, it triggers a recommendation for the event of the last trip to the same location, scenic spot B1. Specifically, the terminal device can obtain a template to be recommended related to the trip. Then, based on the event element of the template to be recommended being a trip and the location element being scenic spot B1, a corresponding initial keyword combination is generated, and then keyword replacement and gallery search are performed based on the generated initial keyword combination to obtain one or more recommendation statements, and an atlas corresponding to the recommendation statement. For example, the time element in the recommendation template obtained by the terminal device includes the two elements: 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 search the gallery based on these two initial keyword combinations, obtain the corresponding atlas, and make recommendations.

[0236] It should be noted that triggering the recommendation of an event is to trigger the parsing of the template to be recommended corresponding to the event, thereby obtaining the corresponding atlas, generating a process with a recommendation statement and displaying the corresponding desktop recommendation card.

[0237] To clearly describe the recommended scenarios, the corresponding relationship between the recommended scenarios and the configuration information definitions is described in detail here in conjunction with the contents shown in 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 recommending the corresponding scene, time is the time when the corresponding scene is recommended, time_start is the start time corresponding to the scene, time_end is the end time corresponding to the scene, time_expiration is the expiration time of the validity period corresponding to the scene, human represents the person corresponding to the scene, person_id represents the person feature vector corresponding to the scene, location_city represents the place corresponding to the scene, location_poi represents the POI area corresponding to the scene, recommendation statement represents the recommendation statement corresponding to the scene, and recommendation topic represents the topic corresponding to the scene (corresponding to the topic in the configuration file).

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

[0248] In order to clearly describe the template parsing process of the embodiment of the present application, Figure 4 The interaction diagram shown is fully described. Figure 4 Shown, including:

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

[0250] S302. The camera application generates a picture or video in response to the user's shooting operation, and records the generation time and location information of the picture or video.

[0251] S303. The camera application sends the picture and / or video, as well as the generation time and location information, to the gallery for storage.

[0252] S304. The gallery performs CV analysis and clustering on the frames of the pictures and videos by day during the idle period to obtain the picture elements and scene parameters of the pictures.

[0253] Optionally, the gallery may also cluster the generated locations in the image elements to obtain location elements.

[0254] Specifically, the scene parameter may be an event obtained through clustering, and the name of the event obtained through clustering may be a label of the corresponding image.

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

[0256] Specifically, the startup instruction carries a scene parameter, and the startup service is used to launch the media recommendation generation engine.

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

[0258] S307. In response to the initialization instruction, the recommended template parser is initialized.

[0259] Specifically, the process of initializing the recommendation template parser involves obtaining a configuration file. Optionally, the configuration file can be in JSON format. The configuration file includes configuration information for the recommendation template. A detailed description of the configuration information can be found above and will not be repeated here.

[0260] S308. After the recommendation template parser is initialized, 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, there is no need to send a return initialization completion message, or return an initialization incomplete message 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) according to the scene parameters and executes the template parsing process.

[0263] The template parsing process includes: cyclically executing steps S310 to S317 for each configuration information of the template to be recommended.

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

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

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

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

[0268] It should be noted that the initial keywords that do not need to be converted can be used as corresponding search keywords.

[0269] S312. The media recommendation generation engine sends a search instruction to the gallery, where the search instruction carries at least one search keyword.

[0270] S313. The gallery searches for pictures in the gallery according to at least one search keyword to obtain a corresponding gallery.

[0271] The image elements of the images in the collection match at least one search keyword. For example, the time when the images in the collection were generated is a time within the time period indicated by the time search keyword in at least one search keyword; for another example, the location where the images in the collection were generated is a location indicated by the location search keyword in at least one search keyword.

[0272] S314. The gallery returns the identifier of the image in the gallery as the search result to the media recommendation generation engine.

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

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

[0275] S316. The media recommendation generation engine instantiates the recommendation statement.

[0276] Specifically, the media recommendation generation engine fills the at least one initial keyword into a corresponding element slot of the sentence template to be recommended, completing the assembly of the recommendation sentence, that is, realizing the instantiation of the recommendation sentence.

[0277] S317. The media recommendation generation engine sends the recommendation sentence generated by the at least one initial keyword and the searched atlas to the recommendation database for storage.

[0278] Optionally, the atlas sent by the media recommendation generation engine may be a collection of identifiers of the images in the atlas; optionally, the media recommendation generation engine may also send identifiers of images in the atlas that serve as covers; optionally, the media recommendation generation engine may also send assembled recommendation statements.

[0279] The set of identifiers of the pictures in the above-mentioned collection, the identifier of the picture serving as the cover, and the recommendation statement may all be persistently stored in the recommendation database.

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

[0281] S318. The media recommendation generation engine sends a display instruction 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 atlas. The display instruction also carries the template title of the parsed template to be recommended. Optionally, the display instruction may also carry the cover of the parsed template to be recommended.

[0283] After completing the parsing of all templates to be recommended, the media recommendation generation engine may execute S320 and subsequent processes.

[0284] S319. The desktop service displays the desktop recommendation card.

[0285] The specific desktop recommendation card displays the template 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 displays the title: Son's Wedding.

[0286] Optionally, the desktop recommendation card may also display the cover corresponding to the obtained atlas as the card background.

[0287] S320. The media recommendation generation engine ends the process.

[0288] It should be noted that the execution order of S319 and S320 is not limited in this application, and they are executed separately by the desktop service and the media recommendation generation engine without conflicting with each other.

[0289] Optionally, if an abnormal situation occurs during the CV analysis, such as a sudden change from charging to off-screen status, indicating that the user may need to use the terminal device, the gallery can send an end instruction to the media recommendation generation engine. In response to the end instruction, the media recommendation generation engine ends the template parsing process, thereby freeing up resources to ensure normal user use of the terminal device.

[0290] Optionally, after completing CV analysis and clustering, the gallery may also send an end instruction to the media recommendation generation engine to instruct the media recommendation generation engine to release resources.

[0291] above Figure 4 In the interaction diagram shown, the implementation principle and technical effect of each step can be found in the previous description and will not be repeated here.

[0292] After the terminal device has finished parsing the recommendation template, the terminal device can recommend the corresponding recommendation sentence to the user when the user operates the gallery, including:

[0293] When the user opens the gallery, the terminal device displays the gallery homepage interface, such as Figure 5 As shown in Figure a. Figure 5 The gallery homepage, shown in Figure a, includes a card for Smart Photos. The gallery homepage also includes other cards, such as One-Click Blockbuster, Clips, and thumbnails of portraits. The bottom of the gallery homepage also displays icons for multiple tabs, including Photos, Albums, Moments, and Creations. Users can access different gallery interfaces by clicking on different tab icons.

[0294] When the user clicks on the Smart Photo function in the gallery homepage, the Smart Photo function is activated. The terminal device can display the following Figure 5 The first-level page of the smart film is shown in Figure b. The first-level page of the smart film displays multiple recommended sentences. Figure 5 In the diagram b in FIG, three recommendation statements are shown as an example. In each recommendation statement entry, a thumbnail of the corresponding cover is also displayed. Optionally, if the cover is not defined in the collection corresponding to the recommendation statement, the entry of the recommendation statement may not display any image thumbnail, and only the text of the corresponding recommendation statement may be displayed, for example Figure 6 As shown in Figure a. Alternatively, Figure 5 Figure b and Figure 6 As shown in Figure a, on the first-level page of Smart Film, a prompt can be displayed above the entry of the recommended statement.

[0295] by Figure 5 Taking Figure b in the figure as an example, the first-level page of the smart film also includes a theme switch control, such as "More Skills"; it also includes a recommended sentence switch control, such as "Change". When the user clicks the recommended sentence switch control, the terminal device can switch the recommended sentence. For example, the user is in the following Figure 5 Click the "Change" control in Figure b, and the terminal device will display the following Figure 7 Recommended statement shown.

[0296] Users can click on a recommended sentence in the Smart Video page to enter the secondary page of Smart Video, such as Figure 8 As shown. The secondary page of the smart film can be displayed in the form of a dialogue, including a recommendation statement and an answer statement generated by the terminal device in response to the recommendation statement, as well as a card of the album corresponding to the recommendation statement. Optionally, the card of the album may include thumbnails of multiple pictures in the album; it may also include a control for displaying all, such as "View All"; it may also include a video generation control, such as "Generate Video". When the user clicks on the control for displaying all, the terminal device displays all or part of the pictures in the album. Optionally, the control for displaying all can also display the number of pictures in the album. When the user clicks on the video generation control, the terminal device generates a corresponding short video for the pictures in the album according to the recommendation template corresponding to the recommendation statement. The text, display effect, watermark and background music in the short video are defined by the corresponding recommendation template.

[0297] When the user clicks the theme switch control on the first-level page of Smart Film, the terminal device displays the theme selection interface, such as Figure 6 As shown in Figure b. The theme selection interface includes multiple theme cards, such as daily Vlog, personal portrait, family photo, etc. When a user clicks on any theme card, the recommended sentence corresponding to the theme will be displayed. For example, when a user clicks Figure 6 When the card of the travel Vlog theme in Figure b is displayed, the terminal device displays multiple recommendation sentences corresponding to the travel Vlog theme, such as Figure 8 As shown. Users can Figure 8 Select the desired recommendation statement on the secondary page shown, and a corresponding short video will be generated. The terminal device can play the short video, store it, and forward it. This enriches the way to browse and share pictures, and improves the user experience.

[0298] Optionally, the way to display the recommended statements in the above-mentioned secondary page can also be to display them according to the priority of the recommended statements. For example, when the secondary page is displayed for the first time, the three recommended statements with the highest priority are displayed. When the user clicks "Change", three recommended statements with a lower priority than the third recommended statement are displayed. Optionally, the priority of the recommended statement can be displayed based on the number of pictures in the corresponding collection. The more pictures there are in the collection, the higher the priority of the corresponding recommended statement; the fewer pictures there are in the collection, the lower the priority of the corresponding recommended statement. Optionally, the priority of the recommended statement 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 recommended template, the higher the priority of the corresponding recommended statement; the further the update time of the recommended template, the lower the priority of the corresponding recommended statement. Optionally, if a recommended statement exists in the history of the recommended statement, it means that the recommended statement has been recommended to the user, then the priority of the recommended statement is reduced, and the priority of other recommended statements that have not been recommended is increased. This can improve the differentiation of the presentation of the recommended statements, make the generated short videos differentiated, and make the user experience richer.

[0299] In an embodiment of the present application, when the user starts the smart video function, the terminal device can automatically display the recommended sentence and guide the user to generate a short video corresponding to the recommended sentence. Optionally, the user can also input a similar sentence by voice or text according to the guidance of the recommended sentence. The terminal device can then perform semantic recognition on the sentence input by the user, obtain the initial keyword combination corresponding to the sentence, and then perform keyword conversion on the initial keywords in the initial keyword combination to obtain the corresponding search keyword combination. The terminal device can search in the gallery based on the search keyword combination, obtain the atlas corresponding to the sentence input by the user, and display it. The display method can be referred to as Figure 8 The dialog form shown here shows the recommended sentence entered by the user. The specific description of the acquisition of the initial keyword combination, keyword conversion, and searching in the gallery based on the search keyword combination in this embodiment can be found in the relevant description above and will not be repeated here.

[0300] Optionally, the above CV analysis process can also be executed after the user clicks on the smart film. This embodiment of the present application does not limit this.

[0301] Optionally, the interface of the terminal device displaying the desktop recommendation card can also be seen as follows Figure 9 As shown in Figure a. Users can also Figure 9 In the desktop recommendation card shown in Figure a, click on the control to start the smart film function, such as "Create Video". The terminal device can enter the following Figure 9 The second level page of the smart film is shown in Figure b. Users can also Figure 9In the interface shown in Figure b, click the return control, and the terminal device will display the following Figure 9 The desktop shown in Figure a includes desktop recommendation cards. For other descriptions of this secondary page, please refer to the above and will not be repeated here.

[0302] Figure 10 This is a flow chart of a method for obtaining an atlas provided in an embodiment of the present application. The method includes:

[0303] S1001. Acquire historical event records, where the historical event records include correspondences between multiple historical image elements and multiple historical dates. The multiple historical image elements include one or more of a generation location, a person identifier, and a generation location.

[0304] Optionally, the types of historical picture elements may include one or more of the generation location, character identification, and generation location. The elements in each historical picture element may be one or more. The pictures that generate historical picture elements all correspond to their respective generation times. Taking a picture as an example, the correspondence between all picture elements of the picture and the generation time (date of generation) forms a corresponding relationship in a set of historical event records. Optionally, the foregoing corresponds to days, and optionally, the time unit of the correspondence can also be weeks, months, years, or several years (for example, the past three years), or a combination of different time units (for example, the Spring Festival in the past three years). The embodiments of the present application do not limit this.

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

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

[0307] If the image element to be recommended queried by the terminal device is empty, no recommendation will be made.

[0308] S1003: Filter out, from a plurality of recommendation templates, at least one template to be recommended corresponding to the at least one picture element to be recommended based on the at least one picture element to be recommended.

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

[0310] If the terminal device cannot find a matching template to be recommended, no recommendation will be made.

[0311] S1004: Filter out a first set of images that matches the components of the first template to be recommended from the image library based on the components of the first template to be recommended, wherein the first template to be recommended is any one of the at least one template to be recommended.

[0312] Taking any first template to be recommended among the at least one template to be recommended as an example, the terminal device can query pictures matching the components of the first template to be recommended from the gallery as the first picture set corresponding to the first template to be recommended.

[0313] If the components of the first template to be recommended match, this indicates that the image element of the image matches one or more elements of at least one component 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, the terminal device can search for images acquired last month as the first atlas. For details, please refer to the previous description and will not be repeated here.

[0314] In an embodiment of the present application, the terminal device analyzes and clusters images and makes timely and accurate recommendations to users based on the timeline. It can make accurate recommendations for events with floating dates that are not fixed holidays, and remind users in time not to miss the corresponding key dates, thereby improving the user experience.

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

[0316] The difference in 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 day threshold. The day difference mentioned here may not consider the year, but only consider the month and day.

[0317] For example, if N is 3, the month and day of the historical date are the same or close to the month and day of the query date. For example, if today is February 14, 2024, the query date could be February 17, 2024. Based on this, the terminal device can query historical dates, such as events that occurred on February 17 in previous years (last year or the year before), and make recommendations to remind the user to avoid missing holidays or anniversaries.

[0318] Optionally, the terminal device obtains the historical date corresponding to the month and day of the query date, and can also be a range of several days adjacent to February 17th of previous years. For example, the range of historical dates is seven days before February 17th of previous years, or seven days after February 17th of previous years, or can also be three days before February 17th of previous years to three days after February 17th of previous years. In the embodiment of the present application, the range of historical dates corresponding to the month and day of the query date can be obtained without limitation. Since users may celebrate some anniversaries not only on the historical date due to personal arrangements and other factors, they may also celebrate and take celebratory photos on the days before and after February 17th. Therefore, the terminal device obtains the range of historical dates corresponding to the month and day of the query date, which can expand the search range of pictures, thereby avoiding omissions and achieving accurate recommendations.

[0319] In some possible implementations, the theme of the first template to be recommended includes a first picture 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 a recommended template whose theme includes the first image element to be recommended as the template to be recommended. Optionally, the terminal device may search the multiple image elements to be recommended found in the historical date query one by one to obtain a recommended template that includes 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: time elements, location elements, person elements and event elements. According to the constituent elements of the first template to be recommended, a first atlas matching the constituent elements of the first template to be recommended is screened out from the gallery, including: generating at least one group of search keyword combinations according to the constituent elements of the first template to be recommended; searching the gallery according to at least one search keyword in the first search keyword combination to obtain a first atlas matching at least one search keyword, the first search keyword combination being any one of at least one group of search keyword combinations.

[0322] The specific process of the terminal device generating the corresponding atlas based on the components of the recommended template can be found in the relevant description in the previous article and will not be repeated here.

[0323] In some possible implementations, the method further includes: displaying a desktop recommendation card 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.

[0324] Specifically, the terminal device can generate a card name after filling elements in the title or receiving external parameters. The terminal device can also generate a desktop recommendation card and display it in the area at the top of the screen. The title is defined by "title" in the configuration information. When "title":null, it means that it is generated using external parameters. Optionally, it can also be "title":%human%'s%event%, or%human%'s birthday. The terminal device fills the element corresponding to human: Qiuqiu, and the element corresponding to event: birthday into "title", generates the corresponding card name: Qiuqiu's Birthday, and displays it in the desktop recommendation card. Optionally, the title here is an example. The actual title can also be a different combination of different types of components, and each component element can also be filled with different elements to obtain the corresponding card name, which will not be repeated here.

[0325] In some possible implementations, the background image of the desktop recommendation card is a picture generated according to the cover of the first picture album.

[0326] Optionally, the cover of the atlas can be one selected from multiple pictures in the atlas. Optionally, the terminal device can crop the cover. For example, the terminal device can identify the area where the person is located from the cover, and then crop out a rectangle containing the smallest area of ​​the person. Afterwards, the terminal device scales the rectangular area to generate a card that is the same or similar in size to the desktop card, and displays it as the background image of the desktop recommendation card, so that the desktop recommendation card can clearly present the person involved in the corresponding atlas, thereby improving the user experience.

[0327] In some possible implementations, the method further includes: receiving a first operation input by a user for a first control in a desktop recommendation card; and displaying a first interface in response to the first operation, wherein the first interface includes an icon corresponding to the first atlas.

[0328] Specifically, the desktop recommendation card includes a first control, such as Figure 9 The user performs a first operation of clicking on the first control, and the terminal device enters the smart video and displays the first interface. Figure 9 As shown in Figure b. Figure 9 The description of Figure b in the previous section can be found in Figure 8 The two differ only in the displayed content, which will not be described here. Figure 9 When the return control in Figure b is displayed, the terminal device returns to displaying the desktop, for example, Figure 9 Figure a shows an interface containing desktop recommendation cards.

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

[0330] A detailed description of how the terminal device generates the first recommendation statement based on the first recommendation statement template of the first template to be recommended can be found in the previous description of generating the recommendation statement, which will not be repeated here. After the recommendation statement is generated, if the user clicks the screen to enter the first interface, the first recommendation statement can also be displayed in the first interface. Optionally, other recommendation statements can also be displayed in the first interface. The strategy for displaying the recommendation statement can also be found in the previous description, which 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 for the second control; in response to the second operation, generating a video file containing the first picture set according to the first template to be recommended; and playing and / or storing the video file.

[0332] Specifically, the above-mentioned first interface also includes a second control, such as "Generate Video". When the user performs the second operation on the second control, that is, clicks "Generate Video", the terminal device generates a corresponding video file (the small video in the previous text) for the pictures in the first atlas according to the first recommendation template corresponding to the first recommendation statement. The text, display effects, watermarks and background music in the video file are defined by the corresponding first recommendation template. The terminal device can play the video file, and can also store and forward the video file. As a result, the way of browsing and sharing pictures is enriched, and the user experience is improved.

[0333] In some possible implementations, before the desktop recommendation card is displayed on the desktop, it also includes: if the number of pictures in the first atlas does not meet the preset number requirement, then based on the components of the second template to be recommended, a second atlas matching the second template to be recommended is screened out from the gallery; wherein the second template to be recommended is a recommended template that is different from the first template to be recommended in at least one template 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.

[0334] Optionally, if the number of pictures in the first atlas does not meet the preset number requirement, for example, it is less than six, the terminal device will filter out a second atlas matching the second to-be-recommended template from the gallery based on the components of the second to-be-recommended template whose priority is lower than the first to-be-recommended template. Optionally, if the second atlas still does not meet the preset number requirement, the terminal device will continue to filter out a third atlas matching the third to-be-recommended template from the gallery based on the components of the third to-be-recommended template whose priority is lower than the second to-be-recommended template, and so on, until an atlas meeting the preset number requirement is filtered out. Optionally, the preset number requirement can also be other natural numbers such as 10, 20, etc., which is not limited in the embodiments of the present application.

[0335] In some possible implementations, the method also includes: detecting multiple new pictures added to the gallery; analyzing and clustering the multiple new pictures to obtain picture elements of the new pictures; and screening out at least one to-be-recommended template corresponding to the picture elements of the new pictures from multiple recommended templates based on one or more of the picture elements of the new pictures.

[0336] Optionally, the triggering time for making recommendations to users in the embodiment of the present application can also be the time when a new event is generated. For example, the terminal device queries the gallery at a fixed time every day, such as 18:00 every evening. When a lot of new pictures are added to the gallery that day, CV analysis and clustering of the new pictures can be started to obtain corresponding events. Then, the recommendation template is queried based on the obtained event to obtain at least one template to be recommended that matches the newly generated event. The way in which the terminal device retrieves the template to be recommended that matches the event can be found in the relevant description in the previous text and will not be repeated here. The terminal device can then make recommendations based on at least one template to be recommended. This method can automatically trigger template recommendations based on newly added pictures, so that the recommended content matches the user's behavior, making it easier for users to recall their previous travel experiences and improving the user experience.

[0337] In some possible implementations, the method also includes: when it is detected that the current location does not match the user's permanent residence, and the stay time at the current location is greater than a preset time threshold, determining that at least one image element to be recommended includes a travel event; based on the travel event, filtering out at least one template to be recommended corresponding to the travel event from multiple recommendation templates.

[0338] For example, if the terminal device detects that the current location is not in the user's usual place of residence (including the user's home and work), and the user has stayed 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 passing through the current location, but is visiting the current location. The terminal device can then automatically trigger travel event recommendations based on the change of location, making it easier for users to recall previous travel experiences and improving the user experience.

[0339] In some possible implementations, the method also 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 of multiple historical picture elements, determining that at least one picture element to be recommended includes a travel event and the current location; based on the travel event and the current location, screening out at least one template to be recommended corresponding to the travel event and / or the current location from multiple recommendation templates, and the location element in at least one template to be recommended is the current location.

[0340] For example, when the terminal device obtains that the current location is not the user's permanent residence and the current location is scenic spot B1, it triggers the recommendation of the event of the last trip to the same location, scenic spot B1. Specifically, the terminal device can obtain a travel-related template to be recommended. Then, based on the event element of the template to be recommended being a trip and the location element being scenic spot B1, a corresponding initial keyword combination is generated, and then keyword replacement and gallery search are performed based on the generated initial keyword combination to obtain one or more recommendation statements, and an atlas corresponding to the recommendation statement. For example, the time element in the recommendation template obtained by the terminal device includes the two elements: last month and last year, then the initial keyword combination may include: scenic spot B1 + last month + trip, and scenic spot B1 + last month + last year. The terminal device can search the gallery based on these two initial keyword combinations, obtain the corresponding atlas, and make recommendations. The terminal device can automatically trigger the recommendation of travel events based on the change of location, which makes it easier for users to recall their previous travel experiences and improves the user experience.

[0341] In some possible implementations, obtaining at least one image element to be recommended that matches the current date from historical event records includes: obtaining at least one image element to be recommended from historical event records when the screen is lit for the first time on the current date.

[0342] The terminal device can obtain at least one image element to be recommended from the historical event record when the screen is turned on for the first time every day, thereby starting the recommendation process.

[0343] In some possible implementations, obtaining historical event records includes: analyzing multiple pictures in a gallery to obtain picture elements of the multiple pictures, where the picture elements include: one or more of: generation time, generation location, character feature vectors, and semantic feature vectors, where the semantic feature vectors are used to represent the picture content of the picture; clustering the picture elements of the multiple pictures according to date to obtain historical event records.

[0344] The method for generating historical event records can be found in the previous section and will not be further elaborated here. Multiple images in the terminal device's image library are analyzed to obtain their image elements. These image elements are then clustered by date to generate historical event records. This allows for time-based recommendation of relevant image collections to users, preventing the omission of important dates and improving the user experience.

[0345] The above describes in detail an example of the method provided by the present application. It is understandable that, in order to implement the above functions, the corresponding device includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in a hardware or computer software driven hardware manner depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0346] The present application can divide the atlas acquisition device into functional modules according to the above method examples. For example, each function can be divided into various functional modules, or two or more functions can be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in this application is schematic and is only a logical functional division. There may be other division methods in actual implementation.

[0347] Figure 11 The schematic diagram of the structure of a device for obtaining an atlas provided by the present application is shown. The device 1100 includes:

[0348] The acquisition module 1101 is used to acquire historical event records, which include correspondences between multiple historical image elements and multiple historical dates. The multiple historical image elements include one or more of a generation location, a character identifier, and a generation location.

[0349] The query module 1102 is configured to obtain at least one image element to be recommended corresponding to the current date from the historical event records.

[0350] The screening module 1103 is configured to screen out at least one template to be recommended 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.

[0351] The search module 1104 is configured to filter out a first set of images that matches the components of the first template to be recommended from the image library according to the components of the first template to be recommended; wherein the first template to be recommended is any one of the at least one template to be recommended.

[0352] The specific manner in which the apparatus 1100 executes the atlas acquisition method and the beneficial effects produced can be found in the relevant description in the method embodiment, which will not be repeated here.

[0353] The embodiment of the present application also provides an electronic device, including the above-mentioned processor. The electronic device provided by this embodiment can be Figure 1 The terminal device 100 shown is used to perform the above-mentioned atlas acquisition method. When integrated, the terminal device may include a processing module, a storage module, and a communication module. The processing module may be used to control and manage the terminal device's operations. For example, it may be used to support the terminal device in executing the steps performed by the display unit, detection unit, and processing unit. The storage module may be used to support the terminal device in executing and storing program code and data. The communication module may be used to support communication between the terminal device and other devices.

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

[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 may be a Figure 1 Device with the structure shown.

[0356] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the processor executes the atlas acquisition method described in any of the above embodiments.

[0357] An embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, it enables the computer to execute the above-mentioned related steps to implement the atlas acquisition method in the above-mentioned embodiment.

[0358] Among them, the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in 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 devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, the replaced units may or may not be physically separated, and the components displayed as units may be one physical unit or multiple physical units, that is, they may be located in one place, or they may be distributed in multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the scheme of this embodiment.

[0360] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0361] If the integrated unit is implemented in the form of 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 solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0362] The above content is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A method for acquiring an atlas, characterized in that: include: Acquire a historical event record, the historical event record including a correspondence between multiple historical image elements and multiple historical dates, the multiple historical image elements including one or more of a generation location, a person identifier, and a generation location; Acquire at least one image element to be recommended corresponding to the current date from the historical event record; According to the at least one picture element to be recommended, screening out at least one template to be recommended corresponding to the at least one picture element to be recommended from a plurality of recommendation templates; According to the components of the first template to be recommended, a first atlas matching the components of the first template to be recommended is screened from the atlas library; The first template to be recommended is any one of the at least one template to be recommended.

2. The method according to claim 1, characterized in that The difference in days between the first historical date corresponding to the first picture element to be recommended and the first query date corresponding to the first historical date is less than or equal to a preset day threshold, the first picture element to be recommended is any one of the at least one picture element to be recommended, the first historical date is a historical date among the multiple historical dates corresponding to the first picture element to be recommended, and 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 subject of the first template to be recommended includes the first picture element to be recommended.

4. The method according to claim 1, wherein The constituent elements of the first template to be recommended include at least one of a time element, a location element, a person element, and an event element. The selecting, from a gallery based on the constituent elements of the first template to be recommended, a first atlas that matches the constituent elements of the first template to be recommended includes: generating at least one set of search keyword combinations based on the components of the first template to be recommended; The picture library is searched according to at least one search keyword in the first search keyword combination to obtain the first picture set matching the at least one search keyword, and the first search keyword combination is any one of the at least one group of search keyword combinations.

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

6. The method according to claim 5, characterized in that The background image of the desktop recommendation card is a picture generated according to the cover of the first atlas.

7. The method according to claim 5 or 6, characterized in that The method further comprises: receiving a first operation input by a user for a first control in the desktop recommendation card; In response to the first operation, a first interface is displayed, wherein the first interface includes an icon corresponding to the first atlas.

8. The method according to claim 7, characterized in that The method further comprises: A first recommendation statement is generated according to the first recommendation statement template of the first template to be recommended, and the first interface also includes the first recommendation statement.

9. The method according to claim 8, characterized in that The first interface also includes a second control, and the method further includes: receiving a second operation input by the user for the second control; In response to the second operation, generating a video file including the first atlas according to the first template to be recommended; Play and / or store the video file.

10. The method according to any one of claims 5 to 9, characterized in that Before displaying the desktop recommendation card on the desktop, the method further includes: If the number of pictures in the first atlas does not meet the preset number requirement, then screening out a second atlas matching the second template to be recommended from the atlas library according to the constituent elements of the second template to be recommended; The second template to be recommended is a recommended template different from the first template to be recommended among the at least one template 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.

11. The method according to any one of claims 5 to 10, characterized in that The method further comprises: Detected that multiple new pictures were added to the gallery; Analyzing and clustering the multiple newly added pictures to obtain picture elements of the newly added pictures; According to one or more picture elements of the newly added picture, at least one to-be-recommended template corresponding to the picture element of the newly added picture is filtered out from the multiple recommended templates.

12. The method according to any one of claims 1 to 10, characterized in that The method further comprises: When it is detected that the current location does not match the user's permanent location, and the duration of stay at the current location is greater than a preset duration threshold, determining that the at least one image element to be recommended includes a travel event; According to the travel event, at least one to-be-recommended template corresponding to the travel event is filtered out from the multiple recommended templates.

13. The method according to any one of claims 1 to 10, characterized in that The method further comprises: When it is detected that the current location does not match the user's permanent location, and the current location is one of the generation locations of the multiple historical picture elements, determining that the at least one picture element to be recommended includes a travel event and the current location; According to 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 screened out from a plurality of recommendation templates, and the location element in the at least one template to be recommended is the current location.

14. The method according to any one of claims 1 to 13, characterized in that The acquiring at least one image element to be recommended that matches the current date from the historical event record includes: When the screen is lit up for the first time on the current date, the at least one picture element to be recommended is obtained from the historical event record.

15. The method according to any one of claims 1 to 14, characterized in that The obtaining of historical event records includes: Analyzing the plurality of images in the image library to obtain image elements of the plurality of images, the image elements including: one or more of: generation time, generation location, character feature vectors, and semantic feature vectors, the semantic feature vectors being used to represent the image content of the images; The picture elements of the multiple pictures are clustered according to date to obtain the historical event records.

16. An electronic device, characterized in that: include: processors, memory, and interfaces; The processor, the memory, and the interface cooperate with each other so that the electronic device executes the method according to any one of claims 1 to 15.

17. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 15.

Citation Information

Patent Citations

  • Photo album generation method and terminal

    CN106776821A

  • Video generation method and device, electronic equipment and storage medium

    CN117201837A

  • Commodity display graph generation method and device, and medium

    CN117315072A

  • Album creating apparatus, album creating method and album creating program

    JP2011103135A

  • Using favorite digital images to organize and identify electronic albums

    US20040201752A1