Media resource recommendation method, electronic equipment and storage medium

By recommending media resources at different times and places based on the content of the media resources, the problem of how to effectively recommend media resources in electronic devices is solved, and the user experience is improved.

CN120343340APending Publication Date: 2025-07-18HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410519704.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-01-10
Filing Date
2024-04-26
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

In the prior art, how to effectively recommend media resources to improve user experience after electronic devices acquire media materials is a challenge.

Method used

Electronic devices improve the relevance of recommendations by recommending media resources at different times and places based on the content of the media resources, including the characters and shooting time.

Benefits of technology

In terms of time and space, the correlation between media resources and users has been improved and the user experience has been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120343340A_ABST
    Figure CN120343340A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of terminals, in particular to a method for recommending media resources, electronic equipment and a storage medium. In the method, the electronic equipment recommends a first media resource in response to the fact that current time is target time; the first media resource comprises a first media material, and the first media material comprises a character object. Then, if the character object is the user of the electronic equipment, the target time is first time, and the first time has a corresponding relation with the shooting time of the first media material; if the character object is not the user of the electronic equipment, determining that the target time is second time; the second time and the shooting time of the first media material have a corresponding relation, and the second time is earlier than the first time. In the method, the electronic equipment can recommend the media resource comprising the first media material at different times according to the media resource content. The relevance between the recommended media resources and the user can be improved in the time dimension, and the use experience of the user can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims the priority of a Chinese patent application with the application number 202410046067.2 and the invention title "A Method for Reaching Wonderful Moments in a Picture Gallery" filed with the National Intellectual Property Administration on January 10, 2024, the entire content of which is incorporated herein by reference. Technical Field

[0002] Embodiments of this application relate to the technical field of terminals, and in particular, to a method for recommending media resources, an electronic device, and a storage medium. Background Art

[0003] With the development of terminal technology, users use electronic devices more and more frequently, and users will use the shooting function of electronic devices to record their lives.

[0004] At present, after an electronic device captures media materials, the electronic device can obtain media resources based on the shooting time, shooting location, etc. of the media materials. However, after the electronic device obtains the media resources, how to recommend the media resources to the user is a problem to be solved. Summary of the Invention

[0005] Embodiments of this application provide a method for recommending media resources, an electronic device, and a storage medium, which can recommend the media resources according to the content of the media resources, and can improve the relevance between the recommended media resources and the user.

[0006] In a first aspect, a method for recommending media resources is provided. This method can be applied to electronic devices such as mobile phones and tablet computers. The method includes: in response to the current time being a target time, the electronic device recommends a first media resource; the first media resource includes a first media material, and the first media material includes a human object. Then, if the human object is the user of the electronic device, the target time is a first time, and the first time has a corresponding relationship with the shooting time of the first media material; if the human object is not the user of the electronic device, the target time is a second time; the second time has a corresponding relationship with the shooting time of the first media material, and the second time is earlier than the first time.

[0007] Among them, the fact that the first time has a corresponding relationship with the shooting time of the first media material can be understood as that the year of the first time is later than the shooting time of the first media material, and the month and date of the first time are the same as those of the first media material; the fact that the second time has a corresponding relationship with the shooting time of the first media material can be understood as that the year of the second time is later than the shooting time of the first media material, and the month and date of the second time are earlier than those of the first media material; the person object is not the user of the electronic device, which can be understood as that the person object is the user's child, or the person object is the user's parent, or the person object is the user's spouse, or the person object is the user's grandparent, or the person object is the user's sister, or the person object is the user's brother, or the person object is the user's best friend, etc.

[0008] In this method, the electronic device can recommend media resources including the first media material at different times according to the media resource content, such as whether the first media material includes the user of the electronic device. It can enhance the relevance between the recommended media resources and the user in the time dimension and improve the user experience.

[0009] In a possible design of the first aspect, the method for recommending media resources further includes: in a preset time period, in response to the distance between the current position of the electronic device and the target position being greater than or equal to a first preset distance, the electronic device recommends a second media resource; the second media resource includes a second media material, and the shooting position of the second media material corresponds to the target position. Among them, the above-mentioned target position can be preset, such as the usual residence or long-term residence of the mobile phone user. The above-mentioned preset time period can be the time period corresponding to festivals such as Spring Festival, Christmas, Mid-Autumn Festival, Halloween, Thanksgiving, etc., or some other preset time periods.

[0010] In this design, the electronic device can recommend media resources at different times according to whether the position of the electronic device is the target position within the preset time period. For example, when the user is not at the target position within the preset time period, the electronic device immediately recommends a media resource including a media material whose shooting position is the hometown. Thus, the relevance between the media material recommended by the electronic device and the user in space can be enhanced.

[0011] In a possible design of the first aspect, the above-mentioned target position can be associated with the user of the electronic device. That is to say, the above-mentioned target position is the location corresponding to the position information with a relatively high frequency of occurrence in the position information counted by the mobile phone.

[0012] In another possible design of the first aspect, the method for recommending media resources further includes: capturing third media material at a target location within a preset time period; next, after the preset time period, in response to the distance between the current location and the target location exceeding a second preset distance, or the current location being the usual residence of the electronic device, the electronic device recommends third media resources; the third media resources include the third media material.

[0013] That is to say, in this design, the electronic device can recommend media resources at different times according to whether the location of the electronic device is the user's hometown within a preset time period; for example, when the user is in their hometown within the preset time period, after the user leaves their hometown, the electronic device recommends media resources including media material whose shooting location is the hometown. Thus, the relevance of the media material recommended by the electronic device in terms of space to the user can be enhanced.

[0014] In yet another possible design of the first aspect, the above method further includes: in response to satisfying a first condition, the electronic device recommends a fourth media resource, where the fourth media resource includes a fourth media material. The first condition includes any one of the following conditions: the current location corresponds to the shooting location of the fourth media material, and the difference between the shooting time of the media material on the electronic device whose shooting location is the shooting location of the fourth media material and the current time is greater than or equal to a first duration, and the first duration is a positive integer. The current location corresponds to the shooting location of the fourth media material, and the difference between the shooting time of the media material on the electronic device whose shooting location is the shooting location of the fourth media material and the current time is less than the first duration and greater than or equal to a second duration, and the number of media materials whose shooting location is the shooting location of the fourth media material is greater than a first quantity, the second duration is shorter than the first duration, the second duration is a positive integer, and the first quantity is a positive integer. The current location corresponds to the shooting location of the fourth media material, and the difference between the shooting time of the media material on the electronic device whose shooting location is the shooting location of the fourth media material and the current time is less than the second duration and greater than or equal to a third duration, and the number of media materials whose shooting time is within a target time period and whose shooting location is the shooting location of the fourth media material is greater than a second quantity; the third duration is shorter than the second duration, the third duration is a positive integer, the second quantity is greater than the first quantity, and the second quantity is a positive integer; the target time period is a time period starting from the second duration before the current time to the third duration before the current time. Among them, the current location corresponding to the shooting location of the fourth media material includes: the distance between the current location and the shooting location of the fourth media material is less than or equal to a third preset distance; the media material on the electronic device whose shooting location is the shooting location of the fourth media material can be understood as the media material stored in the gallery of the electronic device whose shooting location is the shooting location of the fourth media material, or the media material obtained by the electronic device through the user account whose shooting location is the shooting location of the fourth media material.

[0015] In yet another possible design of the first aspect, the above electronic device's recommendation of the first media resource may include: in response to the user's operation of turning on the display screen of the electronic device, the electronic device displays a desktop, and the desktop includes desktop cards; the desktop cards include the cover of the first media resource. When the person object is not the user of the electronic device, the desktop card further includes a forwarding control for the first media resource.

[0016] In this design, when the first media material does not include the user of the electronic device, that is, the first media resource is a media resource generated for the user's relatives and friends, the desktop card further includes a forwarding control for the first media resource, which can facilitate the user to forward the first media resource as a gift to the user's relatives and friends, and can improve the user's experience.

[0017] In another possible design of the first aspect, the above-mentioned desktop card further includes a text description, and the theme of the text description corresponds to the label of the first media material; the label of the first media material is obtained by identifying the first media material.

[0018] Among them, the fact that the theme of the text description corresponds to the label of the first media material can be understood as that the theme of the text description is obtained according to the label of the first media material, such as obtained according to the content type label of the first media material, or obtained according to the character attribute label of the first media material.

[0019] In this design, compared with some solutions where the text description only includes the shooting time and shooting location of the media material; the fact that the theme of the text description corresponds to the label of the first media material can make the text description included in the desktop card more vivid and can increase the relevance between the desktop card displayed by the electronic device and the user.

[0020] In another possible design of the first aspect, the above method further includes: in response to a trigger operation on the desktop card, the electronic device displays a playback interface for the first media resource.

[0021] In another possible design of the first aspect, the above recommendation of the first media resource includes:

[0022] The electronic device displays a notification message; in response to a trigger operation on the notification message, a media resource editing interface is displayed, and the media resource editing interface includes the first media resource and editing options for the first media resource.

[0023] In another possible design of the first aspect, the above method further includes:

[0024] The electronic device obtains media materials. Then, the electronic device performs multi-subject detection on the media materials to obtain labels of the media materials. The labels of the media materials include character attribute labels or content type labels. The character attribute labels are used to characterize the person objects included in the media materials, and the content type labels are used to characterize the content objects included in the media materials. Then, in the case where the number of media materials with the same content type label or the same character attribute label is greater than or equal to a preset number, the electronic device recommends a fifth media resource, and the fifth media resource includes multiple media materials with the same content type label or multiple media materials with the same character attribute label.

[0025] In another possible design of the first aspect, the above method further includes: in response to the current time being a preset festival time, the electronic device recommends a sixth media resource, and the sixth media resource includes media materials of the user. In response to the current time being earlier than the preset festival time, the electronic device recommends a seventh media resource, and the seventh media resource does not include media materials of the user.

[0026] In yet another possible design of the first aspect, the above-mentioned first media material includes videos and / or photos.

[0027] In a second aspect, an electronic device is provided. The electronic device includes a memory and one or more processors, and the memory is coupled to the processors. Among them, computer program code is stored in the memory, and the computer program code includes computer instructions. When the computer instructions are executed by the processors, the electronic device is caused to execute the method provided in the above-mentioned first aspect and any possible design of the first aspect.

[0028] In a third aspect, a computer-readable storage medium is provided, including computer instructions. When the computer instructions run on an electronic device, the electronic device is caused to execute the method provided in the above-mentioned first aspect and any possible design of the first aspect.

[0029] In a fourth aspect, a computer program product containing instructions is provided. When the computer program product runs on an electronic device, the electronic device can execute the method provided in the above-mentioned first aspect and any possible design of the first aspect.

[0030] Among them, for the technical effects brought by any design method in the second aspect to the fourth aspect, reference can be made to the technical effects brought by different design methods in the first aspect, which will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application;

[0032] Figure 2 It is a schematic diagram of the software architecture of an electronic device provided by an embodiment of the present application;

[0033] Figure 3 It is a schematic diagram of the flowchart of a method for recommending media resources provided by an embodiment of the present application;

[0034] Figure 4 It is a schematic diagram of a face detection process and a multi-subject detection process provided by an embodiment of the present application;

[0035] Figure 5 It is a schematic diagram of a process for a mobile phone to generate media resources provided by an embodiment of the present application;

[0036] Figure 6 It is a schematic diagram of the user graphical interface of a mobile phone provided by an embodiment of the present application;

[0037] Figure 7 It is a schematic diagram of another user graphical interface of a mobile phone provided by an embodiment of the present application;

[0038] Figure 8 Schematic diagram of the usage process of a mobile phone provided by an embodiment of the present application;

[0039] Figure 9 Schematic diagram of the user graphical interface of another mobile phone provided by an embodiment of the present application;

[0040] Figure 10 Schematic diagram of the usage process of another mobile phone provided by an embodiment of the present application;

[0041] Figure 11 Schematic diagram of the user graphical interface of another mobile phone provided by an embodiment of the present application;

[0042] Figure 12 Schematic diagram of the user graphical interface of another mobile phone provided by an embodiment of the present application;

[0043] Figure 13 Schematic diagram of the user graphical interface of another mobile phone provided by an embodiment of the present application;

[0044] Figure 14 Schematic diagram of the user graphical interface of another mobile phone provided by an embodiment of the present application;

[0045] Figure 15 Schematic diagram of the process for generating media resources provided by an embodiment of the present application;

[0046] Figure 16 Schematic diagram of the structure of another electronic device provided by an embodiment of the present application. Detailed implementation manners

[0047] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. Among them, in the description of the present application, unless otherwise specified, " / " means that the objects associated before and after are in an "or" relationship. For example, A / B may represent A or B; "and / or" in the present application is only an association relationship describing the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. These three situations, where A and B can be singular or plural. Also, in the description of the embodiments of the present application, unless otherwise specified, "a plurality" means two or more than two. "At least one (piece)" or similar expressions thereof refer to any combination of these items, including any combination of single item (piece) or plural items (pieces). For example, at least one (piece) of a, b, or c can represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, and c can be single or multiple. In addition, in order to clearly describe the technical solutions in the embodiments of the present application, in the embodiments of the present application, terms such as "first" and "second" are used to distinguish identical or similar items with basically the same functions and effects. Those skilled in the art can understand that terms such as "first" and "second" do not limit the quantity and execution order, and terms such as "first" and "second" do not necessarily limit being different.

[0048] Meanwhile, in the embodiments of the present application, words such as "exemplary" or "for example" are used to represent examples, illustrations, or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary" or "for example" is intended to present relevant concepts in a specific manner for easy understanding.

[0049] In the technical solutions disclosed in the present application, the processing of collection, storage, use, processing, transmission, provision, and disclosure of the user's personal information involved all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.

[0050] With the development of terminal technology, users use electronic devices more and more frequently, and users will use the shooting function of electronic devices to record their lives. For example, users can shoot media materials through electronic devices, such as videos, photos, and so on.

[0051] At present, electronic devices can obtain media materials and obtain media resources based on the shooting time, shooting location, etc. of the media materials. However, after the electronic devices obtain the media resources, how to recommend media resources to users is a problem to be solved.

[0052] An embodiment of the present application provides a method for recommending media resources. In this method, an electronic device can recommend media resources according to the content of the media resources. For example, in response to the current time of the electronic device being the target time, the electronic device recommends a first media resource, where the first media resource includes a first media material, and the first media material includes a human object. If the human object is the user of the electronic device, the target time is the first time; there is a corresponding relationship between the first time and the shooting time of the first media material; if the human object is not the user of the electronic device, the target time is the second time; there is a corresponding relationship between the second time and the shooting time of the first media material, and the second time is earlier than the first time.

[0053] In this method, a mobile phone can recommend the media resource at different times according to the content included in the media resource. For example, whether the media resource includes the mobile phone user, the media resource is recommended at different times. Thus, the relevance between the recommended media resource and the user can be improved in the time dimension, and the user experience can be enhanced.

[0054] Exemplarily, the method for recommending media resources provided by the embodiments of the present application can be applied to the daily use process of a user for an electronic device.

[0055] Among them, the above-mentioned electronic device 100 can also be referred to as a terminal, a terminal device, a user equipment (UE), a mobile station (MS), a mobile terminal (MT), etc. The above-mentioned electronic device 100 can be an electronic device with a display screen such as a mobile phone, a tablet computer, a wearable device, a smart screen, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc.; it can also be a vehicle-mounted device with a display screen such as an in-vehicle computer, an in-vehicle computer, etc.; it can also be some Internet of Things devices with a display screen such as smart watches and smart bracelets. The embodiments of the present application do not impose any restrictions on the product form of the electronic device.

[0056] Next, the hardware structure and software architecture of the electronic device provided by the embodiments of the present application will be introduced.

[0057] Figure 1The figure shows a schematic diagram of the hardware structure of the electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, antennas 1 and 2, a mobile communication module 150, a wireless communication module 160, a display screen 194, and a sensor module 180, etc. The sensor module 180 may include a pressure sensor 180A, a touch sensor 180K, etc.

[0058] It can be understood that the structure schematically shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0059] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0060] Among them, the controller may be the nerve center and command center of the electronic device 100. The controller may generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.

[0061] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, and / or a universal serial bus (USB) interface, etc.

[0062] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device 100.

[0063] It can be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only illustrative and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0064] The USB interface 130 is an interface that complies with the USB standard specification. Specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used for data transmission between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. This interface can also be used to connect other electronic devices, such as AR devices, etc.

[0065] The electronic device 100 implements the display function through the GPU, the display screen 194, and the application processor, etc. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.

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

[0067] The pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 can also calculate the position of the touch according to the detection signal of the pressure sensor 180A.

[0068] The touch sensor 180K, also known as the "touch panel". The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also known as the "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In some other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, at a different position from the display screen 194.

[0069] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to achieve the data storage function. For example, files such as music and videos are saved in the external memory card.

[0070] The internal memory 121 can be used to store computer-executable program code, and the executable program code includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.). The data storage area can store data created during the use of the electronic device 100 (such as audio data, phone book, etc.). In addition, the internal memory 121 can include high-speed random access memory and can also include non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0071] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with other devices through wireless communication technologies and networks.

[0072] For example, the electronic device 100 can obtain media materials through the antenna 1 and the mobile communication module 150, or through the antenna 2 and the wireless communication module 160.

[0073] Next, the software architecture of the electronic device 100 will be introduced. The software architecture of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In the embodiments of the present invention, the Android TM system is taken as an example to exemplarily illustrate the software structure of the electronic device 100.

[0074] Figure 2 is a schematic diagram of the software structure of the electronic device 100 in the embodiments of the present application. The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android TM system is divided into four layers, from top to bottom are the application layer, the application framework layer, the Android runtime TM runtime, and the system library, and the kernel layer.

[0075] The application layer can include a series of application packages.

[0076] As Figure 2 shown, the application packages can include applications such as a camera, a gallery, a calendar, a call, a map, a navigation, a WLAN, a Bluetooth, music, a video, a short message, etc.

[0077] Among them, the gallery is used to provide functions such as viewing photos, videos, and generating media resources based on media materials.

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

[0079] Such as 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, etc.

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

[0081] The content provider is used to store and obtain data, and make this data accessible to applications. The data may include videos, images, audio, dialed and answered calls, browsing history and bookmarks, phone books, etc.

[0082] The view system includes visible controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.

[0083] The phone manager is used to provide the communication function of the electronic device 100. For example, the management of call status (including connection, disconnection, etc.).

[0084] The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, etc.

[0085] The notification manager enables applications to display notification information in the status bar, can be used to convey notification-type messages, can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify the completion of a download, message reminder, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as the notification of a background-running application, and can also be a notification that appears on the screen in the form of a dialogue window. For example, prompt text information in the status bar, emit a prompt sound, the electronic device vibrates, the indicator light flashes, etc.

[0086] Android TM Runtime includes core libraries and virtual machines. Android TM runtime is responsible for the scheduling and management of the Android system.

[0087] The core library consists of two parts: one part is the functional functions that the Java language needs to call, and the other part is the core library of Android.

[0088] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to manage the object life cycle, stack management, thread management, security and exception management, and garbage collection and other functions.

[0089] The system library can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing library (e.g., OpenGL ES), 2D (two-dimensional) graphics engine (e.g., SGL), etc.

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

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

[0092] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc.

[0093] The 2D graphics engine is the drawing engine for 2D drawing.

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

[0095] Next, taking the electronic device as a mobile phone, and the mobile phone has the above Figure 1 shown hardware structure and Figure 2 shown software architecture as an example, the method for recommending media resources provided by the embodiments of the present application will be introduced.

[0096] Exemplarily, referring to Figure 3 , the method for recommending media resources provided by the embodiments of the present application may include steps S300 - S303.

[0097] S300. The mobile phone obtains media materials and obtains the tags of the media materials.

[0098] Among them, the media materials may include photos or videos.

[0099] As a possible implementation, the mobile phone can take photos or videos, and after taking the photos or videos, obtain tags for the media materials.

[0100] As another possible implementation, the mobile phone can also capture screenshots to save photos or record the screen to save videos to obtain media materials.

[0101] As yet another possible implementation, the mobile phone can obtain media materials of other electronic devices through the user account logged in on the mobile phone, and obtain tags for the media materials.

[0102] In some embodiments, the mobile phone can perform an aesthetic score on the media materials, and the mobile phone obtains media materials with a relatively high aesthetic score when obtaining the media materials.

[0103] In some embodiments, the mobile phone can also perform a quality score on the media materials, and the mobile phone obtains media materials with a relatively high quality score when obtaining the media materials.

[0104] In some embodiments, the mobile phone can perform object detection on the media materials to obtain the content objects included in the media materials. Next, the mobile phone can obtain tags for the media materials based on the content objects obtained from the object detection. Among them, the object detection can include face detection or multi-subject detection, etc.

[0105] The tags of the media materials can include person attribute tags, and / or content type tags. The person attribute tags are used to characterize the detailed information of the people included in the media materials, such as the social relationship between the people included in the media materials and the mobile phone user, the name, gender, age, etc. of the people included in the media materials.

[0106] Among them, the social relationship can include: child relationship, parent relationship, grandparent relationship, best friend relationship, sister relationship, brother relationship, etc. That is to say, the person attribute tags can be used to characterize that the people included in the media materials are: any one of the children of the mobile phone user, the spouse of the mobile phone user, the parents of the mobile phone user, the lover of the mobile phone user, the colleague of the mobile phone user, the best friend of the mobile phone user, the sister of the mobile phone user, the brother of the mobile phone user, the grandparents of the mobile phone user, or the mobile phone user himself / herself. And, in some embodiments, the above tags can also include pet tags, such as pet cat tags, pet dog tags, or pet bird tags, etc.

[0107] The content type tags are used to characterize the types of the content other than people included in the media materials, such as, scenery, cake, food, flower, building, dinner, vehicle, sport, mountain, document, group photo, etc. It can be understood that the mobile phone user can be understood as the user who most frequently uses the mobile phone, or the user of the user account logged in on the mobile phone.

[0108] For example, seeFigure 4 , the mobile phone can perform face detection on photo 400 to obtain the face 401 included in the photo. For another example, the mobile phone can perform multi-subject detection on photo 410 to obtain the birthday cake 412 and the face 411 included in the photo. Next, based on the social relationship between the face 401 input by the user and the user of the mobile phone, such as mother and son, the mobile phone obtains the person attribute label of photo 400, such as mother. Also, the mobile phone can obtain the content type label of photo 410 as birthday based on the birthday cake 412, and the mobile phone can obtain the person attribute label of photo 410 as younger brother based on the social relationship between the face 411 input by the user and the user of the mobile phone, such as brothers. That is to say, the labels of photo 410 include birthday and younger brother.

[0109] It should be noted that in some embodiments, the mobile phone can also analyze the user account logged in to the mobile phone to obtain the social relationship between the person included in the photo and the user of the mobile phone, and obtain the label of the photo. It should be understood that the user account logged in to the mobile phone is usually the user account of the mobile phone user. In some other embodiments, the mobile phone can also obtain the social relationship between the person included in the photo and the user of the mobile phone through the schedule record of the mobile phone user on the mobile phone, and obtain the label of the photo. In some other embodiments, the mobile phone can also analyze the social network of the mobile phone user through a knowledge graph to obtain the social relationship of the mobile phone user. Next, the mobile phone matches the above social relationship with the recognition result of face recognition of the media material to obtain the person attribute label of the media material.

[0110] It should be understood that in actual use, there can be more other ways to obtain the person attribute label of the media material, and there can also be more other ways to obtain the content type label of the media material; specifically, it can be designed according to actual usage requirements, and the embodiments of the present application do not limit this.

[0111] S301. The mobile phone obtains a recommendation trigger condition.

[0112] It can be understood that the recommendation trigger condition can include that the current time of the mobile phone is the target time, or it can also include that the current location of the mobile phone corresponds to the target location, or it can also include that the destination of the mobile phone user's itinerary corresponds to the target location.

[0113] Among them, the above-mentioned current location of the mobile phone corresponding to the target location can be understood as the current location being near the target location. For example, the current location of the mobile phone is within 1 kilometer, 1.5 kilometers, 3 kilometers, etc. around the target location. The above-mentioned destination of the itinerary corresponding to the target location can be understood as the destination of the itinerary being at the target location. For example, the destination of the itinerary is within 1 kilometer, 1.5 kilometers, 3 kilometers, etc. around the target location.

[0114] Among them, the recommended trigger condition can be obtained by the mobile phone based on the shooting information of the above media materials and the tags of the media materials; or, it can also be input by the user; or, it can also be obtained by the mobile phone through the knowledge graph to analyze the social network of the mobile phone user. Or, it can also be obtained by the mobile phone through the recognition of the end-side large model.

[0115] As a possible implementation manner, after the mobile phone obtains the above Figure 4 and the content type tag of the photo 410 in it is birthday and the person attribute tag is younger brother, the mobile phone obtains the target time according to the shooting time included in the shooting information of the above photo 410. For example, if the shooting time of the photo 410 is April 8, 2021, then the mobile phone obtains that April 7 is the target time. That is to say, the mobile phone can obtain the recommended trigger condition with the target time of April 7, and the corresponding person attribute tag of this recommended trigger condition is younger brother, and the content type tag is birthday.

[0116] In another possible implementation manner, the mobile phone can also receive the input of the mobile phone user. For example, if the user of the mobile phone inputs his / her birthday as January 1, then the mobile phone obtains the recommended trigger condition with the target time of January 1, and the corresponding person attribute tag of this recommended trigger condition is the mobile phone user, and the content type tag is birthday.

[0117] It should be noted that when the mobile phone generates the target time according to the shooting time of the media material, the mobile phone can generate different target times according to whether the person attribute tag of the media material is the mobile phone user. For example, if the mobile phone obtains that a certain person's birthday is on day BB of month AA, if this person is the user of the mobile phone, the target time can be day BB of month AA, if this person is not the mobile phone user, the target time can be earlier than day BB of month AA, for example, day BB - 1 of month AA. That is to say, subsequently, the mobile phone will recommend media resources including the mobile phone user on the birthday of the mobile phone user, and the mobile phone will recommend media resources including other objects before the birthdays of other objects. Among them, other objects can be understood as objects other than the user.

[0118] It should be understood that for media resources including mobile phone users and media resources including other objects, the uses of these two types of media resources by mobile phone users will be different, and then the purposes of the mobile phone to recommend these two types of media resources are also different. For media resources including other objects, mobile phone users may send them as gifts to other objects. For example, for media resources including a mother, mobile phone users will send this media resource as a gift to their mother; for media resources including mobile phone users, mobile phone users will watch them by themselves as memories of the past. Thus, in this implementation, by recommending the media resource at different times according to the content included in the media resource, such as whether the media resource includes the mobile phone user, and recommending the media resource at different times, the relevance between the recommended media resource and the user can be enhanced in the time dimension, improving the user experience.

[0119] It should be understood that at some preset target times, the mobile phone can also recommend the media resource at different times according to the content included in the media resource. For example, if the mobile phone user is a mother, the mobile phone can recommend media resources including the mobile phone user on the day of Mother's Day, and the mobile phone will recommend media resources including the mother of the mobile phone user one day before Mother's Day. Another example, if the mobile phone user is a father, the mobile phone can recommend media resources including the father of the mobile phone user one day before Father's Day, and the mobile phone will recommend media resources including the mobile phone user on the day of Father's Day. In some possible implementation manners, the mobile phone can also obtain the birthday of the mother of the mobile phone user as March 2 through knowledge graph analysis of the social network of the mobile phone user, then the mobile phone obtains that March 1 is the target time. That is to say, the mobile phone can obtain the recommendation trigger condition with the target time of March 1, and the trigger condition corresponds to the person attribute label of mother and the content type label of birthday.

[0120] In some embodiments, the mobile phone can obtain the target location according to the shooting information of the media material. For example, if the shooting location included in the shooting information of the media material is location BB, and location BB is not the usual residence of the mobile phone user, then the mobile phone obtains the recommendation trigger condition with the target location of location BB, and the shooting information corresponding to the trigger condition is location BB. It should be understood that the mobile phone can identify the location information on the mobile phone to obtain the usual residence. For example, the mobile phone can count the GPS data, and the mobile phone takes the location corresponding to the GPS data with the highest frequency as the usual residence; another example, the mobile phone can also count the frequency of the shooting locations of the media materials on the mobile phone and take the shooting location with the highest frequency as the usual residence. It should be understood that the mobile phone can also obtain the usual residence through more other ways, and specifically can be designed according to actual usage requirements.

[0121] In some embodiments, when the mobile phone obtains the target location based on the shooting information of the media material, the mobile phone can also obtain the target location based on the distance between the shooting location of the media material and the user's usual residence. For example, if the distance between the shooting location of the media material and the user's usual residence is greater than or equal to a preset distance A, such as 100 kilometers or 200 kilometers, the mobile phone obtains the target location based on the above shooting location; if the distance between the shooting location of the media material and the user's usual residence is less than the preset distance A, the mobile phone does not obtain the target location based on the above shooting location.

[0122] It can be understood that the mobile phone obtains the target location based on the distance between the shooting location of the media material and the user's usual residence, and then recommends media resources based on this target location in the subsequent process. And the media materials included in the media resources are located far from the user's usual residence. In this way, the user can see the places that he has been to and are relatively far from his current usual residence on the mobile phone, which can enhance the relevance between the recommended media resources on the mobile phone and the user from the spatial dimension and improve the user experience.

[0123] In some embodiments, when the mobile phone obtains the target location based on the distance between the shooting location of the media material and the user's usual residence, the mobile phone can also determine whether to obtain the target location based on the shooting time of the media material.

[0124] For example, when the distance between the shooting location and the usual residence is relatively far, if the shooting time of the media material at this shooting location is very far from the current time, the mobile phone obtains the target location based on this shooting location. It should be understood that when there are multiple media materials at this shooting location, the shooting time of the media material at the above shooting location can be understood as the shooting time of the media material that is the most recent in time among the multiple media materials at this shooting location.

[0125] Exemplarily, when the distance between the shooting location and the usual residence is greater than or equal to the preset distance A, if the difference between the shooting time of the media material and the current time of the mobile phone is greater than or equal to the duration A, the mobile phone obtains the target location based on the shooting location of the media material. Wherein, the duration A can be 1 year, 2 years, etc.

[0126] Also for example, when the distance between the shooting location and the usual residence is relatively far, if the shooting time of the media material at this shooting location is relatively far from the current time and there are relatively many media materials at this shooting location, that is, the user has been to this shooting location multiple times, the mobile phone obtains the target location based on this shooting location. It should be understood that when there are multiple media materials at this shooting location, the shooting time of the media material at the above shooting location can be understood as the shooting time of the media material that is the most recent in time among the multiple media materials at this shooting location.

[0127] Exemplarily, when the distance between the shooting location and the permanent residence is greater than or equal to a preset distance A, if the difference between the shooting time of the media material and the current time of the mobile phone is less than duration A and greater than or equal to duration B, and the number of media materials at the shooting location is greater than quantity A, then the mobile phone obtains a target location based on the shooting location of the media material. Here, duration B is shorter than duration A. Duration B can be 3 months, 5 months, 6 months, etc. Quantity A can be 20, 30, 35, etc. Moreover, the above "the number of media materials at the shooting location is greater than quantity A" can be understood as the number of media materials at the shooting location in the album of the mobile phone being greater than quantity A, or it can be understood as the number of media materials at the shooting location that the mobile phone can obtain being greater than quantity A.

[0128] For another example, when the distance between the shooting location and the permanent residence is relatively far, if the shooting time of the media material at the shooting location is not too long ago from the current time, and the user has visited the shooting location relatively frequently in the past period of time, then the mobile phone obtains a target location based on the shooting location. It should be understood that when there are multiple media materials at the shooting location, the shooting time of the media material at the shooting location can be understood as the shooting time of the media material that is the most recent in time among the multiple media materials at the shooting location.

[0129] Exemplarily, when the distance between the shooting location and the permanent residence is greater than or equal to a preset distance A, if the difference between the shooting time of the media material and the current time is less than duration B and greater than or equal to duration C, and within the time period from duration B before the current time to duration C before the current time, the number of media materials at the shooting location is greater than quantity B, then the mobile phone obtains a target location based on the shooting location of the media material. Here, duration C is shorter than duration B. Duration C can be two weeks, one month, two months, etc.; quantity B is greater than quantity A. Quantity B can be 40, 45, 60, etc.

[0130] It can be understood that the triggering opportunity of the above step S301 can be that the mobile phone executes after obtaining the media material, that is, it executes after step S300; or it can be that the mobile phone executes periodically. For example, step S301 is executed once a week. Moreover, there can be more triggering opportunities for the above step S301, and the embodiments of the present application do not limit this.

[0131] In some embodiments, the above recommended triggering condition can also be preset. For example, the mobile phone can preset the recommended triggering condition that the target time is Mother's Day, and the corresponding person attribute label for this recommended triggering condition is mother.

[0132] In some embodiments, the above-mentioned recommendation trigger condition may further include: the distance between the current location of the mobile phone and a specified location is greater than or equal to a preset distance. The media material corresponding to this recommendation trigger condition is the media material whose shooting location is the specified location. In this way, the mobile phone can subsequently recommend media resources including media materials whose shooting location is the specified location. Then, after leaving the specified location, the user can receive the media resources recommended by the mobile phone and including the media materials of the specified location.

[0133] As a possible implementation manner, the above-mentioned specified location can be actively set by the user. Or, the above-mentioned specified location can also be the usual residence, or the long-term residence, or specified by the user. The mobile phone can obtain the long-term residence and the usual residence through location information. For example, the mobile phone can periodically or real-time record the location information of the mobile phone, and count the frequency of the location information on the mobile phone, and take the location corresponding to the location information with the highest frequency as the usual residence; among the top 30% of the frequencies, the locations corresponding to the location information other than the usual residence are taken as the long-term residence. Another example is that within the time period Z, if the quantity of a certain location information is greater than the quantity threshold Z, and the shooting location is not the usual residence, the mobile phone takes the shooting location as the long-term residence. The above time Z can be 2 years, 3 years, 5 years, etc., and the quantity threshold can be 100, 200, 500, etc.

[0134] It should be noted that the above-mentioned long-term residence can be understood as a location with a relatively high degree of relevance to the mobile phone user. For example, the above-mentioned long-term residence can be the hometown, the place of study, the place of long-term work, the place of long-term business trips, the tourist destination, etc. After the mobile phone obtains these locations with a relatively high degree of relevance to the mobile phone user, the mobile phone can obtain the recommendation trigger condition based on these long-term residences. In this way, when the mobile phone subsequently meets the recommendation trigger condition obtained based on the long-term residence, the mobile phone recommends media resources including media materials whose shooting location is in the long-term residence. The mobile phone can display media materials with a relatively high degree of relevance to the mobile phone user, which can improve the user experience. In some embodiments, the above-mentioned usual residence can be referred to as the first associated location, and the above-mentioned long-term residence can be referred to as the second associated location. The degree of association between the first associated location and the mobile phone user is different from the degree of association between the second associated location and the mobile phone user.

[0135] Exemplarily, the mobile phone can analyze the shooting materials on the mobile phone to obtain the hometown. For example, the mobile phone can identify the photo and obtain that the person objects included in the photo are the mobile phone user and the mother of the mobile phone user, and the frequency of the location information corresponding to the shooting location of the photo is relatively high. Thus, the mobile phone can obtain that the shooting location of the photo is the hometown of the mobile phone user. Similarly, the mobile phone can also determine the above-mentioned hometown, the place of study, the place of long-term work, the place of long-term business trips, the tourist destination, etc. in a similar way.

[0136] It is understandable that there are more ways for a mobile phone to obtain the above-mentioned hometown, place of study, place of long-term work, place of long-term business trip, tourist destination, etc. The embodiments of the present application do not limit this.

[0137] As a possible implementation manner, within a preset time period, the mobile phone can obtain different recommendation trigger conditions according to the current location. Among them, the above-mentioned preset time period can be during the Spring Festival, Christmas, Mid-Autumn Festival, Halloween, Thanksgiving, etc.

[0138] Exemplarily, when the time of the mobile phone is within the preset time period (for example, during the Spring Festival), after the mobile phone takes media materials at the first target location (for example, the hometown), the mobile phone generates a recommendation trigger condition that the distance between the current location of the mobile phone and the first target location is greater than or equal to a preset distance. The shooting location of the media materials corresponding to this trigger condition is the above-mentioned first target location.

[0139] Another exemplarily, when the time of the mobile phone is within the preset time period and the current location of the mobile phone is not at the first target location, the mobile phone generates a recommendation trigger condition that the distance between the current location of the mobile phone and the first target location is greater than or equal to a preset distance. The shooting location of the media materials corresponding to this trigger condition is the above-mentioned first target location.

[0140] In some embodiments, the mobile phone can also generate recommendation trigger conditions according to important relationship objects including the mobile phone user. Among them, the important relationship objects of the mobile phone user can include: the parents of the mobile phone user, the children of the mobile phone user, the partner of the mobile phone user, the pet of the mobile phone user, etc. For example, the mobile phone can generate a recommendation trigger condition according to the birthday of the child of the mobile phone user.

[0141] S302. In response to the mobile phone meeting the recommendation trigger condition, the mobile phone generates media resources.

[0142] Among them, media resources can also be referred to as: "moment", "wonderful moment", "gallery moment", "collection", "memory", "wonderful memory", etc. Media resources can be understood as a collection of videos or photos.

[0143] As a possible implementation manner, the mobile phone can generate media resources according to the tags corresponding to the recommendation trigger conditions. For example, in response to the mobile phone meeting the recommendation trigger condition that the target time is January 1st, the mobile phone searches for the media materials corresponding to this trigger condition according to the person attribute tags or content type tags corresponding to this trigger condition, and generates media resources according to this media material.

[0144] Exemplarily, see Figure 5, in response to the current date of the mobile phone being January 1st, that is, the mobile phone meets the recommended trigger condition, the mobile phone can search for media materials whose person attribute tag is the user of the mobile phone and whose content type tag is birthday. For example, the mobile phone searches and obtains Photo A, Photo B, and Video A. Next, the mobile phone can clip Photo A, Photo B, and Video A through a preset clip template to obtain a media resource. For example, in the clipped media resource, Photo A is shown for 10 seconds, and Photo B is shown for 5 seconds; and there is background music during the display of Photo A and Photo B; then, after a transition effect, Video A is shown; among them, Photo B has a filter.

[0145] As another possible implementation, the mobile phone can generate a media resource according to the shooting information corresponding to the recommended trigger condition. For example, in response to the mobile phone meeting the recommended trigger condition where the target location is Location BB, the mobile phone obtains the media materials corresponding to the recommended trigger condition according to the shooting information corresponding to the recommended trigger condition, and generates a media resource based on the media materials.

[0146] Exemplarily, in response to the current location of the mobile phone being Location BB, that is, the mobile phone meets the recommended trigger condition, the mobile phone can search for media materials whose shooting location is Location BB. For example, the mobile phone searches and obtains Photo C and Photo D. Next, the mobile phone combines Photo C and Photo D to obtain a media resource.

[0147] In some embodiments, during the process of the mobile phone generating a media resource according to the tags corresponding to the recommended trigger condition, the mobile phone can also deduplicate the searched media materials from the time dimension or the space dimension. For example, the mobile phone searches and obtains multiple media materials, and the shooting times of these media materials are within a duration Z. The mobile phone retains the media material with the highest aesthetic score among these media materials, and subsequently the mobile phone generates a media resource based on the media material with the highest aesthetic score. Among them, the duration Z can be 12 seconds, 13 seconds, 15 seconds, and so on. Another example is that the mobile phone searches and obtains multiple media materials, and the shooting locations of these media materials are within a distance Z. The mobile phone retains the media material with the highest aesthetic score among these media materials, and subsequently the mobile phone generates a media resource based on the media material with the highest aesthetic score. Another example is that the mobile phone searches and obtains multiple media materials, and the shooting locations of these media materials are within a distance Z. The mobile phone uses the Hamming similarity algorithm to deduplicate these media materials, removes the media materials with similar content among these media materials, and subsequently the mobile phone generates a media resource based on the media materials after removing the media materials with similar content.

[0148] S303. The mobile phone recommends the media resource.

[0149] The mobile phone can recommend the media resource in various forms. For example, the mobile phone can recommend the media resource in the form of a notification message, or the mobile phone can also recommend the media resource in the form of a desktop card, or the mobile phone can also recommend the media resource in the gallery application. In some embodiments, the mobile phone can recommend the media resource immediately after generating the media resource; in other embodiments, the mobile phone can also recommend the media resource during idle time, where idle time can be understood as a time period when the usage frequency of the mobile phone is relatively low, and the mobile phone can obtain the idle time by counting the usage frequency of the mobile phone; in other embodiments, after generating the media resource, the mobile phone can also recommend the media resource in the form of a notification message in response to the user's first operation of picking up the mobile phone or in response to the mobile phone's first screen-on.

[0150] In some solutions, the above desktop card may include a text description, and the theme of the text description may correspond to the shooting time or shooting location of the media material included in the media resource. For example, if the media resource recommended by the mobile phone in step S303 above includes media material with a shooting time of DD time, the theme of the text description included in the desktop card may correspond to the above DD time. For example, the text description may be "Take a look at the photos taken at DD time before". Another example, if the media resource recommended by the mobile phone in step S303 above includes media material with a shooting location of CC location, the theme of the text description included in the desktop card may correspond to the above CC location. For example, the text description may be "Let's take a look at the moments at CC location together".

[0151] In other solutions, the above desktop card may include a text description, and the theme of the text description may correspond to the label of the media material included in the media resource. For example, if the media resource recommended by the mobile phone in step S303 above includes media material with a person attribute label of mother, the theme of the text description included in the desktop card may correspond to the above person attribute label of mother. For example, the text description may be "Take a look at the happy time spent with mother before". Another example, if the media resource recommended by the mobile phone in step S303 above includes media material with a content type label of landscape, the theme of the text description included in the desktop card may correspond to the above content type label of landscape. For example, the text description may be "Let's recall the beautiful landscapes we've seen together". It can be seen that in this method, the text description displayed on the mobile phone card corresponds to the content of the media material included in the media resource, such as corresponding to the person object included in the media material. Thus, the relevance between the text description displayed on the desktop card and the media material can be improved. Further, the relevance between the media resource recommended by the mobile phone and the user can be improved, and the user experience can be enhanced.

[0152] In some other solutions, the theme of the text description included in the desktop card may correspond to the shooting information of the media material included in the media resource. For example, the media resource recommended by the mobile phone in step S303 above includes media materials at the second associated location, and the second associated location is the hometown. Then, the text description on the mobile phone can be "Take a look at the wonderful moments in your hometown".

[0153] In some other solutions, the text description included in the desktop card can also be related to the above-mentioned recommendation trigger condition. For example, a certain recommendation trigger condition is that the destination of the mobile phone is the second associated location (such as a tourist destination), and the destination of the mobile phone is obtained by the mobile phone identifying the user's airplane ticket; after the mobile phone meets this recommendation trigger condition, the mobile phone displays a desktop card on the desktop, and the desktop card includes "The plane is on the way. Take a look at the scenery of the past and you that year".

[0154] It should be understood that when the mobile phone recommends media resources in the form of a notification message or other recommendation forms, the notification message or other recommendation forms can include the above-mentioned text description.

[0155] It can be understood that in practical applications, there can also be more ways to recommend media resources, and specifically, it can be set according to actual usage requirements. The embodiments of the present application do not limit this here.

[0156] Exemplarily, in response to the mobile phone meeting the recommendation trigger condition that the target time is January 1st, the mobile phone searches for the media materials corresponding to this recommendation trigger condition according to the person attribute tag and content type tag corresponding to this trigger condition, and generates a media resource based on this media material. Next, refer to Figure 6 , the mobile phone displays desktop 600, and desktop 600 includes a first card 601, and the first card 601 is used to display the above-mentioned media resource. For example, the first card 601 can display the media resource through the cover of the media resource. It can be understood that the cover of the media resource can be any one of the media materials included in the media resource.

[0157] After that, the user can trigger the editing operation of the media resource or the viewing operation of the media resource through the above-mentioned first card. For example, in response to the trigger operation on the first card, the mobile phone displays an editing interface for the media resource, and the editing interface includes editing options for the media resource displayed on the first card. For another example, in response to the trigger operation on the first card, the mobile phone displays an interface for viewing the media resource, and the interface includes the media resource displayed on the first card in a pending playback state.

[0158] Next, some recommendation trigger conditions related to time provided by the embodiments of the present application, and the media resources recommended by the mobile phone when meeting the recommendation trigger conditions will be introduced with reference to Table 1.

[0159] Table 1

[0160]

[0161] It should be understood that the mobile phone can obtain the identity of the mobile phone user in various ways. For example, the mobile phone user is a mother, or the mobile phone user is a father. Exemplarily, the mobile phone can receive the identity input by the mobile phone user. Additionally, the mobile phone can also obtain the identity of the mobile phone user through a knowledge graph.

[0162] Next, some recommendation trigger conditions related to location and time provided in the embodiments of the present application will be introduced with reference to Table 2.

[0163] Table 2

[0164]

[0165] In some other embodiments, the mobile phone can also cluster media materials, and then generate a media resource according to the clustering result and recommend the media resource. For example, the mobile phone can cluster the content included in the media materials through a clustering algorithm to obtain a clustering label, where the clustering label can include any one of a pet label, a food label, a sports label, a flower label, a scenery label, a weather label, etc. Then, if the number of media materials with a certain clustering label exceeds a preset number, such as the number of media materials with a food label exceeds 16, a media resource is generated according to the media materials under the food label and the media resource is recommended.

[0166] Next, with reference to the user's usage process of the mobile phone, the method for recommending media resources provided in the embodiments of the present application will be introduced.

[0167] In some embodiments, the user can turn on or off the function of the mobile phone to recommend media resources through some options, or adjust the frequency of the mobile phone to recommend media resources.

[0168] Exemplarily, refer to Figure 7, the mobile phone displays the desktop 700, and the desktop 700 includes a gallery application icon 701. Next, in response to a click operation on the gallery application icon 701, the mobile phone displays the main interface 710 of the gallery application, and the main interface 710 of the gallery application includes a time menu option 711. After that, in response to a trigger operation on the time menu option 711, the mobile phone displays a time interface 720, and the time interface 720 includes a time setting option 721. Next, in response to a trigger operation on the time setting option 721, the mobile phone displays a time setting interface 730, and the time setting interface 730 includes a first setting option 731, and the first setting option 731 is used to turn on or off the time recommendation function of the mobile phone. That is to say, the first setting option 731 is used to turn on or off the function of recommending media resources on the mobile phone. Optionally, the time setting interface 730 may further include a second setting option 732, and the second setting option 732 is used to adjust the frequency of the mobile phone's recommended time. That is to say, the second setting option 732 is used to adjust the frequency of the mobile phone's recommended media resources.

[0169] After the user turns on the function of the mobile phone to recommend media resources, the mobile phone can execute the above steps S300 - S303 to recommend media resources to the user.

[0170] Exemplarily, refer to Figure 8 , the mobile phone takes a Z photo 800 at the ZZ location, and the mobile phone takes a Y photo 810 at the ZZ location. Since both the Z photo 800 and the Y photo 810 are taken at the ZZ location, the shooting locations of the Z photo 800 and the Y photo 810 are both the ZZ location. After that, the mobile phone executes step S300 to obtain the label of the Z photo 800 and the label of the Y photo 810. For example, when the mobile phone executes the above step S300 on the Z photo 800, the label obtained for the Z photo 800 includes a person attribute label of being a wife and a content type label of being a landscape. Another example is that when the mobile phone executes the above step S300 on the Y photo 810, the label obtained for the Y photo 810 includes a content type label of being a landscape.

[0171] Next, the mobile phone executes step S301 on the Z photo and the Y photo. Since the shooting locations of the Z photo and the Y photo are both the ZZ location, and the ZZ location is not the usual residence of the mobile phone user but the tourist destination of the mobile phone user, then the mobile phone generates a recommendation trigger condition with the target location being the ZZ location based on the shooting locations of the Z photo and the Y photo being the ZZ location. Among them, the mobile phone can obtain the usual residence of the mobile phone user through the end - side large model deployed on the mobile phone side. The above ZZ location being the tourist destination of the mobile phone user can be obtained based on the shooting time of the above Z photo and Y photo being relatively far from the current time, and the above ZZ location being more than a preset distance, such as 1000 kilometers, away from the usual residence.

[0172] Exemplarily, refer to Figure 9, after the mobile phone generates a recommendation trigger condition where the target location is location ZZ, the mobile phone executes the above steps S302 - S303. That is to say, in response to the destination of the mobile phone being a tourist destination, the mobile phone displays a recommendation card 901 on the desktop 900, and the recommendation card 901 is used to display the first media resource. After that, in response to a trigger operation on the recommendation card 901, the mobile phone displays a media resource playback interface 910, and the media resource playback interface 910 includes the first media resource 911 in a to-be-played state and a sharing button 912 for the first media resource. The first media resource 911 includes: Z photo and Y photo, and the shooting locations of the Z photo and the Y photo are the above-mentioned location ZZ. Among them, the above-mentioned sharing button 912 for the first media resource is used to trigger a sharing operation on the first media resource. It should be understood that since the shooting times of the Z photo and the Y photo are relatively far from the current time, then in some embodiments, the above "in response to the destination of the mobile phone being a tourist destination" can also be expressed as "in response to the destination of the mobile phone being a former tourist destination"

[0173] It should be noted that in Figure 9 the corresponding scenario, the mobile phone can, based on the recommendation trigger condition that the destination of the mobile phone is a tourist destination and this destination is obtained from the user's airplane ticket of the mobile phone user, obtain a text description title such as "The plane is on the way, take a look at the scenery of the past and you that year". That is to say, this text description title corresponds to the recommendation trigger condition. And, in Figure 9 the corresponding scenario, the mobile phone can also, based on the content of the above first media resource, such as the above first media resource including the above Z photo and Y photo, obtain a text description content such as "Let's recall the wonderful time on the sea together". Among them, the mobile phone performs content recognition on the Z photo and obtains that the content included in the Z photo is the ocean, and then the mobile phone obtains that the theme of the text description content corresponds to the ocean.

[0174] Exemplarily, during the process of the mobile phone executing the above steps S302 - S303, in response to the current location of the mobile phone corresponding to location ZZ, the mobile phone clips the above Z photo and Y photo through a preset clip template to generate the first media resource, that is to say the first media resource includes the Z photo and the Y photo. After that, the mobile phone displays the first media resource on the recommendation card on the desktop.

[0175] In some other examples, in response to the current location of the mobile phone being a former tourist destination, the mobile phone can also recommend the above first media resource. Among them, the above destination of the mobile phone can be understood as the destination of the user's itinerary, and the mobile phone can obtain the destination of the user's itinerary by obtaining the user's itinerary order; for example, the mobile phone can obtain the destination of the user's itinerary by obtaining the user's airplane ticket order, hotel order, etc. Or, the mobile phone can also obtain the destination of the user's itinerary by obtaining the destination of the itinerary actively input by the user.

[0176] Exemplarily, referring again to Figure 9 , after the mobile phone generates a recommendation trigger condition where the target location is location ZZ, in response to the destination of the user's itinerary being location ZZ, the mobile phone displays a first notification 921 on the desktop 920. Subsequently, in response to a trigger operation on the first notification 921, the mobile phone displays a media resource editing interface 930, and the media resource editing interface 930 includes a first media resource 931 and editing options 932 for the first media resource. The first media resource 931 includes: photo Z and photo Y, and the shooting locations of photo Z and photo Y are the above-mentioned location ZZ.

[0177] Among them, the first notification 921 may include a text description corresponding to the first media resource, such as, "The scenery in memory", "Let's recall the once scenery together".

[0178] It should be understood that in some other examples, in response to a trigger operation on a recommendation card of a media resource displayed on the desktop, the mobile phone can also display an editing interface for the media resource. In this way, it is convenient for the user to edit the media resource. In other examples, in response to a trigger operation on the media resource, the mobile phone can also display a playback interface for the media resource.

[0179] In some embodiments, the mobile phone can execute the above steps S300 - S303, and recommend media resources at different recommendation times according to the number of media materials with the shooting location being location ZZ on the mobile phone and the shooting time of the media materials with the shooting location being location ZZ. Among them, the number of media materials with the shooting location being location ZZ on the above mobile phone can be understood as the number of media materials with the shooting location being location ZZ obtained by the mobile phone, such as, the number of media materials with the shooting location being location ZZ stored in the photo gallery, or the number of media materials with the shooting location being location ZZ stored under the user account.

[0180] Exemplarily, in response to the current location of the mobile phone being location ZZ and the difference between the shooting time of the media material with the shooting location being location ZZ and the current time of the mobile phone being greater than or equal to the above duration A, the mobile phone recommends a second media resource, and the second media resource includes media materials with the shooting location being location ZZ. Among them, the shooting time corresponding to the media material with the shooting location being location ZZ can be understood as the media material with the most recent shooting time among the media materials of location ZZ obtained by the mobile phone.

[0181] Exemplarily, in response to the current location of the mobile phone being location ZZ, and the difference between the shooting time corresponding to the media material whose shooting location is location ZZ and the current time of the mobile phone being less than the above-mentioned duration A and greater than or equal to the above-mentioned duration B, and the number of media materials of location ZZ obtained by the mobile phone being greater than 30, the mobile phone recommends a third media resource, and the third media resource includes the media material whose shooting location is location ZZ. Among them, the shooting time corresponding to the media material whose shooting location is location ZZ can be understood as the media material with the most recent shooting time among the media materials of location ZZ obtained by the mobile phone.

[0182] Exemplarily, in response to the current location of the mobile phone being location ZZ, and the difference between the shooting time corresponding to the media material whose shooting location is location ZZ and the current time of the mobile phone being less than the above-mentioned duration B and greater than or equal to the above-mentioned duration C, and the number of media materials obtained by the mobile phone within the specified time period being greater than 40, the mobile phone recommends a fourth media resource, and the fourth media resource includes the media material whose shooting location is location ZZ. Among them, the specified time period is the time period from the duration B before the current time to the duration C before the current time, and the shooting time corresponding to the media material whose shooting location is location ZZ can be understood as the media material with the most recent shooting time among the media materials of location ZZ obtained by the mobile phone.

[0183] In some other examples, see Figure 10, the mobile phone captures media material 1000 and media material 1010 at XX time. The capture times of media material 1000 and media material 1010 are both the above-mentioned XX time. After that, the mobile phone executes the above-mentioned step S300 to obtain the tags of media material 1000 and the tags of media material 1010. Among them, the person attribute tag of media material 1000 is the mobile phone user, and the content type tag of media material 1000 is sports; the person attribute tag of media material 1010 is mother, and the content type tag of media material 1010 is birthday. Next, the mobile phone executes step S301. Since the person attribute tag of media material 1010 is mother and the content type tag is birthday, the mobile phone obtains the first target time, and the first target time has a corresponding relationship with the above-mentioned XX time. For example, if the above-mentioned XX is MM year NN month KK day, then the first target time is MM + 1 year NN month KK day, that is to say, the first target time is 1 year later than the above-mentioned XX time. M, N, and K are all positive integers. And, if the mobile phone obtains the user's birthday as the above-mentioned XX time according to the user's input, then the mobile phone obtains the second target time, and the second target time has a corresponding relationship with the above-mentioned XX time. For example, if the above-mentioned XX is MM year NN month KK day, then the first target time is MM + 1 year NN month KK - 1 day, that is to say, the first target time is 1 year less 1 day later than the above-mentioned XX time. Comparing the above-mentioned first target time and the second target time, it can be seen that in the same year, the above-mentioned first target time is earlier than the second target time.

[0184] It can be understood that since the first target time is related to the birthday of the mobile phone user's mother, and the first target time is before the birthday of the mobile phone user's mother. Therefore, in some embodiments, the above-mentioned first target time can also be replaced and described as "before the birthday of the mobile phone user's mother"; and, the above-mentioned second target time is related to the birthday of the mobile phone user, so in some embodiments, the above-mentioned second target time can also be replaced and described as "the birthday of the mobile phone user".

[0185] After that, in response to the current time of the mobile phone being the above-mentioned first target time, that is to say, the current time is before the birthday of the mobile phone user's mother. The mobile phone executes the above-mentioned step S302 and step S303, and the mobile phone recommends the sixth media resource, and the sixth media resource includes the above-mentioned media material 1010. Exemplarily, see again Figure 11 , in response to the current time of the mobile phone being the above-mentioned first target time, the mobile phone displays the moment interface 1110 of the gallery application, and the moment interface 1110 includes the sixth media resource 1111. Among them, the cover of the sixth media resource 1111 is the above-mentioned media material 1010.

[0186] Next, in response to the current time of the mobile phone being the second target time described above, that is, the current time is the birthday of the mobile phone user, the mobile phone executes the above steps S302 and S303, and the mobile phone recommends the fifth media resource, and the fifth media resource includes the above media material 1000. Exemplarily, see Figure 11 , in response to the current time of the mobile phone being the second target time described above, the mobile phone displays the lock screen interface 1100, and the lock screen interface includes a second notification 1101, and the second notification 1101 is used to recommend the above fifth media resource.

[0187] Exemplarily, the second notification 1101 may include a text description corresponding to the recommendation trigger condition of the above fifth media resource, such as, "Happy birthday, master". And, the above second notification 1101 may further include a text description corresponding to the content of the above fifth media resource, such as, "Let's go back to who we used to be together".

[0188] Optionally, in some embodiments, while the mobile phone recommends the above sixth media resource, based on the object included in the above sixth media resource not being the user of the mobile phone, the mobile phone may further display a forwarding control for the sixth media resource. It should be understood that since the person object included in the sixth media resource is not the user of the mobile phone, the purpose of the mobile phone recommending the sixth media resource may be to facilitate the user to send the sixth media resource as a gift. Thus, the mobile phone may display a forwarding control for the sixth media resource while recommending the above sixth media resource. In this way, it can facilitate the user to send the sixth media resource and can enhance the relevance between the media resource and the user.

[0189] Exemplarily, in response to the current time of the mobile phone being the first target time described above, the mobile phone executes the above steps S302 and S303, the mobile phone recommends the sixth media resource, and displays a forwarding control for the sixth media resource.

[0190] For example, see Figure 12 , in response to the current time of the mobile phone being the first target time described above, the mobile phone displays the desktop 1200, and the desktop 1200 includes a desktop card 1201; the desktop card 1201 includes the cover of the above sixth media resource. Since the person object included in the sixth media resource is not the user of the electronic device, the desktop card 1201 further includes a forwarding control 1202. The forwarding control is used to trigger a sending operation for the sixth media resource, such as sending the sixth media resource by email, or sending the sixth media resource by instant messaging software, etc.

[0191] Another example, see Figure 12, in response to the current time of the mobile phone being the above-mentioned first target time, the mobile phone displays a third notification 1211 on the desktop 1210, and the third notification 1211 indicates a sixth media resource. Since the person object included in the sixth media resource is not the user of the electronic device, the third notification further includes a forwarding control 1212. Exemplarily, the third notification 1211 may include a text description corresponding to the recommendation trigger condition, such as, "Don't forget your mother's birthday"; and, the third notification 1211 may further include a text description corresponding to the content of the sixth media resource, such as, "Come and see the wonderful moments of your mother's birthday".

[0192] In some examples, the mobile phone can also recommend media materials at different times according to different positions within a preset time period.

[0193] Exemplarily, before a preset time (such as, Spring Festival, Mid-Autumn Festival, Christmas, etc.), when the distance between the current position of the mobile phone and the place of long residence is greater than or equal to a first preset distance, the mobile phone recommends a first media resource, and the first media resource includes media materials whose shooting location is at the above-mentioned place of long residence. Among them, the above-mentioned first preset distance can be 100 kilometers, 500 kilometers, 2000 kilometers, etc.

[0194] In this example, the mobile phone can judge whether the user reunites with family members within a preset time period through the position within the preset time period. For example, within the preset time period, if the position of the mobile phone is not at the place of long residence, the mobile phone can obtain that the user does not reunite with family members. Then, the mobile phone can immediately recommend the first media resource. In this way, the user can see the first media resource on the mobile phone, and the relevance between the recommended media resource and the user can be improved from the spatial dimension.

[0195] Another example is that within a preset time period, the mobile phone shoots media materials at the place of long residence. After that, after the preset time period, in response to the distance between the current position of the mobile phone and the place of long residence being greater than or equal to a second preset distance, the mobile phone recommends a second media resource, and the second media resource includes the media materials shot by the mobile phone at the place of long residence, or the second media resource includes the media materials shot by the mobile phone at the place of long residence and other media materials whose shooting location is at the place of long residence. Among them, the above-mentioned second preset distance can be 50 kilometers, 75 kilometers, 90 kilometers, etc.

[0196] In this example, the mobile phone can determine whether the user is reunited with their family during a preset time period based on its location. For example, if the mobile phone's location is at the long-term residence during the preset time period, the mobile phone can conclude that the user is reunited with their family. Then, after the user leaves the long-term residence, such as when the distance between the mobile phone's current location and the long-term residence is greater than or equal to a second preset distance, the mobile phone can recommend media materials whose shooting location is at the long-term residence to the user. Further, if the user shoots media materials at the long-term residence during the preset time period, the user can also recommend media resources that include these media materials shot at the long-term residence during the preset time period. In this way, the relevance between the recommended media resources and the user can be enhanced from the spatial dimension.

[0197] For example, refer to Figure 13 , in response to the current time of the mobile phone being the day before the Mid-Autumn Festival and the current location of the mobile phone being more than 1000 kilometers away from the hometown, that is, before the Mid-Autumn Festival, the current location of the mobile phone is not the hometown, the mobile phone displays Desktop 1300, and the desktop includes the first desktop card 1301. The first desktop card 1301 includes the first media resource, and the first media resource includes media materials whose shooting location is at the hometown. And, the above-mentioned first desktop card 1301 also includes a text description corresponding to the recommended trigger condition, such as, "Missing relatives even more during festive seasons. Do you want to see the wonderful times in your hometown?". Among them, in Figure 13 the corresponding scenario, the recommended trigger condition can be that the current time is the day before the Mid-Autumn Festival and the current location of the mobile phone is more than 1000 kilometers away from the hometown, that is, the target time is before the Mid-Autumn Festival and the target location is more than 1000 kilometers away from the hometown where the current location is. And, the above-mentioned first desktop card 1301 also includes a text description corresponding to the cover content of the first media resource, such as, "The beauty inside the old house".

[0198] Another example, again refer to Figure 13 , during the Lantern Festival, the mobile phone shoots the third media material in the hometown. Next, when the user leaves the hometown, the mobile phone displays Desktop 1320; Desktop 1320 includes the third desktop card 1321, and the third desktop card 1321 includes the third media resource, and the third media resource includes the above-mentioned third media material. Among them, the above-mentioned destination being far away from the hometown can be obtained by the mobile phone identifying the train ticket whose departure place is the hometown. And, the above-mentioned third desktop card 1321 also includes a text description corresponding to the recommended trigger condition that the destination is far away from the hometown, such as, "The train is starting. Recall the wonderful time in your hometown".

[0199] In some other embodiments, refer to Figure 14, when the current time of the mobile phone is before Mother's Day (e.g., the current time of the mobile phone is within one day before Mother's Day), and when the user is idle (e.g., the current time of the mobile phone is within a time period when the user does not frequently use the mobile phone), in response to the user's operation of lighting up the mobile phone display screen, the mobile phone displays Desktop 1400; Desktop 1400 includes the second desktop card 1401, the second desktop card 1401 includes the second media resource, and the second media resource includes media materials of the mother of the mobile phone user. In addition, the above-mentioned second desktop card 1401 also includes corresponding recommended trigger conditions and a text description corresponding to the media materials included in the second media resource, such as, "Mother's Day is coming soon. Give mom an unforgettable video gift." It can be understood that in this text description, "Mother's Day" corresponds to the recommended trigger condition, and "mom" corresponds to the media materials included in the second media resource.

[0200] In some other embodiments, refer to Figure 14 , when the current time of the mobile phone is before the wedding anniversary of the mobile phone user, in response to the user's operation of lighting up the mobile phone display screen, the mobile phone displays Desktop 1410; Desktop 1410 includes the fourth desktop card 1411, and the cover of the fourth desktop card is the fourth media material. The person object included in the fourth media material is the wife of the mobile phone user.

[0201] In some other embodiments of the present application, the process of the mobile phone generating media resources according to the clustering result can be executed by a state machine deployed on the mobile phone. The state machine on the mobile phone can be understood as a process on the mobile phone, and this process can be used to generate media resources. In addition, after this process generates media resources, this process can store the generated media resources in the target album.

[0202] Exemplarily, refer to Figure 15 , the state machine can generate media resources through Step 1 - Step 3 - 1. Step 1. After the state machine starts, the state machine can determine whether there is a material album on the mobile phone. Among them, the material album can be understood as a collection of media materials used to generate media resources. In some implementation manners, after the mobile phone shoots media materials, the mobile phone can perform an aesthetic score on the media materials and associate the media materials with a relatively high aesthetic score with the material album, so that the subsequent state machine can generate media resources according to the media materials with a relatively high aesthetic score in the material album.

[0203] If there is a material album, the state machine executes Step 2; if there is no material album, the state machine instructs to generate a material album.

[0204] Step 2. The state machine clusters the material album to obtain a clustering result.

[0205] It can be understood that the state machine can cluster the media materials included in the material album from multiple dimensions. For example, the state machine can cluster the material album from the dimension of the shooting location, and cluster the media materials with similar shooting locations to obtain a clustering result. For another example, the state machine can cluster the material album from the dimension of the character attribute tags, and cluster the media materials with the same character attribute tags to obtain a clustering result. For another example, the state machine can also cluster the material album from the dimension of time, and cluster the media materials with close shooting times to obtain a clustering result.

[0206] Optionally, after step 2, the state machine can execute step 2-1.

[0207] Step 2-1. The state machine removes duplicates from the clustering result.

[0208] Exemplarily, the state machine can remove duplicates from the clustering result from the time dimension. Exemplarily again, the state machine can also remove duplicates from the clustering result from the space dimension.

[0209] Exemplarily, after step 2 or step 2-1, the state machine can execute step 3-1 or step 3-2 or step 3-3 or step 3-4 to generate media resources.

[0210] Step 3-1. When the mobile phone meets the recommendation trigger condition, the state machine obtains media resources according to the label corresponding to the recommendation trigger condition and the clustering result of the label. Specifically, this process can refer to the relevant description of step S302 above and will not be elaborated here.

[0211] Step 3-2. The state machine generates media resources according to the clustering result of the content type label.

[0212] For example, the state machine can generate media resources according to the clustering result of the content type label of scenery. For another example, when the number of clustering results of the content type label of food increases by more than 10, the state machine generates media resources according to the clustering result of the content type label of food.

[0213] Step 3-3. The state machine generates media resources according to the clustering result of the shooting location.

[0214] For example, the state machine can generate media resources according to the clustering result of the usual residence. For another example, the state machine can execute the above steps 1 and 2 on the newly acquired media materials of the mobile phone, and then generate media resources according to the clustering result of the long-term residence.

[0215] Step 3-4. The state machine generates media resources according to the clustering result of the shooting time.

[0216] For example, the state machine may generate media resources according to the clustering result of the shooting time closest to the current time. Another example is that the state machine may also generate media resources according to the clustering result of the historical shooting time corresponding to the current time.

[0217] It should be noted that the personal information used in the technical solution of this application is limited to the information for which individual consent has been obtained, including but not limited to notifying and reminding the user to read the relevant user agreement (notification) before the user uses this function, and signing the agreement (authorization) including authorizing the relevant user information.

[0218] Combined with the algorithm steps of each example described in the embodiments disclosed herein, this application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described function for each specific application in combination with the embodiments, but such implementation should not be considered to exceed the scope of this application.

[0219] This embodiment can divide the functional modules of the electronic device according to the above method examples. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is illustrative, only a logical function division, and there may be other division methods in actual implementation.

[0220] This application embodiment also provides an electronic device, such as Figure 16 shown, the electronic device may include one or more processors 1601, a memory 1602, and a communication interface 1603.

[0221] Among them, the memory 1602 and the communication interface 1603 are coupled to the processor 1601. For example, the memory 1602 and the communication interface 1603 may be coupled to the processor 1601 through a bus 1604.

[0222] Among them, the communication interface 1603 is used for data transmission with other devices. The memory 1602 stores computer program code. The computer program code includes computer instructions. When the computer instructions are executed by the processor 1601, the electronic device executes the relevant method steps in the above method embodiments of this application.

[0223] Among them, the processor 1601 can be a processor or a controller. For example, it can be a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logical blocks, modules, and circuits described in connection with the present disclosure. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and so on.

[0224] Among them, the bus 1604 can be a peripheral component interconnect (PCI) bus, an extended industry standard architecture (EISA) bus, or the like. The above-mentioned bus 1604 can be divided into an address bus, a data bus, a control bus, and the like. For the sake of convenience of representation, Figure 16 only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.

[0225] The embodiment of the present application also provides a computer-readable storage medium. Computer program code is stored in the computer storage medium. When the above-mentioned processor executes the computer program code, the electronic device executes the relevant method steps in the above-mentioned method embodiment.

[0226] The embodiment of the present application also provides a computer program product. When the computer program product runs on a computer, the computer is caused to execute the relevant method steps in the above-mentioned method embodiment.

[0227] Among them, the electronic device, the computer-readable storage medium, or the computer program product provided by the present application is all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved by them can refer to the beneficial effects in the corresponding method provided above, and will not be elaborated here.

[0228] Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In practical applications, the above functions can be allocated to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0229] In several embodiments provided in the present application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical functional division. In actual implementation, there may be other division methods. For example, 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 displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in electrical, mechanical or other forms.

[0230] The units described as separate components may or may not be physically separated. The components displayed as units can be one physical unit or multiple physical units, that is, they can be located in one place, or they can be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0231] In addition, each functional unit in various embodiments of the present application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0232] If the above 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 embodiments of the present application, in essence, or the part that makes a contribution, or all or part of this technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to enable a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: USB flash drive, mobile hard disk, read only memory (ROM), random access memory (RAM), magnetic disk or optical disc and other various media that can store program codes.

[0233] The above content is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be covered by the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claimed rights.

Claims

1. A method for recommending media resources, characterized in that, Applied to an electronic device, the method includes: In response to the current time being the target time, recommending a first media resource; the first media resource includes a first media material, and the first media material includes a person object; If the person object is the user of the electronic device, then the target time is the first time; there is a corresponding relationship between the first time and the shooting time of the first media material; If the person object is not the user of the electronic device, then the target time is the second time; there is a corresponding relationship between the second time and the shooting time of the first media material, and the second time is earlier than the first time.

2. The method according to claim 1, characterized in that, The method further includes: Within a preset time period, when the distance between the current position and the target position of the electronic device is greater than or equal to a first preset distance, recommending a second media resource; the second media resource includes a second media material, and the shooting position of the second media material corresponds to the target position.

3. The method according to claim 1, wherein The method further includes: Shooting a third media material at the target position within the preset time period; After the preset time period, in response to the distance between the current position and the target position exceeding a second preset distance, recommending a third media resource; the third media resource includes the third media material.

4. The method according to any one of claims 1 to 3, characterized in that The method further includes: In response to meeting a first condition, recommending a fourth media resource, the fourth media resource includes a fourth media material; The first condition includes any one of the following conditions: The current position corresponds to the shooting position of the fourth media material, and the difference between the shooting time of the media material corresponding to the shooting position of the fourth media material and the current time is greater than or equal to a first duration, and the first duration is a positive integer; The current position corresponds to the shooting position of the fourth media material, and the difference between the shooting time of the media material corresponding to the shooting position of the fourth media material and the current time is less than the first duration and greater than or equal to a second duration, and the number of media materials with the shooting position being the shooting position of the fourth media material is greater than a first number, the second duration is shorter than the first duration, the second duration is a positive integer, and the first number is a positive integer; The current position corresponds to the shooting position of the fourth media material, and the difference between the shooting time of the media material corresponding to the shooting position of the fourth media material and the current time is less than the second duration and greater than or equal to a third duration, and the number of media materials with the shooting position being the shooting position of the fourth media material and the shooting time within a target time period is greater than a second number; the third duration is shorter than the second duration, the third duration is a positive integer, the second number is greater than the first number, the second number is a positive integer; the target time period is the time period starting from the second duration before the current time to the third duration before the current time; Wherein, the current position corresponding to the shooting position of the fourth media material includes: The distance between the current position and the shooting position of the fourth media material is less than or equal to a third preset distance.

5. The method according to any one of claims 1-4, characterized in that, The recommended first media resource includes: In response to the user's operation of lighting up the display screen of the electronic device, a desktop is displayed, and the desktop includes desktop cards; the desktop cards include the covers of the first media resources. When the person object is not the user of the electronic device, the desktop card further includes a forwarding control for the first media resource.

6. The method according to claim 5, characterized in that, The desktop card further includes a text description, and the theme of the text description corresponds to the label of the first media material; the label of the first media material is obtained by identifying the first media material.

7. The method according to claim 6, characterized in that, The method further includes: In response to a trigger operation on the desktop card, a playback interface for the first media resource is displayed.

8. The method according to any one of claims 1 to 4, characterized in that, The recommended first media resource includes: A notification message is displayed. In response to a trigger operation on the notification message, a media resource editing interface is displayed, and the media resource editing interface includes the first media resource and editing options for the first media resource.

9. The method according to any one of claims 1 to 8, characterized in that, The method further includes: Media materials are obtained. Multi-subject detection is performed on the media materials to obtain labels of the media materials. The labels of the media materials include person attribute labels or content type labels. The person attribute labels are used to characterize the person objects included in the media materials, and the content type labels are used to characterize the content objects included in the media materials. In the case where the number of media materials with the same content type label or the same person attribute label is greater than or equal to a preset number, a fifth media resource is recommended. The fifth media resource includes multiple media materials with the same content type label or multiple media materials with the same person attribute label.

10. The method according to any one of claims 1-9, characterized in that, The first media material includes videos and / or photos.

11. The method according to claim 2, characterized in that, The target position is associated with the user.

12. The method according to any one of claims 1-11, characterized in that, The person object is not the user of the electronic device, specifically including any one of the following: the person object is the user's child, the person object is the user's parent, the person object is the user's spouse, the person object is the user's grandparent, the person object is the user's sister, or the person object is the user's brother.

13. An electronic device, characterized in that, The electronic device includes a processor and a memory; the processor is coupled to the memory; the memory is used to store computer program code; the computer program code includes computer instructions, and when the processor executes the above computer instructions, the electronic device executes the method described in any one of claims 1-12.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes computer instructions, and when the computer instructions run on an electronic device, the electronic device executes the method described in any one of claims 1-12.

15. A computer program product, characterized in that, The computer program product includes instructions, and when the computer program product runs on an electronic device, the electronic device executes the method described in any one of claims 1-12.