Media resource classification processing method, apparatus, device, medium, and program product
By employing hierarchical classification and multimodal feature extraction, the problems of high model training cost and low fine-grained label accuracy are solved, achieving efficient and accurate media resource classification and improving the model's flexibility and scalability.
Patent Information
- Application Number
- CN202610499746.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-15
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies suffer from high model training costs, poor flexibility, and low accuracy of fine-grained labels in content understanding, production, and distribution scenarios of media resources such as short videos.
By acquiring descriptive information of target media resources, a hierarchical classification process is performed, including initial category label matching and candidate category label determination. Combining multimodal understanding models and text encoding models, a generative language model is used to predict multi-level category labels, and the model is adjusted step by step to improve classification accuracy and flexibility.
It improves the hit rate of fine-grained labels, ensures consistency of category hierarchy, reduces model training costs, improves the efficiency and accuracy of classification processing, and enhances the scalability and flexibility of the model.
Smart Images

Figure CN122490151A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to a method, apparatus, device, medium, and program product for classifying and processing media resources. Background Technology
[0002] In content understanding, production, and distribution scenarios for media resources such as short videos, platforms typically need to assign corresponding category tags to each media resource, such as subject matter, style, and personal activities, for tasks like recommendation, retrieval, and content security. However, in combining artificial intelligence with resource classification, issues such as high model training costs, poor flexibility, and low accuracy of fine-grained tags often arise. Summary of the Invention
[0003] This disclosure provides a method, apparatus, device, medium, and program product for classifying and processing media resources, aiming to at least solve the technical problems in related technologies such as high model training costs, poor flexibility, and low accuracy of fine-grained labels. The technical solution of this disclosure is as follows: According to a first aspect of the present disclosure, a media resource classification processing method is provided, comprising: Obtain the target resource description information corresponding to the target media resource; Based on the target resource description information, the target media resources are classified to obtain the initial category labels corresponding to the target media resources; Based on the target resource description information, candidate category tags corresponding to the target media resource are matched from the first sub-category category tag set corresponding to the initial category tag. The first sub-category category tag set is the category tag set of the next category level of the category level to which the initial category tag belongs. The candidate category label, the initial category label, and the target resource description information are input into the first classification processing model for classification processing to obtain the target multi-level category label corresponding to the target media resource.
[0004] In an optional embodiment, the target multi-level category label includes at least two levels of category labels. When the at least two levels of category labels are two-level category labels, the initial category label is a first category label. The process of classifying the target media resource based on the target resource description information to obtain the initial category label corresponding to the target media resource includes: The target resource description information is input into the second classification processing model for classification processing to obtain the first category label corresponding to the target media resource.
[0005] In an optional embodiment, when the at least two-level category labels are at least three-level category labels, the initial category label is a second category label; the step of classifying the target media resource based on the target resource description information to obtain the initial category label corresponding to the target media resource further includes: The target resource description information, the first category label, and the second sub-category label set corresponding to the first category label are input into the third classification processing model for classification processing to obtain the second category label; The second sub-category label set includes category labels corresponding to at least one category level under the category level to which the first category label belongs, and the second category label is the category label of the lowest category level in the at least one category level corresponding to the second sub-category label set.
[0006] In an optional embodiment, matching candidate category tags corresponding to the target media resource from the first sub-category category tag set corresponding to the initial category tag based on the target resource description information includes: The target resource description information is input into the resource feature extraction model for resource extraction processing to obtain the first resource feature corresponding to the target media resource. Based on the first resource feature, the candidate category label corresponding to the target media resource is determined from the first sub-category label set.
[0007] In an optional embodiment, the target resource description information is multimodal description information; the resource feature extraction model includes a multimodal understanding model and a text encoding model; the step of inputting the target resource description information into the resource feature extraction model for resource extraction processing to obtain the first resource feature corresponding to the target media resource includes: The multimodal description information is input into the multimodal understanding model for resource understanding to obtain the resource description text corresponding to the target media resource; The resource description text is input into the text encoding model for text encoding processing to obtain the first resource feature.
[0008] In an optional embodiment, the target multi-level category label includes at least two levels of category labels, and the first classification processing model is a generative language model; the step of inputting the candidate category label, the initial category label, and the target resource description information into the first classification processing model for classification processing to obtain the target multi-level category label corresponding to the target media resource includes: The candidate category label, the initial category label, and the target resource description information are input into the first classification processing model. During the classification processing, a third category label is determined from the candidate category labels based on the initial category label and the target resource description information. The third category label is the category label of the lowest category level among the at least two levels of category labels. The third category label and the corresponding upper-level category label are used as the target multi-level category label.
[0009] In an optional embodiment, the method further includes: Obtain the sample resource description information corresponding to each of the multiple first sample media resources in the current training round and the preset multi-level category label corresponding to each first sample media resource from the first preset training data; Based on the sample resource description information corresponding to each first sample media resource, each first sample media resource is classified to obtain the initial sample category label corresponding to each first sample media resource. Based on the sample resource description information corresponding to each first sample media resource, the candidate sample category label corresponding to each first sample media resource is matched from the corresponding third sub-level category label set. The third sub-level category label set is the category label set of the next category level of the category level to which the corresponding initial category label belongs. The candidate sample category label, the initial sample category label, and the sample resource description information are input into the first classification model to be trained for classification processing to obtain the multi-level category label of each of the multiple first sample media resources; Based on the preset multi-level category labels and the sample multi-level category labels, the first classification model to be trained is iteratively trained to obtain the first classification processing model.
[0010] In an optional embodiment, the multi-level sample category label includes at least two levels of sample category labels. When the at least two levels of sample category labels are two-level sample category labels, the initial sample category label is a first sample category label. The process of classifying each first sample media resource based on the sample resource description information corresponding to each first sample media resource to obtain the initial sample category label corresponding to each first sample media resource includes: The sample resource description information corresponding to each first sample media resource is input into the second classification processing model for classification processing to obtain the first sample category label corresponding to each first sample media resource.
[0011] In an optional embodiment, when the at least two levels of sample category labels are at least three levels of sample category labels, the initial sample category label is the second sample category label; the step of classifying each first sample media resource based on the sample resource description information corresponding to each first sample media resource to obtain the initial sample category label corresponding to each first sample media resource further includes: The sample resource description information corresponding to each first sample media resource, the first sample category label corresponding to each first sample media resource, and the fourth sub-category label set corresponding to the first sample category label are input into the third classification processing model for classification processing to obtain the second sample category label corresponding to each first sample media resource. The fourth sub-level category label set includes category labels corresponding to at least one category level under the category level to which the first sample category label belongs, and the second sample category label is the category label of the lowest category level in the at least one category level corresponding to the fourth sub-level category label set.
[0012] According to a second aspect of the present disclosure, a media resource classification and processing apparatus is provided, comprising: The description information acquisition module is configured to acquire the target resource description information corresponding to the target media resource; The first classification processing module is configured to perform classification processing on the target media resource based on the target resource description information to obtain the initial category label corresponding to the target media resource. The first tag matching module is configured to perform matching of candidate category tags corresponding to the target media resource from the first sub-category category tag set corresponding to the initial category tag based on the target resource description information. The first sub-category category tag set is the category tag set of the next category level of the category level to which the initial category tag belongs. The second classification processing module is configured to perform classification processing by inputting the candidate category label, the initial category label and the target resource description information into the first classification processing model to obtain the target multi-level category label corresponding to the target media resource.
[0013] In an optional embodiment, the target multi-level category label includes at least two levels of category labels. When the at least two levels of category labels are two-level category labels, the initial category label is a first category label. The first classification processing module includes: The first classification processing unit is configured to input the target resource description information into the second classification processing model for classification processing to obtain the first category label corresponding to the target media resource.
[0014] In an optional embodiment, when the at least two-level category labels are at least three-level category labels, the initial category label is a second category label; the first classification processing module further includes: The second classification processing unit is configured to perform classification processing by inputting the target resource description information, the first category label, and the second sub-category label set corresponding to the first category label into the third classification processing model to obtain the second category label. The second sub-category label set includes category labels corresponding to at least one category level under the category level to which the first category label belongs, and the second category label is the category label of the lowest category level in the at least one category level corresponding to the second sub-category label set.
[0015] In an optional embodiment, the first tag matching module includes: The resource extraction and processing unit is configured to perform resource extraction processing by inputting the target resource description information into a resource feature extraction model to obtain the first resource feature corresponding to the target media resource. The candidate tag determination unit is configured to perform the task of determining the candidate category tag corresponding to the target media resource from the first sub-category tag set based on the first resource feature.
[0016] In an optional embodiment, the target resource description information is multimodal description information; the resource feature extraction model includes a multimodal understanding model and a text encoding model; the resource extraction processing unit includes: The resource understanding unit is configured to perform resource understanding by inputting the multimodal description information into the multimodal understanding model, and obtain the resource description text corresponding to the target media resource; The text encoding processing unit is configured to perform text encoding processing by inputting the resource description text into the text encoding model to obtain the first resource feature.
[0017] In an optional embodiment, the target multi-level category label includes at least two levels of category labels, the first classification processing model is a generative language model; the second classification processing module includes: The third classification processing unit is configured to input the candidate category label, the initial category label and the target resource description information into the first classification processing model, and during the classification processing, determine a third category label from the candidate category labels based on the initial category label and the target resource description information, wherein the third category label is the category label of the lowest category level among the at least two levels of category labels; The category label determination unit is configured to use the third category label and the corresponding upper-level category label as the target multi-level category label.
[0018] In an optional embodiment, the apparatus further includes: The training data acquisition module is configured to retrieve, from the first preset training data, the sample resource description information corresponding to each of the multiple first sample media resources in the current training round and the preset multi-level category label corresponding to each first sample media resource; The third classification processing module is configured to perform classification processing on each first sample media resource based on the sample resource description information corresponding to each first sample media resource, so as to obtain the initial sample category label corresponding to each first sample media resource. The second tag matching module is configured to perform a matching of candidate sample category tags corresponding to each first sample media resource from the corresponding third sub-category category tag set based on the sample resource description information corresponding to each first sample media resource. The third sub-category category tag set is the category tag set of the next category level of the category level to which the corresponding initial category tag belongs. The fourth classification processing module is configured to input the candidate sample category label, the initial sample category label, and the sample resource description information into the first classification model to be trained for classification processing, so as to obtain the multi-level category labels of the sample corresponding to each of the multiple first sample media resources; The model training module is configured to perform iterative training on the first classification model to be trained based on the preset multi-level category labels and the sample multi-level category labels to obtain the first classification processing model.
[0019] In an optional embodiment, the multi-level sample category label includes at least two levels of sample category labels. When the at least two levels of sample category labels are two-level sample category labels, the initial sample category label is the first sample category label. The third classification processing module includes: The fourth classification processing unit is configured to input the sample resource description information corresponding to each first sample media resource into the second classification processing model for classification processing to obtain the first sample category label corresponding to each first sample media resource.
[0020] In an optional embodiment, when the at least two levels of sample category labels are at least three levels of sample category labels, the initial sample category label is the second sample category label; the third classification processing module further includes: The fifth classification processing unit is configured to perform classification processing by inputting the sample resource description information corresponding to each first sample media resource, the first sample category label corresponding to each first sample media resource, and the fourth sub-category label set corresponding to the first sample category label into the third classification processing model to obtain the second sample category label corresponding to each first sample media resource. The fourth sub-level category label set includes category labels corresponding to at least one category level under the category level to which the first sample category label belongs, and the second sample category label is the category label of the lowest category level in the at least one category level corresponding to the fourth sub-level category label set.
[0021] According to a third aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement any media resource classification processing method provided in this disclosure.
[0022] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform any media resource classification processing method provided in the present disclosure.
[0023] According to a fifth aspect of the present disclosure, a computer program product comprising computer program instructions is provided, which, when executed by a processor on a computer, cause the computer to perform any of the media resource classification processing methods provided in the present disclosure as described above.
[0024] The technical solutions provided by the embodiments of this disclosure have at least the following beneficial effects: In the media resource classification process, target resource description information corresponding to the target media resource is obtained. First, the target media resource is classified based on the target resource description information to obtain initial category labels. Then, based on the target resource description information, candidate category labels corresponding to the target media resource are matched from the first-level category label set corresponding to the initial category labels. The candidate category labels, initial category labels, and target resource description information are then input into the first classification model for classification processing to obtain target multi-level category labels corresponding to the target media resource. This enables a hierarchical classification processing architecture. By predicting the category labels of media resources level by level, the search space for fine-grained labels can be reduced, the hit rate of fine-grained labels can be improved, and thus the accuracy of category labels can be enhanced. Furthermore, during the classification process, the candidate category labels, initial category labels, and target resource description information are... By inputting all data into the model for classification, the consistency between the output low-level and high-level category labels can be ensured, effectively guaranteeing category hierarchy consistency in multi-level classification scenarios. Furthermore, in the low-level category label determination stage, candidate category labels corresponding to the target media resources are matched from the first-level category label set corresponding to the initial category label using the target resource description information. These candidate category labels can supplement labels that the model might miss, improving classification accuracy. Simultaneously, in the classification recognition stage, only a small number of candidate category labels need to be identified, achieving a balance between resource category label prediction efficiency and accuracy. Moreover, the phased classification processing and label selection constraints mean that when category label adjustments are needed, only the corresponding stage of the model needs to be adjusted and updated, effectively reducing model training costs and greatly improving the flexibility and scalability of classification processing.
[0025] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0026] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.
[0027] Figure 1 This is a schematic diagram illustrating an application environment according to an exemplary embodiment; Figure 2 This is a flowchart illustrating a media resource classification and processing method according to an exemplary embodiment; Figure 3 This is a flowchart illustrating another media resource classification and processing method according to an exemplary embodiment; Figure 4 This is a flowchart illustrating a method for training a first classification processing model according to an exemplary embodiment; Figure 5 This is a schematic diagram illustrating a media resource classification process according to an exemplary embodiment; Figure 6 This is a block diagram of a media resource classification and processing apparatus according to an exemplary embodiment; Figure 7 This is a block diagram illustrating an electronic device for media resource classification processing according to an exemplary embodiment; Figure 8 This is a block diagram illustrating another electronic device for media resource classification processing according to an exemplary embodiment. Detailed Implementation
[0028] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0029] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar concepts and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0030] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0031] Please see Figure 1 , Figure 1 This is a schematic diagram illustrating an application environment according to an exemplary embodiment, which may include a terminal 100 and a server 200.
[0032] In an optional embodiment, terminal 100 can be used to provide recommendation services based on category tags corresponding to media resources, such as media resource recommendations in personalized recommendation scenarios, media resource search recommendations in search scenarios, and category tag recommendations in media resource publishing scenarios. Specifically, terminal 100 can be, but is not limited to, electronic devices such as smartphones, desktop computers, tablets, laptops, smart speakers, digital assistants, augmented reality (AR) / virtual reality (VR) devices, and smart wearable devices, or software running on the aforementioned electronic devices, such as applications. Optionally, the operating system running on the electronic device can be, but is not limited to, Android, iOS, Linux, and Windows.
[0033] In an optional embodiment, server 200 can pre-train a classification processing model for classification processing, determine the category labels corresponding to media resources based on the classification processing model, and provide backend support for terminal 100 to provide services such as category label recommendation and media resource recommendation based on the category labels. Specifically, server 200 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0034] In addition, it should be noted that, Figure 1 The example shown is merely one application environment provided by this disclosure. In practical applications, other application environments may also be included, such as more terminals.
[0035] In the embodiments described in this specification, the terminal 100 and the server 200 can be directly or indirectly connected through wired or wireless communication, and this disclosure does not impose any restrictions.
[0036] Figure 2 This is a flowchart illustrating a media resource classification and processing method according to an exemplary embodiment. This method can be applied to a terminal or server, such as... Figure 2 As shown, the method may include the following steps: S201: Obtain the target resource description information corresponding to the target media resource; In one specific embodiment, the target media resource can be any media resource that needs to be classified; optionally, the media resource can include dynamic media resources such as video, or at least any static media resource such as image sets, images, text and graphics, or documents.
[0037] In one specific embodiment, the target resource description information can be information describing the target media resource; for example, taking a video as the target media resource, the target resource description information can include at least one of the following: the video itself, the video's descriptive text, the video's audio, and the video's images. For example, taking an image set as the target media resource, the target resource description information can include at least one image in the image set, the image set's descriptive text, the image set's descriptive audio, and at least one of the following:
[0038] S203: Classify the target media resources based on the target resource description information to obtain the initial category labels corresponding to the target media resources.
[0039] In this embodiment, the category tags of media resources can include multi-level category tags (at least two levels). That is, the category level corresponding to the category tag of a media resource can be at least two levels. In the multi-level tag system of media resources, the different category level tags present a hierarchical relationship from top to bottom (from high to low) and a semantic relationship from generalization to refinement. Category tags can be information used to characterize the content theme, scene, or style of the media resource; specifically, they can be set according to actual application needs. For example, for food-related media resources, the multi-level category tags from high to low can be set as follows: first-level category tag is lifestyle, second-level category tag is food, third-level category tag is home-style cooking, and fourth-level category tag is single-person meals; for sports and fitness-related media resources, the multi-level category tags from high to low can be set as follows: first-level category tag is sports, second-level category tag is fitness, third-level category tag is strength training, and fourth-level category tag is beginner-friendly. In addition, a single primary category tag can contain multiple secondary category tags, a single secondary category tag can contain multiple tertiary category tags, and a single tertiary category tag can contain multiple quaternary category tags. For example, the primary category tag is "Lifestyle," the secondary category tag is "Food," the tertiary category tag is "Baked Desserts," and the quaternary category tag is "Low-Sugar Cakes," etc.
[0040] In one specific embodiment, the initial category label can be the category label of the second lowest category level in at least two category levels, that is, the category label of the category level above the lowest category level. For example, in the example of the four category levels of category labels corresponding to the food-related media resources, the initial category label can be the third-level category label "home-style dishes". Optionally, the initial category label can include at least one category label. Optionally, when at least two category labels are two-level category labels, the initial category label can be the first category label, such as... Figure 3 As shown, the above classification of target media resources based on target resource description information, resulting in initial category labels for the target media resources, may include: S2031: Input the target resource description information into the second classification processing model for classification processing to obtain the first category label corresponding to the target media resource.
[0041] In one specific embodiment, the first category label can be the category label of the highest category level. When the initial category label is the first category label, the first category label is also the category label of the second lowest category level among at least two category levels.
[0042] In a specific embodiment, the aforementioned second classification processing model can be an artificial intelligence model for classifying media resources. Specifically, the second classification processing model can be used to classify media resources in the category label set at the highest category level. Specifically, the second classification processing model can be obtained by training the second classification model to be trained based on the second preset training data. Specifically, the second preset training data can include multiple sample media resources and the category label at the highest category level corresponding to each sample media resource.
[0043] In a specific embodiment, the specific model structure of the second classification processing model (the second classification model to be trained) can be set according to the actual application requirements. For example, it can be a generative language model or a discriminative deep learning model. Specifically, the generative language model can be a causal language model or a non-causal language model; it can be set according to the actual application requirements.
[0044] In an optional embodiment, when at least two levels of category labels are at least three levels of category labels, the initial category label is the second category label; the above-mentioned classification processing of the target media resource based on the target resource description information to obtain the initial category label corresponding to the target media resource may further include: S2033: Input the target resource description information, the first category label, and the second sub-category label set corresponding to the first category label into the third classification processing model for classification processing to obtain the second category label; In one specific embodiment, the third classification processing model can be an artificial intelligence model for classifying media resources. Specifically, the third classification processing model can be used to classify media resources in a set of category labels at the second-lowest category level. Specifically, the third classification processing model can be obtained by training a third classification model to be trained based on a third preset training data; specifically, the third preset training data can include multiple sample media resources and the category labels at the second-lowest category level corresponding to each sample media resource.
[0045] In a specific embodiment, the specific model structure of the third classification processing model (the third classification model to be trained) can be set according to the actual application requirements, for example, a generative language model; specifically, the generative language model can be a causal language model or a non-causal language model; it can be set according to the actual application requirements.
[0046] In one specific embodiment, the second sub-level category label set may include category labels corresponding to at least one category level under the category level to which the first category label belongs, that is, the category labels of each category level between the category level to which the first category label belongs and the lowest category level among at least three level category labels, and the second category label is the category label of the lowest category level among at least one category level corresponding to the second sub-level category label set, that is, the category label of the second lowest category level among at least three level category labels.
[0047] In the above embodiments, when the media resource category labels are two-level category labels, the target resource description information is input into the second classification processing model for classification processing to obtain the first category label corresponding to the target media resource. This can be combined with the model's generalization ability to quickly locate the media resource to the top-level domain, filter out irrelevant category labels, and ensure the accuracy of subsequent classification processing. Furthermore, when the media resource category labels are at least three-level category labels, after determining the highest-level category label, the first category label of the highest level, the target resource description information, and the second sub-level category label set corresponding to the first category label are input together into the third classification processing model for classification processing. This can further converge the semantic space, avoid the model blindly searching among millions of labels, and better improve the classification accuracy.
[0048] S205: Based on the target resource description information, match the candidate category labels corresponding to the target media resources from the first sub-category category label set corresponding to the initial category label.
[0049] In one specific embodiment, the aforementioned first sub-level category label set can be a set of category labels (multiple category labels) of the next category level after the category level to which the initial category label belongs, or it can be a set of category labels of the lowest category level among at least two category levels. Candidate category labels may include at least one category label from the lowest category level.
[0050] In an optional embodiment, such as Figure 3 As shown, the process of matching candidate category tags corresponding to the target media resource from the first sub-category category tag set corresponding to the initial category tag, based on the target resource description information, can include: S2051: Input the target resource description information into the resource feature extraction model for resource extraction processing to obtain the first resource feature corresponding to the target media resource; S2053: Based on the first resource characteristics, determine the candidate category labels corresponding to the target media resource from the first sub-category label set.
[0051] In an optional embodiment, the resource feature extraction model can be a model for performing feature extraction; specifically, the resource feature extraction model can be obtained by training the feature extraction model to be trained based on a fourth preset training data; specifically, the fourth preset training data can include multiple sample media resources and preset resource features corresponding to each sample media resource.
[0052] In a specific embodiment, the specific model structure of the resource feature extraction model (the feature extraction model to be trained) can be set according to the actual application requirements. For example, a deep learning model based on convolutional neural networks.
[0053] In an optional embodiment, the target resource description information can be multimodal description information; the resource feature extraction model includes a multimodal understanding model and a text encoding model; correspondingly, inputting the target resource description information into the resource feature extraction model for resource extraction processing to obtain the first resource feature corresponding to the target media resource can include: Multimodal description information is input into a multimodal understanding model to understand resources and obtain resource description text corresponding to the target media resource; The resource description text is input into the text encoding model for text encoding processing to obtain the first resource feature.
[0054] In one specific embodiment, the multimodal understanding model can be used to understand multimodal description information as corresponding descriptive text; the specific model structure can be set according to actual application requirements, such as generative language models; specifically, the generative language model can be a causal language model or a non-causal language model; the specific settings can be based on actual application requirements.
[0055] In a specific embodiment, a text encoding model can be used for text encoding processing; the specific model structure can be set according to the actual application requirements, such as a text encoding model with an encoder structure like BERT (Bidirectional Encoder Representations from Transformers), or a text encoding model based on a recurrent network like LSTM (Long Short-Term Memory).
[0056] In the above embodiments, the multimodal understanding model is used to understand the target media resources in detail based on the target resource description information of the target media resources, generate rich descriptive text, and then extract the corresponding resource features based on the descriptive text. This can obtain more robust, interpretable and generalizable high-level semantic features in a unified semantic space, while reducing feature calculation and storage overhead and improving system performance in the classification process.
[0057] In a specific embodiment, determining candidate category labels corresponding to the target media resource from the first sub-level category label set based on the first resource feature may include determining the similarity between the first resource feature and the label features corresponding to each category label in the first sub-level category label set; and determining candidate category labels corresponding to the target media resource from the first sub-level category label set based on the similarity. Optionally, category labels with a similarity greater than or equal to a first preset threshold in the first sub-level category label set may be used as candidate category labels corresponding to the target media resource; or, category labels with similarity sorted in descending order and ranking first preset number of positions in the first sub-level category label set may be used as candidate category labels corresponding to the target media resource.
[0058] In the above embodiments, after determining the initial resource tags of the higher level of the media resources, the target resource description information is input into the resource feature extraction model for resource extraction processing to obtain the first resource feature corresponding to the target media resource. Then, based on the first resource feature, the candidate category tags corresponding to the target media resource are determined from the first sub-level category tag set. This not only reduces the number of tags to be selected in the subsequent classification process and significantly reduces the computational cost, but also improves the classification processing efficiency through the high efficiency of text feature retrieval.
[0059] S207: Input the candidate category label, the initial category label, and the target resource description information into the first classification processing model for classification processing to obtain the target multi-level category label corresponding to the target media resource.
[0060] In one specific embodiment, the first classification processing model can be an artificial intelligence model used to classify media resources. Specifically, the first classification processing model can be used to classify media resources in the category label set at the lowest category level. The specific model structure can be set according to actual application requirements, for example, a generative language model; specifically, the generative language model can be a causal language model or a non-causal language model; it can be set according to actual application requirements.
[0061] In an optional embodiment, the aforementioned target multi-level category label includes at least two levels of category labels. The process of inputting candidate category labels, initial category labels, and target resource description information into a first classification processing model for classification processing to obtain the target multi-level category label corresponding to the target media resource may include: The candidate category label, the initial category label, and the target resource description information are input into the first classification processing model. During the classification process, based on the initial category label and the target resource description information, the third category label is determined from the candidate category labels. The third category label is the category label of the lowest category level among at least two categories. Use the third category label and the corresponding upper-level category label as the target multi-level category label.
[0062] In a specific embodiment, during the classification process, a generative language model constrained by candidate resource labels can be used to generate resource labels in a targeted manner. At the same time, the characteristics of media resources can be effectively captured by combining the initial category labels and target resource description information, thereby ensuring the accuracy of resource classification results.
[0063] In one specific embodiment, the upper category label corresponding to the third category label may include all category labels that are above the current category label and have a hierarchical relationship with it, including the upper category label adjacent to the current category label, and all other category labels at each level above it, up to the topmost category label.
[0064] In the above embodiments, during the classification process, resource tags can be generated in a targeted manner by combining candidate resource tag constraints with generative language models. At the same time, the characteristics of media resources can be effectively captured by combining initial category tags and target resource description information, thereby ensuring the accuracy of resource classification results. After determining the third category tag from the candidate resource tags corresponding to the lowest category level among at least two category tags, the third category tag and the upper category tag corresponding to the third category tag are used as the target multi-level category tags of the target media resource, which can realize multi-level classification and recognition of resources.
[0065] In an optional embodiment, the above method may further include the step of training a first classification processing model, specifically, as follows: Figure 4 As shown, the following steps may be included: S401: Obtain from the first preset training data the sample resource description information corresponding to each of the multiple first sample media resources in the current training round and the preset multi-level category label corresponding to each first sample media resource; S403: Classify each first sample media resource based on the sample resource description information corresponding to each first sample media resource to obtain the initial sample category label corresponding to each first sample media resource; S405: Based on the sample resource description information corresponding to each first sample media resource, match the candidate sample category label corresponding to each first sample media resource from the corresponding third sub-level category label set. The third sub-level category label set is the category label set of the next category level of the category level to which the corresponding initial category label belongs. S407: Input the candidate sample category label, the initial sample category label, and the sample resource description information into the first classification model to be trained for classification processing to obtain the multi-level category labels of each of the multiple first sample media resources; S409: Based on the preset multi-level category labels and sample multi-level category labels, iteratively train the first classification model to be trained to obtain the first classification processing model.
[0066] In one specific embodiment, the first preset training data may include multiple sample media resources and preset multi-level category labels corresponding to each sample media resource. Specifically, the current training round can be any training round in the iterative training process of the first classification model to be trained. Specifically, the first sample media resource can be the sample media resource corresponding to the current training round.
[0067] In an optional embodiment, multiple first sample media resources for the current training round and preset multi-level category labels corresponding to each first sample media resource can be randomly obtained from the first preset training data; alternatively, multiple first sample media resources for the current training round and preset multi-level category labels corresponding to each first sample media resource can be obtained from the first preset training data according to preset rules, such as the rule of obtaining them sequentially without repetition.
[0068] In an optional embodiment, the above-mentioned multi-level sample category label includes at least two levels of sample category labels. When the at least two levels of sample category labels are two-level sample category labels, the initial sample category label is the first sample category label. The above-mentioned classification processing of each first sample media resource based on the sample resource description information corresponding to each first sample media resource to obtain the initial sample category label corresponding to each first sample media resource may include: The sample resource description information corresponding to each first sample media resource is input into the second classification processing model for classification processing to obtain the first sample category label corresponding to each first sample media resource.
[0069] In an optional embodiment, when at least two levels of sample category labels are at least three levels of sample category labels, the initial sample category label is the second sample category label; classifying each first sample media resource based on the sample resource description information corresponding to each first sample media resource to obtain the initial sample category label corresponding to each first sample media resource may further include: The sample resource description information corresponding to each first sample media resource, the first sample category label corresponding to each first sample media resource, and the fourth sub-category label set corresponding to the first sample category label are input into the third classification processing model for classification processing to obtain the second sample category label corresponding to each first sample media resource. In a specific embodiment, the specific details of the steps related to classifying each first sample media resource based on the sample resource description information corresponding to each first sample media resource to obtain the initial sample category label corresponding to each first sample media resource can be found in the above-described specific details of the steps related to classifying target media resources based on target resource description information to obtain the initial category label corresponding to the target media resource, which will not be repeated here.
[0070] In one specific embodiment, the fourth sub-level category label set includes category labels corresponding to at least one category level under the category level to which the first sample category label belongs, and the second sample category label is the category label of the lowest category level in the at least one category level corresponding to the fourth sub-level category label set.
[0071] In the above embodiments, during model training, if the category label of the media resource is a two-level category label, the sample resource description information is input into the second classification processing model for classification processing to obtain the first sample category label corresponding to the sample media resource. This can be combined with the model's generalization ability to quickly locate the media resource to the top-level domain, filter out irrelevant category labels, and ensure the accuracy of subsequent classification processing. If the category label of the media resource is at least a three-level category label, after determining the highest-level category label, the first sample category label of the highest level, the sample resource description information, and the fourth sub-level category label set corresponding to the first sample category label are input together into the third classification processing model for classification processing. This can further converge the semantic space, avoid the model blindly searching in millions of labels, and better improve the classification accuracy and model training efficiency.
[0072] In a specific embodiment, based on the sample resource description information corresponding to each first sample media resource, the detailed matching of candidate sample category labels corresponding to each first sample media resource from the corresponding third-level category label set can be referred to the above detailed matching of candidate category labels corresponding to the target media resource from the first-level category label set corresponding to the initial category label based on the target resource description information, which will not be repeated here.
[0073] In a specific embodiment, the candidate sample category label, the initial sample category label, and the sample resource description information are input into the first classification model to be trained for classification processing to obtain the detailed multi-level category labels of the sample corresponding to each of the multiple first sample media resources. This can be referred to the above-mentioned detailed multi-level category label of the target media resource corresponding to the first classification processing model for classification processing, which will not be repeated here.
[0074] In a specific embodiment, the above-mentioned iterative training of the first classification model to be trained based on preset multi-level category labels and sample multi-level category labels to obtain the first classification processing model may include: determining the resource classification loss according to the preset multi-level category labels and sample multi-level category labels; updating the model parameters of the first classification model to be trained based on the resource classification loss; and repeating the above steps of obtaining the sample resource description information and the preset multi-level category label corresponding to each of the multiple first sample media resources in the current training round from the first preset training data (i.e., re-obtaining the training data corresponding to the new training round) to updating the model parameters of the first classification model to be trained based on the resource classification loss, until the preset convergence condition is met, and taking the first classification model to be trained corresponding to the preset convergence condition as the first classification processing model.
[0075] In a specific embodiment, the resource classification loss can characterize the resource classification performance (accuracy of determining category labels) of the first classification model to be trained; optionally, the smaller the resource classification loss, the better the resource classification performance of the first classification model to be trained; in the process of determining the resource classification loss based on the preset multi-level category labels and the sample multi-level category labels, a preset loss function can be combined; specifically, the preset loss function can be set according to the actual application requirements, such as standard autoregressive cross-entropy loss, mean squared error loss function, or time-weighted cross-entropy loss function, etc.
[0076] In a specific embodiment, during the process of determining the resource classification loss based on the preset multi-level category labels and the sample multi-level category labels, the gradient descent method can be combined to adjust the model parameters of the first classification model to be trained.
[0077] In a specific embodiment, the preset convergence condition can be set according to the actual application requirements. For example, the number of times the iterative training step is executed reaches a preset number; the resource classification loss is less than a second preset threshold, etc.
[0078] In the above embodiments, during model training, the sample media resources are first classified based on the sample resource description information to obtain initial sample category labels. Then, based on the sample resource description information, corresponding candidate sample category labels are matched from the fourth sub-level category label set corresponding to the initial sample category labels. The candidate sample category labels, initial sample category labels, and sample resource description information are input into the first classification processing model for classification processing to obtain multi-level sample category labels. This can realize a hierarchical classification processing architecture. By predicting the category labels of media resources level by level, the search space of fine-grained labels can be reduced, the hit rate of fine-grained labels can be improved, and thus the accuracy of category labels can be improved. Furthermore, during the classification process, the candidate sample category labels, initial sample category labels, and sample resource description information are input into the model together. By performing classification processing, the consistency between the output low-level category labels and high-level category labels can be ensured, effectively guaranteeing category hierarchy consistency in multi-level classification scenarios. Furthermore, in the low-level category label determination stage, candidate sample category labels are first matched from the fourth-level category label set corresponding to the initial sample category labels using sample resource description information. This allows the use of candidate sample category labels to supplement labels that the model might miss, improving the model's classification accuracy. Simultaneously, in the classification recognition stage, only a small number of candidate category labels need to be identified, achieving a balance between resource category label prediction efficiency and accuracy. Moreover, the phased classification processing and label selection constraints mean that when category label adjustments are needed, only the corresponding stage of the model needs to be adjusted and updated, improving the flexibility and scalability of the classification processing.
[0079] In one specific embodiment, the above method may further include: Recommendation processing is based on target multi-level category labels.
[0080] In one specific embodiment, the recommendation process based on the target multi-level category label may include at least any of the following: Recommendation processing of target media resources based on target multi-level category tags; or, If the target media resource is a media resource to be published, recommend target multi-level category tags to the current account.
[0081] In a specific embodiment, in a search scenario, the above-mentioned recommendation process for target media resources based on target multi-level category tags may include: recommending target media resources based on a first matching degree between search keywords and target multi-level category tags. In a personalized recommendation scenario, the above-mentioned recommendation process for target media resources based on target multi-level category tags may include recommending target media resources based on a second matching degree between the current account's account attribute information and target multi-level category tags.
[0082] In one specific embodiment, the search keyword can be a keyword entered by the current account; specifically, the first matching degree can characterize the degree of matching between the search keyword and the target multi-level category tag; optionally, the keyword features of the search keyword and the tag features of the target multi-level category tag can be extracted respectively; and the distance between the keyword features and the tag features is used as the aforementioned first matching degree. Optionally, if the first matching degree is greater than or equal to a third preset threshold, a search recommendation for the target media resource can be performed, that is, the search results may include the target media resource.
[0083] In one specific embodiment, the account attribute information can be information representing the current account's preferences; specifically, the second matching degree can represent the degree of matching between the account attribute information and the target multi-level category tags; optionally, the account features of the account attribute information and the tag features of the target multi-level category tags can be extracted respectively; and the distance between the account features and the tag features is used as the aforementioned second matching degree. Optionally, if the second matching degree is greater than or equal to a fourth preset threshold, target media resources can be recommended.
[0084] In this embodiment of the application, the distance between features may include any of the following: Euclidean distance, cosine distance, etc.
[0085] Furthermore, it should be noted that the above-mentioned recommendation processing based on target multi-level category tags is merely a further application example of multi-level category tags. In practical applications, there are also applications such as combining multi-level category tags for content moderation.
[0086] In a specific embodiment, taking a multi-level category label corresponding to media resources as an example, which can be a four-level category label, such as... Figure 5 As shown, Figure 5This is a schematic diagram illustrating a media resource classification process according to an exemplary embodiment. Specifically, the target resource description information corresponding to the target media resource can be input into a second classification processing model for classification processing in the category labels corresponding to the first-level category, resulting in a first category label. Next, the target resource description information, the first category label, and the second sub-level category label set corresponding to the first category label (category labels corresponding to the second-level and third-level categories) are input into a third classification processing model for classification processing, resulting in a second category label (initial category label, category label corresponding to the third-level category). Then, in the process of identifying the category label corresponding to the fourth-level category, the target resource description information (multimodal description information) is first input into a multimodal understanding model for resource understanding, resulting in the resource description text corresponding to the target media resource; the resource description text is then input into a text encoding model for text encoding processing, resulting in a first resource feature. Next, based on the first resource feature, candidate category labels corresponding to the target media resource are determined from the first sub-level category label set (category label set corresponding to the fourth-level category). Finally, the candidate category labels, the initial category labels, and the target resource description information are input into the first classification processing model for classification processing, resulting in the target multi-level category label corresponding to the target media resource.
[0087] As can be seen from the technical solutions provided in the embodiments of this specification above, in the media resource classification process, the target resource description information corresponding to the target media resource is obtained. First, the target media resource is classified based on the target resource description information to obtain the initial category label corresponding to the target media resource. Then, based on the target resource description information, candidate category labels corresponding to the target media resource are matched from the first sub-level category label set corresponding to the initial category label. The candidate category labels, initial category labels, and target resource description information are then input into the first classification processing model for classification processing to obtain the target multi-level category label corresponding to the target media resource. This can realize a hierarchical classification processing architecture. By predicting the category label of the media resource level by level, the search space of fine-grained labels can be reduced, the hit rate of fine-grained labels can be improved, and thus the accuracy of category labels can be enhanced. Furthermore, in the classification process, the candidate category labels are... By inputting the initial category label, the target resource description information, and the target category label together into the model for classification, the consistency between the output low-level category label and the high-level category label can be ensured, effectively guaranteeing the consistency of category hierarchy in multi-level classification scenarios. Furthermore, in the low-level category label determination stage, candidate category labels corresponding to the target media resource are matched from the first-level category label set corresponding to the initial category label using the target resource description information. These candidate category labels can supplement any labels that the model may have missed, improving the model's classification accuracy. Simultaneously, in the classification recognition stage, only a small number of candidate category labels need to be identified, achieving a balance between the efficiency and accuracy of resource category label prediction. Moreover, the phased classification processing and label selection constraints mean that when category label adjustments are needed, only the corresponding stage of the model needs to be adjusted and updated, improving the flexibility and scalability of the classification processing.
[0088] Figure 6 This is a block diagram illustrating a media resource classification and processing apparatus according to an exemplary embodiment. (Refer to...) Figure 6 The device includes: The description information acquisition module 610 is configured to acquire the target resource description information corresponding to the target media resource; The first classification processing module 620 is configured to perform classification processing on the target media resources based on the target resource description information to obtain the initial category label corresponding to the target media resources; The first tag matching module 630 is configured to perform matching of candidate category tags corresponding to the target media resource from the first sub-category category tag set corresponding to the initial category tag based on the target resource description information. The first sub-category category tag set is the category tag set of the next category level of the category level to which the initial category tag belongs. The second classification processing module 640 is configured to perform classification processing by inputting candidate category labels, initial category labels and target resource description information into the first classification processing model to obtain target multi-level category labels corresponding to the target media resources.
[0089] In an optional embodiment, the target multi-level category label includes at least two levels of category labels. When the at least two levels of category labels are two-level category labels, the initial category label is the first category label. The first classification processing module 620 includes: The first classification processing unit is configured to input the target resource description information into the second classification processing model for classification processing to obtain the first category label corresponding to the target media resource.
[0090] In an optional embodiment, when at least two-level category labels are at least three-level category labels, the initial category label is the second category label; the first classification processing module 620 further includes: The second classification processing unit is configured to input the target resource description information, the first category label, and the second sub-category label set corresponding to the first category label into the third classification processing model for classification processing to obtain the second category label. The second sub-category label set includes category labels corresponding to at least one category level under the category level to which the first category label belongs, and the second category label is the category label of the lowest category level in the at least one category level corresponding to the second sub-category label set.
[0091] In an optional embodiment, the first tag matching module 630 includes: The resource extraction and processing unit is configured to perform resource extraction processing by inputting the target resource description information into the resource feature extraction model to obtain the first resource feature corresponding to the target media resource. The candidate tag determination unit is configured to determine the candidate category tags corresponding to the target media resource from the first sub-category tag set based on the first resource features.
[0092] In an optional embodiment, the target resource description information is multimodal description information; the resource feature extraction model includes a multimodal understanding model and a text encoding model; the resource extraction processing unit includes: The resource understanding unit is configured to input multimodal description information into the multimodal understanding model to perform resource understanding and obtain the resource description text corresponding to the target media resource. The text encoding processing unit is configured to perform text encoding processing on the input resource description text into the text encoding model to obtain the first resource feature.
[0093] In an optional embodiment, the target multi-level category label includes at least two levels of category labels, the first classification processing model is a generative language model; the second classification processing module 640 includes: The third classification processing unit is configured to input candidate category labels, initial category labels and target resource description information into the first classification processing model. During the classification process, based on the initial category labels and target resource description information, the third category label is determined from the candidate category labels. The third category label is the category label of the lowest category level among at least two levels of category labels. The category label determination unit is configured to perform the action of taking the third category label and the corresponding upper-level category label as the target multi-level category label.
[0094] In an optional embodiment, the above-described apparatus further includes: The training data acquisition module is configured to retrieve, from the first preset training data, the sample resource description information corresponding to each of the multiple first sample media resources in the current training round and the preset multi-level category label corresponding to each first sample media resource; The third classification processing module is configured to perform classification processing on each first sample media resource based on the sample resource description information corresponding to each first sample media resource, and obtain the initial sample category label corresponding to each first sample media resource. The second tag matching module is configured to perform a matching of candidate sample category tags corresponding to each first sample media resource from the corresponding third sub-category category tag set based on the sample resource description information corresponding to each first sample media resource. The third sub-category category tag set is the category tag set of the next category level of the category level to which the corresponding initial category tag belongs. The fourth classification processing module is configured to input the candidate sample category label, the initial sample category label, and the sample resource description information into the first classification model to be trained for classification processing, so as to obtain the multi-level category labels of the sample media resources corresponding to each of the first sample media resources. The model training module is configured to perform iterative training on the first classification model to be trained based on preset multi-level category labels and sample multi-level category labels to obtain the first classification processing model.
[0095] In an optional embodiment, the multi-level sample category label includes at least two levels of sample category labels. When the at least two levels of sample category labels are two-level labeling, the initial sample category label is the first sample category label. The third classification processing module includes: The fourth classification processing unit is configured to input the sample resource description information corresponding to each first sample media resource into the second classification processing model for classification processing, and obtain the first sample category label corresponding to each first sample media resource.
[0096] In an optional embodiment, when at least two levels of sample category labels are at least three levels of sample category labels, the initial sample category label is the second sample category label; the third classification processing module further includes: The fifth classification processing unit is configured to perform classification processing by inputting the sample resource description information corresponding to each first sample media resource, the first sample category label corresponding to each first sample media resource, and the fourth sub-category label set corresponding to the first sample category label into the third classification processing model to obtain the second sample category label corresponding to each first sample media resource. The fourth sub-level category label set includes category labels corresponding to at least one category level under the category level to which the first sample category label belongs, and the second sample category label is the category label of the lowest category level in at least one category level corresponding to the fourth sub-level category label set.
[0097] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0098] Figure 7 This is a block diagram illustrating an electronic device for media resource classification processing according to an exemplary embodiment. The electronic device may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown, the electronic device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a media resource classification processing method. The display screen can be a liquid crystal display (LCD) or an e-ink display. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the device's casing, or an external keyboard, touchpad, or mouse.
[0099] Figure 8 This is a block diagram illustrating another electronic device for media resource classification processing according to an exemplary embodiment. The electronic device may be a server, and its internal structure diagram may be as follows: Figure 8As shown, the electronic device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a media resource classification processing method.
[0100] Those skilled in the art will understand that Figure 7 or Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present disclosure and does not constitute a limitation on the electronic device to which the present disclosure is applied. A specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0101] In an exemplary embodiment, an electronic device is also provided, including: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the media resource classification processing method as described in the embodiments of this disclosure.
[0102] In an exemplary embodiment, a computer-readable storage medium is also provided, wherein when the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the media resource classification processing method of the present disclosure embodiments.
[0103] In an exemplary embodiment, a computer program product comprising computer program instructions is also provided, which, when executed by a processor on a computer, cause the computer to perform the media resource classification processing method of the present disclosure embodiments.
[0104] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0105] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0106] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A method for classifying and processing media resources, characterized in that, include: Obtain the target resource description information corresponding to the target media resource; Based on the target resource description information, the target media resources are classified to obtain the initial category labels corresponding to the target media resources; Based on the target resource description information, candidate category tags corresponding to the target media resource are matched from the first sub-category category tag set corresponding to the initial category tag. The first sub-category category tag set is the category tag set of the next category level of the category level to which the initial category tag belongs. The candidate category label, the initial category label, and the target resource description information are input into the first classification processing model for classification processing to obtain the target multi-level category label corresponding to the target media resource.
2. The media resource classification and processing method according to claim 1, characterized in that, The target multi-level category label includes at least two levels of category labels. When the at least two levels of category labels are two-level category labels, the initial category label is the first category label. The process of classifying the target media resource based on the target resource description information to obtain the initial category label corresponding to the target media resource includes: The target resource description information is input into the second classification processing model for classification processing to obtain the first category label corresponding to the target media resource.
3. The media resource classification and processing method according to claim 2, characterized in that, When the at least two-level category labels are at least three-level category labels, the initial category label is the second category label; the step of classifying the target media resource based on the target resource description information to obtain the initial category label corresponding to the target media resource further includes: The target resource description information, the first category label, and the second sub-category label set corresponding to the first category label are input into the third classification processing model for classification processing to obtain the second category label; The second sub-category label set includes category labels corresponding to at least one category level under the category level to which the first category label belongs, and the second category label is the category label of the lowest category level in the at least one category level corresponding to the second sub-category label set.
4. The media resource classification and processing method according to claim 1, characterized in that, The step of matching candidate category tags corresponding to the target media resource from the first sub-level category tag set corresponding to the initial category tag based on the target resource description information includes: The target resource description information is input into the resource feature extraction model for resource extraction processing to obtain the first resource feature corresponding to the target media resource. Based on the first resource feature, the candidate category label corresponding to the target media resource is determined from the first sub-category label set.
5. The media resource classification and processing method according to claim 4, characterized in that, The target resource description information is multimodal description information; the resource feature extraction model includes a multimodal understanding model and a text encoding model; the step of inputting the target resource description information into the resource feature extraction model for resource extraction processing to obtain the first resource feature corresponding to the target media resource includes: The multimodal description information is input into the multimodal understanding model for resource understanding to obtain the resource description text corresponding to the target media resource; The resource description text is input into the text encoding model for text encoding processing to obtain the first resource feature.
6. The media resource classification and processing method according to claim 1, characterized in that, The target multi-level category label includes at least two levels of category labels, and the first classification processing model is a generative language model; the step of inputting the candidate category label, the initial category label, and the target resource description information into the first classification processing model for classification processing to obtain the target multi-level category label corresponding to the target media resource includes: The candidate category label, the initial category label, and the target resource description information are input into the first classification processing model. During the classification processing, a third category label is determined from the candidate category labels based on the initial category label and the target resource description information. The third category label is the category label of the lowest category level among the at least two levels of category labels. The third category label and the corresponding upper-level category label are used as the target multi-level category label.
7. The media resource classification and processing method according to any one of claims 1 to 6, characterized in that, The method further includes: Obtain the sample resource description information corresponding to each of the multiple first sample media resources in the current training round and the preset multi-level category label corresponding to each first sample media resource from the first preset training data; Based on the sample resource description information corresponding to each first sample media resource, each first sample media resource is classified to obtain the initial sample category label corresponding to each first sample media resource. Based on the sample resource description information corresponding to each first sample media resource, the candidate sample category label corresponding to each first sample media resource is matched from the corresponding third sub-level category label set. The third sub-level category label set is the category label set of the next category level of the category level to which the corresponding initial category label belongs. The candidate sample category label, the initial sample category label, and the sample resource description information are input into the first classification model to be trained for classification processing to obtain the multi-level category label of each of the multiple first sample media resources; Based on the preset multi-level category labels and the sample multi-level category labels, the first classification model to be trained is iteratively trained to obtain the first classification processing model.
8. The media resource classification and processing method according to claim 7, characterized in that, The multi-level category label of the samples includes at least two levels of sample category labels. When the at least two levels of sample category labels are two-level sample category labels, the initial sample category label is the first sample category label. The process of classifying each first sample media resource based on the sample resource description information corresponding to each first sample media resource to obtain the initial sample category label corresponding to each first sample media resource includes: The sample resource description information corresponding to each first sample media resource is input into the second classification processing model for classification processing to obtain the first sample category label corresponding to each first sample media resource.
9. The media resource classification and processing method according to claim 8, characterized in that, When the at least two levels of sample category labels are at least three levels of sample category labels, the initial sample category label is the second sample category label; the step of classifying each first sample media resource based on the sample resource description information corresponding to each first sample media resource to obtain the initial sample category label corresponding to each first sample media resource further includes: The sample resource description information corresponding to each first sample media resource, the first sample category label corresponding to each first sample media resource, and the fourth sub-category label set corresponding to the first sample category label are input into the third classification processing model for classification processing to obtain the second sample category label corresponding to each first sample media resource. The fourth sub-level category label set includes category labels corresponding to at least one category level under the category level to which the first sample category label belongs, and the second sample category label is the category label of the lowest category level in the at least one category level corresponding to the fourth sub-level category label set.
10. A media resource classification and processing device, characterized in that, include: The description information acquisition module is configured to acquire the target resource description information corresponding to the target media resource; The first classification processing module is configured to perform classification processing on the target media resource based on the target resource description information to obtain the initial category label corresponding to the target media resource. The first tag matching module is configured to perform matching of candidate category tags corresponding to the target media resource from the first sub-category category tag set corresponding to the initial category tag based on the target resource description information. The first sub-category category tag set is the category tag set of the next category level of the category level to which the initial category tag belongs. The second classification processing module is configured to perform classification processing by inputting the candidate category label, the initial category label and the target resource description information into the first classification processing model to obtain the target multi-level category label corresponding to the target media resource.
11. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the media resource classification processing method as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is able to perform the media resource classification processing method as described in any one of claims 1 to 9.
13. A computer program product, characterized in that, It includes computer program instructions that, when executed by a computer's processor, cause the computer to perform the media resource classification processing method as described in any one of claims 1 to 9.