Visual media classification method and device, electronic equipment and readable storage medium

By filtering and optimizing album themes, the problem of visual media being displayed repeatedly in multiple albums was solved, achieving a reasonable allocation of album content and improving user experience.

CN121564597APending Publication Date: 2026-02-24VIVO MOBILE COMM (SHENZHEN) CO LTD
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202511754317.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-26
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

In existing technologies, the categorization of visual media can easily lead to the same media appearing in multiple albums, resulting in a poor user experience.

Method used

By identifying all album themes associated with the target object, filtering out the second album themes based on retention data, and determining the final third album themes based on the target object and the second album themes, the number of album themes is reduced, thus decreasing the possibility of the same target object appearing in multiple albums.

Benefits of technology

Optimize the number of album themes, increase the content richness of each album, improve the user experience, and reduce redundant display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121564597A_ABST
    Figure CN121564597A_ABST
Patent Text Reader

Abstract

The invention discloses a visual media classification method and device, electronic equipment and a readable storage medium, and belongs to the technical field of electronic equipment.The visual media classification method comprises the steps that all first photo album themes associated with a target object are determined, and the target object comprises at least one of pictures and videos; determining a second photo album theme according to the retention condition of the first photo album theme; and determining a third photo album theme classified by the target object according to the target object and the second photo album theme.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of electronic equipment technology, and specifically relates to a method, apparatus, electronic device, and readable storage medium for classifying visual media. Background Technology

[0002] In recent years, users have frequently taken photos using mobile phones and other electronic devices. As time goes by, the number of photos accumulates, leading to a poor user experience when opening the album. In recent years, more and more smart photo album applications have emerged on mobile phones, such as the built-in "Memory Album" function, which aggregates related photos based on different themes to create album collections.

[0003] In related technologies, when categorizing images, the content of the images is usually analyzed, and then the images are categorized into the albums to which the content of the images relates. However, if the content of an image relates to multiple albums, then the image will be categorized into multiple albums, resulting in the image being displayed repeatedly in multiple albums. When users enter an album, they will see a lot of redundant content, which will affect the viewing experience. Summary of the Invention

[0004] This application aims to provide a method, apparatus, electronic device, and readable storage medium for classifying visual media, at least solving one of the technical problems of classifying visual media into all albums associated with the content of the visual media when classifying visual media.

[0005] In a first aspect, embodiments of this application provide a method for classifying visual media, including:

[0006] Identify all first-album topics associated with the target object, which includes at least one of images and videos;

[0007] The theme for the second album will be determined based on the retention status of the theme from the first album.

[0008] Based on the target object and the theme of the second album, determine the theme of the third album to which the target object belongs.

[0009] Secondly, embodiments of this application provide a visual media classification device, comprising:

[0010] The first determining module is used to determine all first album topics associated with the target object, and the target object includes at least one of pictures and videos;

[0011] The second determining module is used to determine the theme of the second album based on the retention status of the theme of the first album;

[0012] The third determination module is used to determine the third album theme to which the target object belongs, based on the target object and the theme of the second album.

[0013] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, the memory storing a program or instructions executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the visual media classification method provided in the first aspect.

[0014] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the visual media classification method provided in the first aspect.

[0015] Fifthly, embodiments of this application provide a chip including a processor and a communication interface coupled to the processor, the processor being used to run programs or instructions to implement the steps of the visual media classification method provided in the first aspect.

[0016] In a sixth aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the steps of the visual media classification method provided in the first aspect.

[0017] In the embodiments of this application, when determining the album to which the target object should be categorized, firstly, all first album topics associated with the target object are determined, then the retention status of all first album topics is determined, and second album topics are determined based on the retention status of all first album topics. Then, based on the target object and the second album topics, the third album topic to which the target object is categorized is determined. That is, by filtering the album topics associated with the target object, the number of album topics to which the target object is categorized is reduced, thereby reducing the possibility of the same target object appearing in multiple albums. Attached Figure Description

[0018] Figure 1 This is one of the flowcharts of a method for classifying visual media according to an embodiment of this application;

[0019] Figure 2 This is one of the logical diagrams showing the relationship between the target object and the theme of the first album in the classification method of visual media according to the embodiments of this application;

[0020] Figure 3 It is a relationship diagram for generating photo albums in related technologies;

[0021] Figure 4 This is the second logical diagram illustrating the relationship between the target object and the theme of the first album in the classification method of visual media according to the embodiments of this application;

[0022] Figure 5 This is a relationship diagram of the photo album generated according to the visual media classification method of the embodiments of this application;

[0023] Figure 6 This is a flowchart of the implicit enumeration method in the classification method of visual media according to the embodiments of this application;

[0024] Figure 7 This is a second flowchart of a method for classifying visual media according to an embodiment of this application;

[0025] Figure 8 A structural block diagram of a visual media classification device according to an embodiment of this application is shown;

[0026] Figure 9 A structural block diagram of an electronic device according to an embodiment of this application is shown;

[0027] Figure 10 A schematic diagram of the hardware structure of an electronic device implementing an embodiment of this application is shown. Detailed Implementation

[0028] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0029] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0030] The following is combined Figures 1 to 10 This application describes a method, apparatus, electronic device, and readable storage medium for classifying visual media according to embodiments of the present application.

[0031] This application provides a method for classifying visual media. Figure 1 A flowchart illustrating one of the methods for classifying visual media according to an embodiment of this application is shown. For example... Figure 1 As shown, the classification methods for visual media include:

[0032] Step 102: Identify all first album topics associated with the target object, which includes at least one of images and videos.

[0033] Specifically, when categorizing uncategorized target objects stored on electronic devices, the first album theme associated with the target object is determined first.

[0034] The target object can be an image, a video, or both.

[0035] The target object can be selected by the user or by the electronic device's system.

[0036] like Figure 2 As shown, the first album theme associated with target object 1 is first album theme 1, the first album theme associated with target object 2 is first album theme 2 and first album theme 3, the first album theme associated with target object 3 is first album theme 1 and first album theme 3, and the first album theme associated with target object 4 is first album theme 3.

[0037] Step 104: Determine the theme of the second album based on the retention status of the theme of the first album.

[0038] Specifically, in order to reduce the number of albums, only some of the first album themes may be retained. Therefore, based on the retention status of the first album themes, the retained first album themes are determined to be the second album themes.

[0039] In other words, the album themes are filtered.

[0040] like Figure 4 As shown, the first album theme 2 was not saved; only the first album theme 1 and the first album theme 3 were saved. Therefore, the first album theme 1 and the first album theme 3 can be used as the second album theme.

[0041] Step 106: Based on the target object and the theme of the second album, determine the theme of the third album to which the target object belongs.

[0042] Specifically, based on the target object and the theme of the second album, the third album theme to which the target object belongs is determined from all the themes of the second album, so that when assigning the target object, the target object is assigned to the album corresponding to the theme of the third album.

[0043] In other words, the first album theme of the target object is filtered multiple times, and the remaining first album theme is the third album theme.

[0044] In the embodiments of this application, when determining the album to which the target object should be categorized, firstly, all first album topics associated with the target object are determined, then the retention status of all first album topics is determined, and second album topics are determined based on the retention status of all first album topics. Then, based on the target object and the second album topics, the third album topic to which the target object is categorized is determined. That is, by filtering the album topics associated with the target object, the number of album topics to which the target object is categorized is reduced, thereby reducing the possibility of the same target object appearing in multiple albums.

[0045] The third album can have one theme.

[0046] According to some embodiments of this application, determining the theme of the second album based on the retention status of the theme of the first album includes: determining the retained theme of the first album as the theme of the second album according to a target retention scheme; wherein the target retention scheme is determined based on the condition of minimizing the total number of album themes.

[0047] Specifically, all first album topics will be retained based on the target retention plan. Based on the retention status of the first album topics, the second album topics will be determined, including: based on the target retention plan, the retained first album topics will be determined as the second album topics.

[0048] The target retention plan is determined based on minimizing the total number of album themes, thereby achieving the maximum reduction in the number of albums and effectively decreasing the total number of albums.

[0049] By optimizing the number of album themes, we can obtain the fewest third album themes and the fewest albums, provided that each target object has at least one matching second album theme. This achieves the goal of optimizing the number of albums. Reducing the number of albums can increase the richness of the content in each album and provide users with a better viewing experience.

[0050] like Figure 4 As shown, album theme 2 is the album theme that was not saved.

[0051] According to some embodiments of this application, the target retention scheme is determined by enumeration, with the condition of minimizing the total number of album topics.

[0052] Specifically, the target retention plan is determined by enumeration, with the condition of minimizing the total number of album topics. Since there are multiple retention plans for the first album topics, determining the minimum number of total album topics through enumeration is a feasible and reliable method.

[0053] The target retention scheme is determined by implicit enumeration, based on minimizing the total number of album topics, thereby reducing the computational load.

[0054] For example, for multiple target objects, the number of topics in the first album may be multiple. We have already determined the list of target objects (assuming the list length is M, i.e., the number of target objects is M) and the list of topics in the first album (assuming the list length is N, i.e., the number of topics in the first album is N), as well as the association S between the target objects and the topics in the first album. First, we define each "whether the first album topic is retained" as a Boolean variable x. Then, the optimization objective is:

[0055] .

[0056] Where target represents the optimization objective; min represents minimization; x represents i To x N The summation of ; i represents the theme of the first album; x i This indicates whether the i-th first album topic is retained. Only two values ​​can be used: 0 or 1. 0 means the first album topic is not retained, and 1 means the first album topic is retained. By solving the formula, the second album topic with the minimum number of elements can be obtained.

[0057] The target satisfies the optimization goal of "minimizing the number of albums". To simultaneously satisfy the condition of "using the target object as much as possible", a restriction needs to be added to this optimization goal. Specifically, for each target object, all first album themes associated with this target object need to be found. To ensure that the target object is ultimately used, a restriction is set that at least one of these first album themes must be retained.

[0058] .

[0059] Where restriction represents the limiting condition; j represents the target object; i represents the theme of the first album; S ij EXISTS indicates that there is a relationship between the target object j and the first album topic i.

[0060] For x i The summation is performed, and the summation result is limited to be greater than or equal to 1, thus determining the first album topic associated with the target object j in the final retention method; at least one such topic will be retained. For M target objects, as long as there is at least one first album topic associated with a target object, a formula with such a constraint will be generated to limit the target and optimize the solution process.

[0061] For optimization problems under the aforementioned constraints, there are usually specialized solvers to retrieve the optimal solution, taking four target objects and three first album topics as an example.

[0062] First, we build the model and obtain:

[0063] ;

[0064] .

[0065] The above model is solved using an enumeration method.

[0066] The enumeration method is an implicit enumeration method.

[0067] Implicit enumeration is an optimization of enumeration, improving the efficiency of enumeration traversal. The problem description shows that directly enumerating the solution space is exponentially related to N, meaning each topic has two states: choose or not choose. Therefore, the time complexity is O(2^N). N The number of traversals becomes excessive when N is large. Therefore, optimizing the algorithm using implicit enumeration reduces the number of traversals required to obtain the optimal solution. For example, binary search can be used to assist in the search. Figure 6 A flowchart illustrating the implicit enumeration method in the classification method of visual media according to an embodiment of this application is shown. Figure 6 As shown, the steps of the implicit enumeration method include:

[0068] Step 602: Initial value 0;

[0069] Step 604: Start the first album with the number of topics m;

[0070] Step 606: Initialize N;

[0071] Step 608: End the first album with the number of topics n;

[0072] Step 610: Binary search for the number of topics in the first album, k = (m + n) ÷ 2;

[0073] Step 612: Determine whether k has been traversed; if the result is yes, proceed to step 614; if the result is no, proceed to step 616.

[0074] Step 614: End;

[0075] Step 616: Iterate through all schemes where the number of topics in the first album is k;

[0076] Step 618: Determine whether the restriction conditions are met; if the result is yes, proceed to step 620; if the result is no, proceed to step 622.

[0077] Step 620: n=k;

[0078] Step 622: m=k.

[0079] Specifically, the number of topics in the first album is initialized to 0, and the number of topics in the last album is initialized to N.

[0080] Calculate the number of topics in the first album by binary search, k = (m + n) ÷ 2. If it is not an integer, round down.

[0081] If k has been traversed before, the algorithm ends and outputs the current optimal solution; otherwise, iterates through all solutions where the number of topics in the first album is k.

[0082] If any of these solutions satisfy the constraints, then let n=k (to find a smaller solution); otherwise, let m=k (to find a feasible solution).

[0083] The details are shown in Table 1 below:

[0084] Table 1

[0085] First, we iterate through the solutions with k=1 and find that no solution satisfies all the constraints. Therefore, we set m=1. Then, we iterate through the solutions with k=2 and find a solution that satisfies the constraints: x1=1, x2=0, x3=1. Therefore, we set n=2. Now k=1, and we have already iterated through the solutions. The algorithm ends and outputs the optimal solution.

[0086] As we can see, for optimization problems with three 0 and 1 states, the number of iterations is not 2. 3 Instead of performing 8 iterations, the optimal solution was found in advance during the traversal and the result was returned. This is the advantage over direct enumeration.

[0087] The theme of the first album that is retained, determined by the above method, is the theme of the second album.

[0088] like Figure 2 As shown, the relationship between each target object and each first album theme is determined.

[0089] like Figure 3 As shown, based on this, if we use the classification method of visual media in related technologies, multiple albums may contain the target object, and the number of albums is also relatively large.

[0090] like Figure 4 As shown, according to the embodiments of this application, after optimizing the number of first album topics through enumeration, only two first album topics are retained.

[0091] like Figure 5 As shown, only two albums are generated, and each target object exists in only one album; there are no duplicate target objects in multiple albums.

[0092] According to some embodiments of this application, determining the third album theme to which the target object belongs, based on the target object and the second album theme, includes: when there are at least two second album themes, determining the third album theme to which the target object belongs based on the correlation between the target object and the second album theme; and when there is only one second album theme, determining the second album theme as the third album theme.

[0093] Specifically, based on the target object and the theme of the second album, the theme of the third album to which the target object belongs is determined, including: when there are at least two themes in the second album, determining the relevance between the target object and each theme in the second album, and taking the theme of the second album with the highest relevance to the target object as the theme of the third album, thereby classifying the target object into a more suitable album.

[0094] like Figure 2 and Figure 4 As shown, the correlation between target object 3 and the first album theme 1 is 0.83, and the correlation between target object 3 and the first album theme 3 is 0.76. Therefore, the third album theme of target object 3 is the first album theme 1.

[0095] Based on the target object and the theme of the second album, determine the theme of the third album to which the target object belongs, including: if there is only one theme in the second album, determine the theme of the second album as the theme of the third album.

[0096] Determine the relevance between the target object and each second album theme, and designate the second album theme with the highest relevance as the third album. If there are multiple target objects, perform the same operation on all target objects to ensure that each target object belongs to only one third album theme and that the target object has the highest relevance to the second album theme, thereby improving the rationality of the album content.

[0097] Once the theme of the third album is determined, the next step is simply to fill in the relevant target object content for the third album theme. A target object can only be placed under one third album theme, so the target object should be placed in the third album theme with the highest relevance.

[0098] According to some embodiments of this application, after determining the third album theme to which the target object belongs based on the target object and the second album theme, the visual media classification method further includes: determining the fourth album theme corresponding to the target object based on the user's access data to the album; and moving the target object from the album corresponding to the third album theme to the album corresponding to the fourth album theme.

[0099] Specifically, after determining the third album theme to which the target object belongs based on the target object and the second album theme, the visual media classification method also includes: recording the user's access data for each album when the user visits the album, determining a fourth album theme to which the target object belongs based on the user's access data, and moving the target object to the album corresponding to the fourth album theme, thereby achieving the effect of subsequent adjustments to the target object and giving the user a better viewing experience.

[0100] According to some embodiments of this application, determining the fourth album theme corresponding to the target object based on the user's access data to the album includes: determining the access data of the second album theme associated with the target object; and determining the second album theme with the highest access data as the fourth album theme if the target object is not categorized under the second album theme with the highest access data.

[0101] Specifically, based on user access data of photo albums, the fourth album theme corresponding to the target object is determined, including: determining the access data of the album corresponding to the second album theme associated with the target object; comparing the access data of the album corresponding to the second album theme; if the second album theme corresponding to the album with the highest current access data is not the third album theme of the target object, then the second album theme corresponding to the album with the highest number of accesses is taken as the fourth album theme, and then the target object is moved to the album corresponding to the fourth album theme, thereby adding the target object to the albums that the user frequently browses, improving the user's viewing experience.

[0102] In other words, based on users' subsequent access to the albums, a target object allocation strategy is formulated. For example, if it is found that users prefer to browse or edit the "Travel" album, then if there are multiple target objects in the second album theme, including "Appearance", the target object is given priority to be allocated to the "Travel" related album.

[0103] According to some embodiments of this application, after determining the third album theme to which the target object is classified based on the target object and the second album theme, the method for classifying visual media further includes: determining the third album theme to which other target objects are classified; and generating an album based on all the third album themes.

[0104] The electronic device stores multiple target objects. For each target object, a first album theme is determined. Then, all the obtained first album themes are aggregated to obtain multiple first album themes. The target objects can be user-selected objects or all target objects within the electronic device.

[0105] Determine whether the target object is associated with each first album theme. Perform the same operation on each target object to determine the relationship between each target object and each first album theme. Based on the relationship between each target object and each first album theme, determine at least one second album theme among multiple first album themes. This optimizes the number of album themes, reduces the number of album themes, and mitigates the problem of too many generated albums affecting the viewing experience.

[0106] Determine a third album topic to which the target object belongs in at least one second album topic, and perform the same operation for each target object, that is, determine an album to be added to for each target object.

[0107] Based on the target object and the theme of the third album, at least one album is generated. Then, the target object is added to the album corresponding to the theme of the third album to which the target object belongs. After adding all target objects to the corresponding albums, the album generation is completed.

[0108] The visual media classification method provided in this application adds each target object to an album selectively, thereby reducing the possibility of the same target object being added to multiple albums at the same time. This results in a sufficiently rich album with no redundancy between them, improving the user's browsing experience.

[0109] like Figure 2 , Figure 4 and Figure 5 As shown, taking four target objects with three first album themes as an example, the correlation between target object 1 and "cat" is 0.87, the correlation between target object 2 and "cat" is 0.75, the correlation between target object 2 and "home" is 0.79, the correlation between target object 3 and "cat" is 0.83, the correlation between target object 3 and "travel" is 0.76, and the correlation between target object 4 and "travel" is 0.92.

[0110] In other words, the content of the four target groups mainly focuses on pet cats, home life, and outings, so the corresponding three first album themes are: "Cat Diary", "Little Joys at Home", and "Park Travelogue".

[0111] like Figure 2 As shown, the lines connecting the target object and the first album topic indicate that the target object and the first album topic are associated. The degree of association indicates the degree of association between the target object and the first album topic. A target object may be associated with multiple first album topics at the same time.

[0112] That is, such as Figure 2As shown, target objects stored within a specified time range are obtained. These target objects are then input into a topic generator (such as a multimodal large model) to generate a series of topics that match the content or tags of the target objects, as well as which target objects each topic is associated with. Each target object is then input into a topic extractor (a multi-classification model for target objects can be used, where the input is a target object and the output is the probability of each topic type; if the probability exceeds a preset threshold, the target object content is considered to contain that topic). All topics are then input into the large model, which expands the topics into first album topics. For example, the target object's topic "cat" can generate the first album topic "cat diary". Finally, each topic associated with the target object is assigned to the first album topic corresponding to its topic, and the correlation is the topic probability output by the classification model.

[0113] like Figure 3 As shown, based on this, if the classification method of visual media in related technologies is used, the generated albums have duplicate target objects, and the number of albums is also relatively large.

[0114] like Figure 5 As shown, only two albums are generated, and the target objects in each album are not duplicated.

[0115] Figure 7 A second flowchart illustrating a method for classifying visual media according to an embodiment of this application is shown. For example... Figure 7 As shown, the classification methods for visual media include:

[0116] Step 702: Obtain images and the theme for the first album;

[0117] Step 704: Optimize the problem modeling for the first album theme;

[0118] Step 706: Optimize problem modeling;

[0119] Step 708: Assign albums to the pictures and display them.

[0120] Specifically, first, obtain the images and the first album topics associated with them; then, model the problem of optimizing the number of first album topics; optimize the modeling of the problem; then, assign the images to the corresponding albums for display.

[0121] The visual media classification method provided in this application modeles the problem as a global optimization and solves it to find an optimal solution that allows as many target objects as possible to be used while minimizing the number of generated albums and ensuring that target objects are not reused in different albums. The final generated album list is comprehensive, rich, and free of redundancy, providing users with a superior browsing experience.

[0122] The visual media classification method provided in this application can be executed by a visual media classification device. This application uses a visual media classification device executing the visual media classification method as an example to illustrate the apparatus for the visual media classification method provided in this application.

[0123] like Figure 8 As shown, this application provides a visual media classification device 800, including: a first determining module 802, used to determine all first album topics associated with a target object, the target object including at least one of pictures and videos; a second determining module 804, used to determine a second album topic based on the retention status of the first album topics; and a third determining module 806, used to determine a third album topic to which the target object is classified based on the target object and the second album topic.

[0124] In the embodiments of this application, when determining the album to which the target object should be categorized, firstly, all first album topics associated with the target object are determined, then the retention status of all first album topics is determined, and second album topics are determined based on the retention status of all first album topics. Then, based on the target object and the second album topics, the third album topic to which the target object is categorized is determined. That is, by filtering the album topics associated with the target object, the number of album topics to which the target object is categorized is reduced, thereby reducing the possibility of the same target object appearing in multiple albums.

[0125] According to some embodiments of this application, the second determining module includes: a first determining submodule, used to determine the first album topic to be retained as the second album topic according to the target retention scheme; wherein, the target retention scheme is determined based on the condition of minimizing the total number of album topics.

[0126] According to some embodiments of this application, the target retention scheme is determined by enumeration, with the condition of minimizing the total number of album topics.

[0127] According to some embodiments of this application, the third determining module includes: a second determining submodule, used to determine the third album topic to which the target object belongs based on the relevance of the target object and the second album topic when there are at least two second album topics; and a third determining submodule, used to determine the second album topic as the third album topic when there is only one second album topic.

[0128] According to some embodiments of this application, the visual media classification device further includes: a fourth determining module, used to determine the fourth album theme corresponding to the target object based on the user's access data to the album; and a moving module, used to move the target object from the album corresponding to the third album theme to the album corresponding to the fourth album theme.

[0129] According to some embodiments of this application, the fourth determining module includes: a fourth determining submodule, used to determine the access data of the second album topic associated with the target object; and a fifth determining submodule, used to determine the second album topic with the highest access data as the fourth album topic when the target object is not classified in the second album topic with the highest access data.

[0130] According to some embodiments of this application, the visual media classification device further includes: a fifth determining module, used to determine the third album theme to which other target objects are classified; and a generating module, used to generate an album based on all the third album themes.

[0131] The visual media classification device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the scope of the device.

[0132] The visual media classification device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit it.

[0133] The visual media classification device provided in this application embodiment can achieve Figure 1 Figure 6 and Figure 7 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.

[0134] Optionally, such as Figure 9As shown, this application embodiment also provides an electronic device 900, including a processor 902 and a memory 904. The memory 904 stores a program or instructions that can run on the processor 902. When the program or instructions are executed by the processor 902, they implement the various steps of the above-described visual media classification method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.

[0135] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.

[0136] Figure 10 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.

[0137] The electronic device 1000 includes, but is not limited to, the following components: radio frequency unit 1001, network module 1002, audio output unit 1003, input unit 1004, sensor 1005, display unit 1006, user input unit 1007, interface unit 1008, memory 1009, and processor 1010.

[0138] Those skilled in the art will understand that the electronic device 1000 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 1010 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 10 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0139] The processor 1010 is used to determine all first album topics associated with the target object, and the target object includes at least one of pictures and videos;

[0140] The processor 1010 is used to determine the theme of the second album based on the retention status of the theme of the first album;

[0141] The processor 1010 is used to determine the third album theme to which the target object belongs, based on the target object and the theme of the second album.

[0142] As one possible implementation, the processor 1010 is used to determine the theme of the second album based on the retention status of the first album theme, including:

[0143] The processor 1010 is used to determine the first album theme to be retained as the second album theme based on the target retention plan;

[0144] The target retention strategy is determined based on minimizing the total number of album topics.

[0145] As one possible implementation method, the target retention scheme is determined by enumeration, based on the condition of minimizing the total number of album topics.

[0146] As one possible implementation method, the enumeration method is the implicit enumeration method.

[0147] As one possible implementation, the processor 1010 is configured to determine a third album topic to which the target object belongs, based on the target object and the second album topic, including:

[0148] The processor 1010 is used to determine the third album topic to which the target object belongs, based on the relevance of the target object to the second album topic, when there are at least two second album topics.

[0149] The processor 1010 is used to determine the second album theme as the third album theme when the number of second album themes is one.

[0150] As one possible implementation, it also includes: the processor 1010 determining the fourth album theme corresponding to the target object based on the user's access data to the album;

[0151] The processor 1010 is used to move the target object from the album corresponding to the third album theme to the album corresponding to the fourth album theme.

[0152] As one possible implementation, the processor 1010 is used to determine the fourth album topic corresponding to the target object based on the user's access data to the album, including:

[0153] The processor 1010 is used to determine the access data of the second album topic associated with the target object;

[0154] The processor 1010 is used to determine the second album topic with the highest access data as the fourth album topic if the target object is not classified in the second album topic with the highest access data.

[0155] As one possible implementation, it also includes:

[0156] Processor 1010 is used to determine the third album topic to which other target objects are categorized;

[0157] Processor 1010 is used to generate albums based on all third album themes.

[0158] In the embodiments of this application, when determining the album to which the target object should be categorized, firstly, all first album topics associated with the target object are determined, then the retention status of all first album topics is determined, and second album topics are determined based on the retention status of all first album topics. Then, based on the target object and the second album topics, the third album topic to which the target object is categorized is determined. That is, by filtering the album topics associated with the target object, the number of album topics to which the target object is categorized is reduced, thereby reducing the possibility of the same target object appearing in multiple albums.

[0159] It should be understood that, in this embodiment, the input unit 1004 may include a graphics processing unit (GPU) 10041 and a microphone 10042. The GPU 10041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 1006 may include a display panel 10061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit 1007 includes at least one of a touch panel 10071 and other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, joysticks, etc., which will not be described in detail here.

[0160] The memory 1009 can be used to store software programs and various data. The memory 1009 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback function, image playback function, etc.). Furthermore, the memory 1009 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (Synchlink DRAM, SLDRAM), and direct memory bus RAM (DRRAM). The memory 1009 in this embodiment includes, but is not limited to, these and any other suitable types of memory.

[0161] The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into the processor 1010.

[0162] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described visual media classification method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0163] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0164] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described visual media classification method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0165] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0166] This application provides a computer program product stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-described visual media classification method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0167] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0168] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0169] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A method for classifying visual media, characterized in that, include: Identify all first album themes associated with the target object, wherein the target object includes at least one of images and videos; The theme of the second album is determined based on the retention status of the first album theme; Based on the target object and the second album theme, determine the third album theme to which the target object belongs.

2. The method for classifying visual media according to claim 1, characterized in that, Based on the retention status of the first album theme, the second album theme is determined, including: Based on the target retention plan, the first album theme to be retained is determined to be the second album theme; The target retention scheme is determined based on minimizing the total number of album topics.

3. The method for classifying visual media according to claim 2, characterized in that, The target retention scheme is determined by enumeration, based on minimizing the total number of album topics.

4. The method for classifying visual media according to any one of claims 1 to 3, characterized in that, Based on the target object and the second album theme, determine the third album theme to which the target object belongs, including: When there are at least two second album themes, the third album theme to which the target object belongs is determined based on the correlation between the target object and the second album theme; If there is only one theme in the second album, then the theme of the second album is determined to be the theme of the third album.

5. The method for classifying visual media according to any one of claims 1 to 3, characterized in that, After determining the third album theme to which the target object belongs based on the target object and the second album theme, the method for classifying visual media further includes: Based on the user's access data to the album, determine the theme of the fourth album corresponding to the target object; Move the target object from the album corresponding to the third album theme to the album corresponding to the fourth album theme.

6. The method for classifying visual media according to claim 5, characterized in that, Based on user access data to the photo album, the theme of the fourth photo album corresponding to the target object is determined, including: Determine the access data of the second album topic associated with the target object; If the target object is not categorized under the second album topic with the highest access data, the second album topic with the highest access data is determined as the fourth album topic.

7. The method for classifying visual media according to any one of claims 1 to 3, characterized in that, After determining the third album theme to which the target object belongs based on the target object and the second album theme, the method for classifying visual media further includes: Determine the third album theme to which other target objects are categorized; Generate an album based on all the themes of the third album.

8. A visual media classification device, characterized in that, include: The first determining module is used to determine all first album topics associated with the target object, wherein the target object includes at least one of images and videos; The second determining module is used to determine the theme of the second album based on the retention status of the theme of the first album; The third determining module is used to determine the third album theme to which the target object belongs based on the target object and the second album theme.

9. An electronic device, characterized in that, include: A processor and a memory, the memory storing a program or instructions executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the method for classifying visual media as claimed in any one of claims 1 to 7.

10. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the visual media classification method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Photo album generation method and terminal

    CN106776821A

  • Method and device for displaying story album

    CN108235765A

  • Picture classification method and device, terminal and storage medium

    CN108416003A

  • Picture classification method, mobile terminal and computer storage medium

    CN109635829A

  • Method for automatically generating travel photo album MV

    CN111309957A