Model training method and media content recognition method for media content recognition
By constructing a decision tree model with multi-dimensional features and a random forest algorithm, the problem of low accuracy and efficiency in media content anomaly identification in existing technologies is solved, achieving efficient identification of multi-dimensional features and improving the accuracy and reliability of identification.
Patent Information
- Application Number
- CN202111287497.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-02
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2041-11-02
AI Technical Summary
Existing technologies for identifying media content anomalies have low accuracy and efficiency, and it is difficult to effectively identify the correlation between multi-dimensional features.
By constructing a decision tree model based on multi-dimensional features, training the decision trees using the random forest algorithm, and combining information gain and Gini coefficient to determine the optimal splitting rule, multiple decision trees are constructed to form a random forest model, thereby improving the ability to capture the correlation between features and reducing the risk of overfitting.
It improves the accuracy and efficiency of media content recognition, enhances the ability to recognize multi-dimensional features, reduces the risk of overfitting, and improves the reliability and effectiveness of recognition.
Smart Images

Figure CN114330476B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet communication technology, and in particular to a model training method and a media content recognition method for media content recognition. Background Technology
[0002] With the development of internet communication technology, the internet has become an important way for people to obtain and share information. Users can obtain information actively (e.g., by sending an information request to a server through a client) or passively (e.g., by passively receiving information actively pushed by a server). To improve the user's information reading experience, information is often presented in the form of media content that indicates multimodal (multi-dimensional) characteristics.
[0003] Whether users actively or passively acquire information, the media content they read may be anomalous (e.g., content that is likely to cause user aversion or discomfort), which often affects the user's information reading experience. Therefore, anomalous content identification is necessary. Related technologies often identify anomalies in media content from each single-modal (single-dimensional) perspective separately, and then combine the anomaly identification results from each single-modal perspective to determine whether the media content is anomalous. This method is often inaccurate and inefficient in determining anomalous content. Summary of the Invention
[0004] To address the issues of poor accuracy and low efficiency in existing technologies for identifying anomalous content in media, this application provides a model training method and a media content identification method:
[0005] According to a first aspect of this application, a model training method for media content recognition is provided, the method comprising:
[0006] Obtain a set of media content samples and a set of multi-dimensional features; wherein, the set of multi-dimensional features is constructed based on the multi-dimensional features corresponding to each media content sample in the set of media content samples, and the media content samples carry a label indicating whether they belong to abnormal category content;
[0007] When training the decision tree to be trained, the training sample set to participate in the training is determined based on the media content sample set, and the training feature set to participate in the training is determined based on the multi-dimensional feature set.
[0008] Based on the training sample set and the training feature set, determine the optimal splitting rule that satisfies the preset splitting requirements, and train the decision tree to be trained based on the optimal splitting rule to obtain the first decision tree;
[0009] Repeat the steps described above to determine the set of training samples to obtain the first decision tree, and construct at least two random forests based on multiple first decision trees to obtain a decision model.
[0010] According to a second aspect of this application, a media content identification method is provided, characterized in that the method includes:
[0011] Acquire media content to be processed;
[0012] Determine the multi-dimensional features corresponding to the media content to be processed;
[0013] Using the multi-dimensional features as input, the identification result of the media content to be processed is obtained using the decision model as described in the first aspect; wherein the identification result indicates the relationship between the media content to be processed and the abnormal classification content.
[0014] According to a third aspect of this application, a model training apparatus for media content recognition is provided, the apparatus comprising:
[0015] Collection Acquisition Module: Used to acquire a media content sample set and a multi-dimensional feature set; wherein, the multi-dimensional feature set is constructed based on the multi-dimensional features corresponding to each media content sample in the media content sample set, and the media content sample carries a label indicating whether it belongs to an abnormal category of content;
[0016] Set determination module: used to determine the set of training samples to participate in training based on the set of media content samples, and to determine the set of training features to participate in training based on the set of multi-dimensional features when training the decision tree to be trained;
[0017] Decision tree construction module: used to determine the optimal splitting rule that satisfies the preset splitting requirements based on the training sample set and the training feature set, and to train the decision tree to be trained based on the optimal splitting rule to obtain the first decision tree;
[0018] Decision model building module: used to repeat the above steps of determining the set of training samples to obtain the first decision tree, and to build at least two random forests based on multiple first decision trees to obtain a decision model.
[0019] According to a fourth aspect of this application, a media content recognition device is provided, the device comprising:
[0020] Media content acquisition module: used to acquire media content to be processed;
[0021] Feature determination module: used to determine the multi-dimensional features corresponding to the media content to be processed;
[0022] Identification module: used to obtain the identification result of the media content to be processed by taking the multi-dimensional features as input and using the decision model as described in the first aspect; wherein the identification result indicates the relationship between the media content to be processed and the abnormal classification content.
[0023] According to a fifth aspect of this application, an electronic device is provided, the electronic device including a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the model training method for media content recognition as described in the first aspect, or the media content recognition method as described in the second aspect.
[0024] According to a sixth aspect of this application, a computer-readable storage medium is provided, wherein at least one instruction or at least one program is stored therein, the at least one instruction or the at least one program being loaded and executed by a processor to implement the model training method for media content recognition as described in the first aspect, or the media content recognition method as described in the second aspect.
[0025] According to a seventh aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform a model training method for media content recognition as described in the first aspect, or a media content recognition method as described in the second aspect.
[0026] This application provides a model training method and a media content recognition method for media content recognition, which have the following technical effects:
[0027] This application obtains a media content sample set and a multi-dimensional feature set. Then, when training the decision tree to be trained, it determines the training sample set based on the media content sample set and the training feature set based on the multi-dimensional feature set. Next, it determines the optimal splitting rule that meets preset splitting requirements based on the training sample set and the training feature set, and trains the decision tree to be trained based on the optimal splitting rule to obtain a first decision tree. This process is repeated to determine the training sample set to obtain the first decision tree, and at least two random forests are constructed based on multiple first decision trees to obtain a decision model. The multi-dimensional feature set is constructed based on the multi-dimensional features corresponding to each media content sample in the media content sample set, and each media content sample carries a label indicating whether it belongs to an anomalous category. In the scenario of determining whether media content belongs to an anomalous category, this application constructs a decision model including random forests for identification, improving the accuracy and efficiency of identifying media content with corresponding multi-dimensional features. The application of decision trees and random forests can effectively capture the correlation between features, while random forests also help reduce the risk of overfitting. When using the trained decision model for identification, the ability to identify multi-dimensional features with different forms can be improved, thereby greatly improving the reliability and effectiveness of media content identification. Attached Figure Description
[0028] To more clearly illustrate the technical solutions and advantages in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0029] Figure 1 This is a schematic diagram of an application environment provided in an embodiment of this application;
[0030] Figure 2 This is a flowchart illustrating a model training method for media content recognition provided in an embodiment of this application;
[0031] Figure 3 This is a schematic diagram of determining the optimal splitting rule that meets the preset splitting requirements based on the training sample set and the training feature set, and training the decision tree to be trained based on the optimal splitting rule, provided in an embodiment of this application.
[0032] Figure 4 This is a schematic diagram of a decision model obtained by constructing at least two random forests based on multiple first decision trees, as provided in an embodiment of this application.
[0033] Figure 5This is a flowchart illustrating a media content recognition method provided in an embodiment of this application;
[0034] Figure 6 This is a schematic diagram of the framework of the multimodal fusion module provided in the embodiments of this application;
[0035] Figure 7 This is a block diagram of a model training device for media content recognition provided in an embodiment of this application;
[0036] Figure 8 This is a block diagram of a media content recognition device provided in an embodiment of this application;
[0037] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0038] Figure 10 This is a schematic diagram of the blockchain system provided in an embodiment of the present invention;
[0039] Figure 11 This is a schematic diagram of the block structure provided in an embodiment of the present invention. Detailed Implementation
[0040] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0041] It should be noted that the terms "comprising" and "having" and any variations thereof in the specification, claims and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such processes, methods, products or devices.
[0042] Please see Figure 1 , Figure 1This is a schematic diagram of an application environment provided in an embodiment of this application. This application environment may include a client 10 and a server 20, which can be directly or indirectly connected via wired or wireless communication. A user can send an information retrieval request to the server 20 through the client 10. The server 20 determines the corresponding information to be returned based on the information retrieval request, then determines the multi-dimensional features corresponding to the information to be returned, and then uses a preset decision model to process the multi-dimensional features to obtain the identification result of the information to be returned, determining whether the information to be returned belongs to an abnormal category. If it does not belong, it directly returns to the client 10; if it belongs, it processes it accordingly and then returns to the client 10. It should be noted that... Figure 1 This is just one example.
[0043] The client can be a physical device such as a smartphone, computer (e.g., desktop computer, tablet, laptop), augmented reality (AR) / virtual reality (VR) device, digital assistant, smart voice interaction device (e.g., smart speaker), smart wearable device, smart home appliance, in-vehicle terminal, etc., or software running on the physical device, such as a computer program. The operating system corresponding to the client can be Android, iOS (a mobile operating system developed by Apple), Linux, Microsoft Windows, etc.
[0044] The server side can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The server may include network communication units, processors, and memory, etc. The server side can provide backend services to the corresponding clients.
[0045] In practical applications, the aforementioned pre-defined decision-making models involve computer vision (CV) technology in artificial intelligence. Computer vision is a science that studies how to enable machines to "see." More specifically, it refers to machine vision, which uses cameras and computers to replace human eyes in recognizing, tracking, and measuring targets, and then performs image processing to create images more suitable for human observation or transmission to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies, attempting to build artificial intelligence systems capable of extracting information from images or multi-dimensional data. Computer vision technologies typically include image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, 3D object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping (SLAM), autonomous driving, intelligent transportation, and common biometric recognition technologies such as fingerprint recognition.
[0046] The aforementioned client 10 and server 20 can be used to build a system for media content recognition, which can be a distributed system. For example, consider a blockchain system as an example of a distributed system. Figure 10 , Figure 10 This is an optional structural diagram of the distributed system 100 provided in this embodiment of the invention applied to a blockchain system. It consists of multiple nodes (any form of computing device in the network, such as servers or user terminals) and clients, forming a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol running on top of the Transmission Control Protocol (TCP). In the distributed system, any machine, such as a server or terminal, can join and become a node. A node includes a hardware layer, a middleware layer, an operating system layer, and an application layer.
[0047] See Figure 10 The functions of each node in the blockchain system shown include:
[0048] 1) Routing: A basic function of nodes used to support communication between nodes.
[0049] In addition to routing capabilities, nodes can also have the following functions:
[0050] 2) Applications are deployed in the blockchain to implement specific business needs. They record data related to the implementation of functions to form record data, carry digital signatures in the record data to indicate the source of the task data, and send the record data to other nodes in the blockchain system. When other nodes successfully verify the source and integrity of the record data, they add the record data to the temporary block.
[0051] For example, the business logic implemented by the application includes:
[0052] 2.1) A wallet is used to provide the function of conducting transactions, including initiating transactions (i.e., sending the transaction record of the current transaction to other nodes in the blockchain system. After the other nodes successfully verify the transaction, they store the transaction record data in the temporary block of the blockchain as a response to acknowledge the validity of the transaction.
[0053] 2.2) Shared ledger, used to provide functions such as storage, query and modification of ledger data. It sends the record data of the operation on the ledger data to other nodes in the blockchain system. After the other nodes verify the validity, as a response to acknowledge the validity of the ledger data, they store the record data in a temporary block. They can also send confirmation to the node that initiated the operation.
[0054] 2.3) Smart contracts are computerized protocols that can execute the terms of a contract. They are implemented through code deployed on a shared ledger that executes when certain conditions are met. The code is used to complete automated transactions according to actual business needs. Of course, smart contracts are not limited to executing contracts for transactions, but can also execute contracts for processing received information.
[0055] 3) A blockchain consists of a series of blocks that are sequentially generated. Once a new block is added to the blockchain, it will not be removed. The blocks contain the data submitted by the nodes in the blockchain system.
[0056] See Figure 11 , Figure 11 This is an optional schematic diagram of the block structure provided in this embodiment of the invention. Each block includes the hash value of the transaction records stored in this block (the hash value of this block) and the hash value of the previous block. The blocks are connected through their hash values to form a blockchain. Additionally, the block may include information such as a timestamp when it was generated. A blockchain is essentially a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains relevant information used to verify the validity of the information (anti-counterfeiting) and to generate the next block.
[0057] The following describes a specific embodiment of a model training method for media content recognition according to this application. Figure 2This is a flowchart illustrating a model training method for media content recognition provided in an embodiment of this application. This application provides the operational steps of the method described in the embodiments or flowchart, but based on conventional or non-inventive labor, more or fewer operational steps may be included. The order of steps listed in the embodiments is merely one possible execution order among many and does not represent the only possible execution order. In actual systems or products, the methods can be executed sequentially according to the embodiments or drawings, or in parallel (e.g., in a parallel processor or multi-threaded processing environment).
[0058] Specific examples Figure 2 As shown, the method may include:
[0059] S201: Obtain a set of media content samples and a set of multi-dimensional features; wherein, the set of multi-dimensional features is constructed based on the multi-dimensional features corresponding to each media content sample in the set of media content samples, and the media content sample carries a label indicating whether it belongs to an abnormal category of content;
[0060] In this embodiment of the application, the server obtains a set of media content samples and a set of multi-dimensional features.
[0061] Information can be presented in the form of media content indicating multi-dimensional features. A media content sample can include at least two of the following dimensional objects: text, image, audio, probability value, and label embedding. The multi-dimensional feature set originates from the multi-dimensional features corresponding to each media content sample. For example, the media content sample set includes media content samples 1 and 2. The multi-dimensional features corresponding to media content sample 1 are text feature a and image feature b, and the multi-dimensional features corresponding to media content sample 2 are text feature c, image feature d, and audio feature e. Therefore, the multi-dimensional feature set includes text feature a, image feature b, text feature c, image feature d, and audio feature e. Of course, media content indicating multi-modal features can also be used as a presentation form of information flow, and a media content sample can represent information flow. Information flow is the carrier of information, and information flow can contain multiple modal information such as text, images, voice, and video. Multiple modal information, after processing, can be regarded as media content indicating multi-dimensional features. It can be understood that media content indicating multi-dimensional features can represent a single piece of information or an information flow including multiple pieces of information.
[0062] The media content sample carries a tag indicating whether it belongs to an abnormal content category. This tag determines whether the media content sample is normal or abnormal, and if it is abnormal, which specific abnormal category it belongs to. Abnormal content can be content that is likely to cause user aversion or discomfort, such as content containing information with unusual characteristics like horror, snakes, or skin diseases. The specific abnormal category can be determined based on the unusual characteristics, such as an abnormal category indicating horror, an abnormal category indicating snakes, or an abnormal category indicating skin diseases. Of course, the specific abnormal categories are not limited to the above; they can be updated according to business needs, such as deleting existing abnormal categories, replacing existing abnormal categories, or adding new abnormal categories. Furthermore, abnormal content can also be content that violates laws and administrative regulations, contravenes social morality, or harms national interests, public interests, or the interests of third parties.
[0063] S202: When training the decision tree to be trained, the training sample set to participate in the training is determined based on the media content sample set, and the training feature set to participate in the training is determined based on the multi-dimensional feature set.
[0064] In this embodiment of the application, when training the decision tree to be trained, the server determines the training sample set to participate in the training based on the media content sample set, and determines the training feature set to participate in the training based on the multi-dimensional feature set.
[0065] Generally, each decision tree in a decision model is independent. Steps S202 and S203 illustrate the process of training a decision tree. The training sample set used to train each decision tree is derived from the media content sample set, and the training feature set is derived from the training feature set.
[0066] Considering that decision trees will be used to build a random forest later, the training sample set and training feature set can be determined by combining the type of random forest when training each decision tree.
[0067] For the first type of random forest (ordinary random forest), when training each decision tree used to construct it, multiple media content samples can be randomly selected from the media content sample set to construct the training sample set, and multiple feature terms can be randomly selected from the multi-dimensional feature set to construct the training feature set. The number of media contents in the training sample set is less than or equal to the number of media contents in the media content sample set; the number of feature terms in the training feature set is less than the number of feature terms in the multi-dimensional feature set.
[0068] For the second type of random forest (extreme random forest), when training each decision tree used to build it, the media content sample set can be determined as the training sample set, and a feature item to be randomly selected from the multi-dimensional feature set to participate in the training is constructed to build the training feature set.
[0069] Taking the aforementioned multi-dimensional feature set, including text feature a, image feature b, text feature c, image feature d, and audio feature e, as an example, if we consider text features as one feature term, image features as another, and audio features as yet another, then training features can be determined from these text features, image features, and audio features. Furthermore, more fine-grained feature terms can also be used. For instance, text feature a and text feature c represent different feature terms: text feature a reflects text features related to word / character segmentation, while text feature c reflects text features related to sentiment. Image feature b and image feature d represent different feature terms: image feature b reflects image features related to pixels, while image feature d reflects image features related to shape. Therefore, training features can be determined from text features reflecting word / character segmentation, text features reflecting sentiment, image features reflecting pixels, text features reflecting shape, and audio features.
[0070] Regarding the "random selection" involved in constructing the training sample set and training feature set, for a random forest, "random selection" can take the form of selection with replacement. In practical applications, for the first type of random forest (ordinary random forest), if the number of feature terms in the multi-dimensional feature set is s, it can be "randomly selected". We use 10 feature terms to construct the training feature set.
[0071] S203: Determine the optimal splitting rule that satisfies the preset splitting requirements based on the training sample set and the training feature set, and train the decision tree to be trained based on the optimal splitting rule to obtain the first decision tree;
[0072] In this embodiment, the server determines the optimal splitting rule that satisfies the preset splitting requirements based on the training sample set and training feature set, and trains the decision tree to be trained based on the optimal splitting rule to obtain the first decision tree. In machine learning, a decision tree is a predictive model that represents a mapping relationship between object attributes and object values. A decision tree is a tree structure in which each internal node represents a test on an attribute, each branch represents a test output, and each leaf node represents a category. When training a decision tree to be trained is started, the tree structure information of the decision tree to be trained can be obtained (including restrictions on the depth of the decision tree, restrictions on the number of decision nodes in each layer of the decision tree, etc.), thereby initializing the root node to be split. Referring to the optimal splitting rule determined by the training sample set, training feature set, and preset splitting requirements, the execution logic of starting feature splitting from the root node is described. For example, the optimal splitting rule can be determined once and globally. After determining the optimal classification rule, the optimal classification rule and the tree structure information of the decision tree to be trained are fused to construct the first decision tree. At this point, the optimal splitting rule describes the content of constructing the splitting logic using the target training features. The target training features indicate at least one training feature from the training feature set, and the splitting logic indicates the execution order of at least one splitting condition (corresponding to the locally optimal splitting rule described later). The splitting condition corresponds one-to-one with the decision nodes in the decision tree to be trained. The optimal splitting rule can also indicate multiple locally optimal splitting rules. After each locally optimal splitting rule is determined, the most recently determined locally optimal splitting rule and the latest tree structure information of the decision tree to be trained are fused to construct the first decision tree.
[0073] In one exemplary embodiment, the preset splitting requirement includes preset splitting evaluation parameters and preset splitting termination conditions. The preset splitting evaluation parameters include at least one of the following: information gain and Gini coefficient.
[0074] 1. Regarding information gain:
[0075] Information gain is measured by entropy; a higher information gain indicates a stronger classification ability of the attribute. If the value of attribute A divides the sample set T into T1, T2, ..., T... m If there are m subsets in total, then the information gain is defined as follows: Formula 1:
[0076]
[0077] Where |T| is the number of samples in T, |T i |For T i The number of samples, Entropy(T) i The calculation formula for ) is as follows: Formula 2:
[0078]
[0079] Among them, freq(C j (T) represents samples in T that belong to C. j The frequency of the category, s is the number of subcategories of T.
[0080] 2. Regarding the Gini coefficient:
[0081] The Gini coefficient is applicable to attributes whose values are continuous numerical values. The specific idea is as follows: assuming that the data sample set T at a certain node t contains records of k categories, then the Gini coefficient is defined as shown in Formula 3 below:
[0082]
[0083] Here, p(j|t) represents the probability of class j at node t, so the Gini coefficient is non-negative. If Gini(t) equals 0, it means that all samples at that node have a defined class, indicating maximum information content. If Gini(t) is maximized, then minimum information content is obtained.
[0084] Information gain can be selected as a single preset splitting evaluation parameter, the Gini coefficient can be selected as a single preset splitting evaluation parameter, or a combination of information gain and Gini coefficient can be selected as the preset splitting evaluation parameter. For the combination of information gain and Gini coefficient, the weights of information gain and Gini coefficient for splitting evaluation can be set separately. Of course, preset splitting evaluation parameters can also include information gain ratio, etc.
[0085] Preset split termination conditions can be derived from the tree structure information of the decision tree to be trained, such as information on depth constraints of the decision tree. Preset split termination conditions can also be based on the upper or lower limits of the values of relevant preset split evaluation parameters.
[0086] Accordingly, see Figure 3 The step of determining the optimal splitting rule that satisfies the preset splitting requirements based on the training sample set and the training feature set, and training the decision tree to be trained based on the optimal splitting rule, includes:
[0087] S301: Select training features from the training feature set that indicate the current local optimal split, and generate a local optimal split rule based on the selected training features; wherein the current local optimal split is determined based on the training sample set and the preset split evaluation parameters;
[0088] S302: Establish the association between the local optimal splitting rule and the current decision node to guide the current decision node to perform feature splitting; wherein, the current decision node is a child node of the previous decision node that performed feature splitting in the decision tree to be trained;
[0089] S303: Repeat the above steps of selecting training features that indicate the current local optimal split to guide the current decision node to perform feature splitting until the preset split termination condition is met to train the decision tree to be trained.
[0090] Based on the above introduction to information gain and Gini coefficient, the current local optimal split can be the training feature that indicates the largest information gain when used as a splitting feature; the current local optimal split can be the training feature that indicates the smallest Gini coefficient when used as a splitting feature. Generating a local optimal splitting rule based on the selected training features is equivalent to generating the splitting conditions to be executed based on the selected training features.
[0091] If the root node is in a state awaiting splitting, then the root node becomes the current decision node. If the root node has already split, then the child node or a node at the same level as the previous decision node that performed feature splitting becomes the current decision node. The local optimal splitting rule is associated with the current decision node to guide the current decision node in performing feature splitting.
[0092] The first decision tree is constructed by continuously integrating the recently determined local optimal splitting rules and the latest tree structure information of the decision tree to be trained. Compared with local optimal splitting rules, this process of constructing the first decision tree can reduce the risk of overfitting and also reduce training time.
[0093] S204: Repeat the above steps of determining the training sample set to obtain the first decision tree, and construct at least two random forests based on multiple first decision trees to obtain a decision model.
[0094] In this embodiment, the server repeats the steps described above—determining the training sample set to obtain the first decision tree, and constructing at least two random forests based on multiple first decision trees to obtain a decision model. The training processes for each decision tree are independent. After training each decision tree separately, random forests can be constructed based on the trained first decision trees, thus obtaining a decision model composed of at least two random forests. In practical applications, two first-class random forests and two second-class random forests can be constructed, each first-class random forest comprising 500 decision trees, and each second-class random forest comprising 500 decision trees.
[0095] Random forests possess several desirable properties, including the ability to handle both discrete and continuous feature inputs simultaneously, parallel processing of high-dimensional data classification and prediction problems, high tolerance for outliers and noise, and high prediction accuracy. Applying a decision model constructed from at least two random forests can be viewed as performing another classification on the trained multiple first decision trees, thereby improving the internal architecture of the decision model and better ensuring its reliability and stability in recognizing media content with corresponding multi-dimensional features.
[0096] Furthermore, in addition to having at least two random forests at the same level, the built-in architecture of the decision-making model can also contain random forests at different levels. For example... Figure 4 As shown, the construction of at least two random forests based on multiple first decision trees to obtain a decision model includes:
[0097] S401: Construct multiple first random forests based on multiple first decision trees;
[0098] S402: Construct a first-layer classification structure based on the multiple first random forests;
[0099] S403: When constructing a non-first-layer classification structure, a target splitting rule is determined based on the output results of the previous-layer classification structure for the target training sample set and the associated input features, and a second decision tree for constructing the adjacent next-layer classification structure is trained based on the target splitting rule; wherein, the target training sample set is determined based on the media content sample set, and the adjacent next-layer classification structure is constructed based on multiple second random forests constructed from multiple second decision trees;
[0100] S404: The decision model is obtained by fusing the first-level classification structure and at least one of the non-first-level classification structures.
[0101] The first decision tree obtained through steps S202-S203 can be directly used to construct the first random forest, and then the first-level classification structure of the decision model can be constructed based on multiple first random forests. The first random forests in the first-level classification structure can be random forests of the same class or random forests of different classes.
[0102] Compared to the first decision tree, the data source for selecting the training sample set and training feature set to train the second decision tree is: the output results of the previous layer classification structure for the target training sample set and the associated input features, where the target training sample set is determined based on the media content sample set. Taking the media content sample set as the target training sample set as an example, the data source for selecting the training sample set to train the second decision tree is: the media content sample set, and the output results of the previous layer classification structure for the target training sample set (e.g., the probability value of belonging to a specific abnormal category, the probability value of being normal content); the data source for selecting the training feature set to train the second decision tree is: a multi-dimensional feature set, and the output results of the previous layer classification structure for the target training sample set (e.g., the probability value of belonging to a specific abnormal category, the probability value of being normal content). The process of training a decision tree in steps S202-S203 above can be referred to to train the second decision tree used to construct the non-first-layer structure, which will not be elaborated further.
[0103] An Nth random forest can be constructed based on multiple trained Nth decision trees, and then the Nth layer classification structure of the decision model can be constructed based on these multiple Nth random forests. The Nth random forests in the Nth layer classification structure can be random forests of the same class or random forests of different classes. Here, N is an integer greater than or equal to 2. It should be noted that the second decision tree mentioned in step S403 is only used to distinguish the aforementioned first decision tree and is not limited to its use in constructing the second layer classification structure.
[0104] The above steps construct a decision model with a multi-layered classification structure, where each layer comprises multiple random forests. This allows for the layer-by-layer processing of deep random forests to eliminate the differences in features across different dimensions, ensuring the effectiveness of the recognition results obtained using the decision model. The layer-by-layer processing structure of the decision model means that the ensemble of each random forest layer is not merely a simple classifier, but also a feature extraction structure, which can better handle the differences in features across different dimensions compared to fully connected classifiers.
[0105] In practical applications, see Figure 6 The decision model uses four random forests for each classification layer: two first-class random forests and two second-class random forests, each containing 500 decision trees. This means each classification layer has a total of 2000 decision trees. In the application of the decision model, the input to the next layer is the probability values generated by the previous layer concatenated with its features. Finally, a global average is taken from the probability values generated by each random forest in the final layer to produce the final predicted probability. The recognition result of the decision model is the average of the class scores (probabilities) generated by each random forest in the final layer.
[0106] Furthermore, the decision model can be used as a deep forest fusion module to construct a multimodal fusion module together with the multimodal feature extraction module. Specifically, the multimodal feature extraction module can extract high-dimensional features from image and text modalities using deep neural networks combined with appropriate global or average pooling operations.
[0107] For the deep forest fusion module, we design and combine random forests with different tree structures, tree depths, forest widths, forest depths, and different classification heads.
[0108] See Figure 6 The multimodal fusion module is mainly composed of three modules: an image-side BiT module, a text-side BERT module, and a deep forest fusion module. For the image-side BiT module, a BiT model (transfer model) is used as the pre-trained model. The BiT model is optimized for pre-training, using a larger-scale pre-training corpus. In the pre-training stage, GN (group normalization) + Weight Standardization replaces BN (batch normalization) to reduce the impact of batch size on training. Simultaneously, a HyperRule mechanism is proposed to reduce parameter tuning during the fine-tuning stage. The representational power of the BiT model is significantly improved through pre-training optimization, requiring only a smaller number of labeled samples for fine-tuning in downstream tasks to achieve good results.
[0109] For the title-side BERT module, the BERT model (a bidirectional encoder-based representation model) was used as the pre-trained model. BERT has achieved excellent results in many NLP (Natural Language Processing) tasks. The BERT model uses a bidirectional Transformer (encoder) structure to train two tasks on a large-scale unsupervised corpus: a) Masked LM task: Randomly mask 15% of the tokens (vectors) in the corpus, where 80% of the tokens are replaced with [MASK] tokens, 10% of the tokens are replaced with arbitrary tokens, and the remaining 10% of the tokens remain unchanged. The model needs to predict the corresponding values of the masked tokens based on contextual semantics. b) Next Sentence Prediction: Given two sentences A and B, where B has a 50% probability of being the next sentence of A, the model needs to predict whether B is the next sentence of A. By training the BERT model on large-scale unsupervised corpora for these two tasks, the model can learn sufficient contextual semantic features. Furthermore, since no labeled data is required during the pre-training stage, a large amount of unsupervised corpus can be collected for pre-training. The representational power of the pre-trained model is greatly improved, and when fine-tuning the BERT model on downstream tasks, only a small number of labeled samples are needed to achieve good results.
[0110] For the deep forest fusion module, the title-side features and image-side features need to be fused so that the fused vector contains features from both modalities. Thus, the model's input is a multimodal, high-dimensional feature vector. The model can utilize both the first and second type of random forests mentioned above. For the second type of random forest, because there is sufficient randomness at the feature level (corresponding to the selection of training features), there is no need to introduce further randomness at the sample level (corresponding to the selection of training samples). Randomness and diversity are beneficial to ensemble learning; therefore, in the case of an overall forest structure, different trees are used to enhance randomness and diversity.
[0111] A two-stage training approach can be adopted: first, train the classification task separately for each modality, i.e., train the image modality model (corresponding to the preset image feature extraction model described later) based on the BiT model to obtain 2048-dimensional image features, and train the text modality model (preset text feature extraction model) based on the BERT model to obtain 768-dimensional text features. After the single-modality training is completed, fix the single-modality model, and then train the deep forest fusion model (corresponding to the aforementioned decision model). The advantage is that the two modalities can be trained separately with large-scale single-modality data first, so that each single-modality model can learn sufficient semantic features; then, the deep forest fusion model is trained on a small-scale common data to learn the fused features.
[0112] The multimodal fusion module provided in this application, by combining different model units and a well-designed network structure, can effectively identify multimodal, high-dimensional inappropriate content during content recognition, with high accuracy. Experiments show a false positive rate of 0.3% and a recall rate of 70%. Furthermore, the deep forest structure can be optimized according to different business scenarios. In addition to decision trees and random forests, base classifiers can also use LR (logistic regression) classifiers, classifiers based on LightGBM (an algorithmic framework), etc. Of course, the number and width of deep forest layers, and the features in each layer, can also be adjusted according to the business scenario.
[0113] As can be seen from the technical solutions provided in the embodiments of this application above, in the scenario of determining whether media content belongs to abnormal category content, the embodiments of this application construct a decision model including random forest for identification, which improves the accuracy and efficiency of identification of media content with corresponding multi-dimensional features. The application of decision trees and random forests can effectively capture the correlation between features, while random forests also help reduce the risk of overfitting.
[0114] The following describes a specific embodiment of a media content recognition method according to this application. Figure 5 This is a flowchart illustrating a media content recognition method provided in an embodiment of this application. This application provides the operational steps of the method described in the embodiment or flowchart, but based on conventional or non-inventive labor, more or fewer operational steps may be included. The order of steps listed in the embodiment is merely one possible execution order among many and does not represent the only execution order. In actual systems or products, the method can be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment) as shown in the embodiment or drawings. Specifically, as... Figure 5 As shown, the method may include:
[0115] S501: Obtain media content to be processed;
[0116] In this embodiment, the server acquires the media content to be processed. The server can respond to an information acquisition request sent by the client and determine the corresponding information to be returned or the information stream to be returned based on the information acquisition request. The information to be returned or the information stream to be returned is the data source of the media content to be processed. The server can also proactively push information or information streams to the user; the information to be pushed or the information stream to be pushed is the data source of the media content to be processed. For an understanding of the media content to be processed, please refer to the relevant introduction of the media content sample in step S201 above, which will not be repeated here. It should be noted that the server that serves as the execution subject of steps S501-S503 here may be the same as or different from the server involved in steps S201-S204 above.
[0117] S502: Determine the multi-dimensional features corresponding to the media content to be processed;
[0118] In this embodiment, the server determines the multi-dimensional features corresponding to the media content to be processed. For an understanding of "multi-dimensional features corresponding to the media content to be processed," please refer to the relevant description of "multi-dimensional features corresponding to the media content sample" in step S201 above, which will not be repeated here.
[0119] The image-class features corresponding to the media content to be processed can be extracted using a preset image feature extraction model; text-class features corresponding to the media content to be processed can be extracted using preset text features; thus, the multi-dimensional features are obtained based on the image-class features and the text-class features. The preset image feature extraction model is trained using a transfer learning model as the initial model, and the preset text feature extraction model is trained using a transformer-based bidirectional encoding representation model as the initial model. For an understanding of the "preset image feature extraction model" and "preset text feature extraction model," please refer to the relevant introductions to "image modality model" and "text modality model" in step S204 above, which will not be repeated here. Using a trained model to extract features ensures the efficiency and accuracy of feature extraction, thereby improving the efficiency and accuracy of recognizing the media content to be processed.
[0120] S503: Using the multi-dimensional features as input, the identification result of the media content to be processed is obtained using the decision model described in steps S201-S204 above; wherein the identification result indicates the relationship between the media content to be processed and the abnormal classification content.
[0121] In this embodiment, using multi-dimensional features as input, the server uses the decision model described in steps S201-S204 above to obtain the identification result of the media content to be processed. The relationship between the media content to be processed and the abnormal category content indicated by the identification result can be: 1) no relationship, then the media content to be processed is normal content, not abnormal content; 2) relationship, then the media content to be processed belongs to a specific abnormal category. The media content to be processed can belong to at least one specific abnormal category. In practical applications, whether there is a relationship can be determined by a preset threshold. Taking the existence of 10 specific abnormal categories as an example, the identification result includes the probability that the multi-dimensional features corresponding to the media content to be processed belong to these 10 specific abnormal categories. Only when there is a probability greater than or equal to the preset threshold is it said that the media content to be processed is related to the abnormal category content. For the understanding of "abnormal content" and "specific abnormal category", please refer to the relevant introduction in step S201 above, which will not be repeated here. Of course, see Figure 6Referring to the multimodal fusion module described in step S204 above, the identification result of the media content to be processed can be obtained by using the multimodal fusion module as input.
[0122] In an exemplary embodiment, the process of obtaining the identification result of the media content to be processed includes the following steps: First, predicting the multi-dimensional features using at least two random forests in the decision model; then, generating the identification result of the media content to be processed based on the prediction result of each random forest; wherein the prediction result is determined based on the classification result of each decision tree in the random forest, and the classification result is determined based on the multi-dimensional features, starting from the root node of the decision tree and proceeding until the corresponding leaf node is reached.
[0123] It can be understood that the decision model comprises at least two random forests of equal rank, and the identification result is derived by a global average of the class probabilities generated by each random forest. The class probabilities generated by each random forest are then derived by a global average of the classification results generated by each decision tree within it. Taking 10 specific anomaly classifications as an example, the classification result generated by a decision tree includes the probabilities that the multi-dimensional features corresponding to the media content to be processed belong to each of these 10 specific anomaly classifications. A global average of the classification results generated by each decision tree yields the prediction result of the random forest, which includes the probabilities (i.e., class probabilities) that the multi-dimensional features corresponding to the media content to be processed belong to each of these 10 specific anomaly classifications. A global average of the prediction results generated by each random forest yields the identification result of the decision model.
[0124] Compared to related technologies that identify anomalies in media content from each single modality (single dimension) separately, and then combine the anomaly identifications from each single modality to determine whether the media content is abnormal, this application's embodiment introduces decision trees to model features probabilistically. The decision tree, acting as a classifier, has a decision-making process equivalent to a probabilistic modeling process. Starting from the root node, it uses a feature of a certain dimension to make judgments at internal nodes of the tree, determining which branch node to enter based on the judgment result, until reaching the leaf node to obtain the classification result. Probabilistic relationships between nodes can be established during feature processing, effectively capturing the correlation between features, resulting in higher classification accuracy. For multi-dimensional features, using random forests (especially multiple / multi-class random forests) can reduce the risk of overfitting. Generally, incorrect predictions are only made when more than half of the base classifiers (decision trees) err. Random forests are very stable; even if a new data point appears in the dataset, the entire algorithm is not significantly affected; it only affects one decision tree and is unlikely to affect all decision trees.
[0125] In an exemplary embodiment, the process of obtaining the identification result of the media content to be processed includes the following steps: processing the multi-dimensional features layer by layer using at least two classification structures in the decision model to obtain the identification result of the media content to be processed; wherein, the input of the next classification structure is determined by the output and input of the adjacent previous classification structure, the output of each classification structure is determined based on the prediction results of each random forest therein, the prediction results are determined based on the classification results of each decision tree in the random forest, and the classification results are determined based on the multi-dimensional features, starting from the root node of the decision tree and proceeding until the corresponding leaf node is reached.
[0126] It's understandable that the decision model includes random forests at different levels, and the recognition result is taken from a global average of the class probabilities generated by each random forest in the final layer. The class probability generated by each random forest in the final layer is then taken from a global average of the classification results generated by each decision tree within it. Considering the differences in the distribution of input features across different modalities is detrimental to classifier learning, and that different modal features are obtained through different source data formats, different model structures, and have different feature dimensions, these differences all create difficulties for the classifier's learning and hinder normal model convergence. Using deep random forests layer-by-layer processing can eliminate the differences in features across different dimensions, ensuring the effectiveness of the recognition results obtained using the decision model.
[0127] In one exemplary embodiment, the method further includes: when the media content to be processed belongs to an abnormal category, marking the media content to be processed as abnormal; wherein the abnormal marking is used to indicate reducing the recommendation weight of the media content to be processed or excluding the media content to be processed from being used as a candidate cover.
[0128] In personalized recommendation scenarios, if the media content to be recommended belongs to an anomalous category, it will be demoted in weight to reduce its exposure, thereby avoiding a poor user experience for related internet products. In cover selection scenarios, if the media content to be selected as a cover belongs to an anomalous category, it will be filtered to prevent it from being used as a cover, thus avoiding its impact on the display of the represented object. For example, the media content to be processed might be a candidate cover for a themed video album, where the themed video album represents the object that the media content will represent.
[0129] As can be seen from the technical solutions provided in the embodiments of this application above, when using the trained decision model for identification, the embodiments of this application can improve the ability to identify and adapt to multi-dimensional features with different forms, thereby greatly improving the reliability and effectiveness of media content identification. In information service scenarios (such as personalized recommendation scenarios and information flow content service scenarios), the effective and accurate identification of abnormal content can ensure information quality and improve user experience.
[0130] This application also provides a model training device for media content recognition, such as... Figure 7 As shown, the model training device 70 for media content recognition includes:
[0131] Set acquisition module 701: used to acquire a set of media content samples and a set of multi-dimensional features; wherein, the set of multi-dimensional features is constructed based on the multi-dimensional features corresponding to each media content sample in the set of media content samples, and the media content sample carries a label indicating whether it belongs to abnormal classification content;
[0132] Set determination module 702: used to determine the training sample set to participate in training based on the media content sample set and the training feature set to participate in training based on the multi-dimensional feature set when training the decision tree to be trained;
[0133] Decision tree construction module 703: used to determine the optimal splitting rule that satisfies the preset splitting requirements based on the training sample set and the training feature set, and to train the decision tree to be trained based on the optimal splitting rule to obtain a first decision tree;
[0134] Decision model building module 704: used to repeat the above steps of determining the training sample set to obtain the first decision tree, and to build at least two random forests based on multiple first decision trees to obtain a decision model.
[0135] It should be noted that the apparatus and method embodiments described in the device embodiments are based on the same inventive concept.
[0136] This application also provides a media content recognition device, such as... Figure 8 As shown, the media content recognition device 80 includes:
[0137] Media content acquisition module 801: Used to acquire media content to be processed;
[0138] Feature determination module 802: used to determine the multi-dimensional features corresponding to the media content to be processed;
[0139] Identification module 803: used as input to obtain the identification result of the media content to be processed by using the multi-dimensional features and the decision model described in steps S201-S204 above; wherein the identification result indicates the relationship between the media content to be processed and the abnormal classification content.
[0140] It should be noted that the apparatus and method embodiments described in the device embodiments are based on the same inventive concept.
[0141] This application provides an electronic device including a processor and a memory. The memory stores at least one instruction or at least one program segment, which is loaded and executed by the processor to implement the model training method or media content recognition method for media content recognition provided in the above method embodiments.
[0142] Furthermore, Figure 9 This diagram illustrates a hardware structure of an electronic device for implementing the model training method or media content recognition method for media content recognition provided in the embodiments of this application. The electronic device may participate in or include the model training device or media content recognition device for media content recognition provided in the embodiments of this application. Figure 9 As shown, the electronic device 90 may include one or more processors 902 (shown as 902a, 902b, ..., 902n in the figure) 902 (processor 902 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 904 for storing data, and a transmission device 906 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 9 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device described above. For example, the electronic device 90 may also include... Figure 9 The more or fewer components shown, or having the same Figure 9 The different configurations shown.
[0143] It should be noted that the aforementioned one or more processors 902 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be wholly or partially integrated into any other element within the electronic device 90 (or mobile device). As involved in the embodiments of this application, the data processing circuit serves as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).
[0144] The memory 904 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the model training method for media content recognition described in the embodiments of this application, or the program instructions / data storage device corresponding to the media content recognition method. The processor 902 executes various functional applications and data processing by running the software programs and modules stored in the memory 904, thereby implementing the aforementioned model training method or media content recognition method for media content recognition. The memory 904 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 904 may further include memory remotely located relative to the processor 902, and these remote memories can be connected to the electronic device 90 via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0145] The transmission device 906 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the electronic device 90. In one example, the transmission device 906 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In one embodiment, the transmission device 906 may be a radio frequency (RF) module for wireless communication with the Internet.
[0146] The display can be, for example, a touchscreen liquid crystal display (LCD), which allows users to interact with the user interface of an electronic device (or mobile device).
[0147] Embodiments of this application also provide a computer-readable storage medium, which can be disposed in an electronic device to store at least one instruction or at least one program related to implementing a model training method or media content recognition method for media content recognition in the method embodiments. The at least one instruction or the at least one program is loaded and executed by the processor to implement the model training method or media content recognition method for media content recognition provided in the above method embodiments.
[0148] Optionally, in this embodiment, the storage medium may be located in at least one of the multiple network servers in a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0149] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, the above description focuses on specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired results. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired results. In some implementations, multitasking and parallel processing are also possible or may be advantageous.
[0150] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device and electronic device embodiments are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0151] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0152] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for model training for media content recognition, characterized in that, The method comprises: acquiring a set of media content samples and a set of multi-dimensional features, the set of multi-dimensional features being constructed based on multi-dimensional features corresponding to each media content sample in the set of media content samples, the media content samples carrying labels indicating whether they belong to abnormal classification content; when training a to-be-trained decision tree, determining a set of training samples participating in training based on the set of media content samples, and determining a set of training features participating in training based on the set of multi-dimensional features; determining an optimal split rule meeting a preset split requirement based on the set of training samples and the set of training features, and training the to-be-trained decision tree based on the optimal split rule to obtain a first decision tree; repeating the steps of determining the set of training samples participating in training to obtaining the first decision tree, and constructing at least two random forests based on a plurality of the first decision trees to obtain a decision model: wherein, the step of constructing at least two random forests based on a plurality of the first decision trees to obtain a decision model comprises: constructing a plurality of first random forests based on a plurality of the first decision trees; constructing a first-layer classification structure based on the plurality of first random forests; when constructing a non-first-layer classification structure, determining a target split rule based on an output result of a target training sample set and associated input features by using a last-layer classification structure, and training a second decision tree used for constructing an adjacent next-layer classification structure based on the target split rule, the target training sample set being determined based on the set of media content samples, and the adjacent next-layer classification structure being constructed based on a plurality of second random forests constructed by a plurality of the second decision trees; and fusing the first-layer classification structure and at least one non-first-layer classification structure to obtain the decision model.
2. The method of claim 1, wherein: the preset split requirement comprises a preset split evaluation parameter and a preset split end condition, and the preset split evaluation parameter comprises at least one of information gain and Gini coefficient; the step of determining an optimal split rule meeting a preset split requirement based on the set of training samples and the set of training features, and training the to-be-trained decision tree based on the optimal split rule comprises: selecting a training feature indicating a current local optimal split from the set of training features, and generating a local optimal split rule based on the selected training feature, the current local optimal split being determined based on the set of training samples and the preset split evaluation parameter; establishing an association between the local optimal split rule and a current decision node to guide the current decision node to perform feature splitting, the current decision node being a child node or a same-level node of a last decision node performing feature splitting in the to-be-trained decision tree; repeating the steps of selecting a training feature indicating a current local optimal split and guiding the current decision node to perform feature splitting until the preset split end condition is met to train the to-be-trained decision tree.
3. A media content identification method characterized by, The method comprises: acquiring to-be-processed media content; determining multi-dimensional features corresponding to the to-be-processed media content; Inputting the multi-dimensional feature, using the decision model of claim 1 or 2 to obtain an identification result of the to-be-processed media content, the identification result indicating a relationship between the to-be-processed media content and the abnormal classification content.
4. The method of claim 3, wherein, The process of obtaining the identification result of the to-be-processed media content comprises the following steps: Respectively using at least two random forests in the decision model to predict the multi-dimensional feature; Based on the prediction result of each random forest, the identification result of the to-be-processed media content is generated, the prediction result being determined based on the classification result of each decision tree in the random forest, the classification result being determined based on the multi-dimensional feature, starting from the root node of the decision tree to access until reaching the corresponding leaf node.
5. The method of claim 3, wherein, The process of obtaining the identification result of the to-be-processed media content comprises the following steps: Using at least two layers of classification structures in the decision model to process the multi-dimensional feature layer by layer to obtain the identification result of the to-be-processed media content, the input of the next layer of classification structure being determined by the output and input of the adjacent previous layer of classification structure, the output of each layer of classification structure being determined based on the prediction result of each random forest, the prediction result being determined based on the classification result of each decision tree in the random forest, the classification result being determined based on the multi-dimensional feature, starting from the root node of the decision tree to access until reaching the corresponding leaf node.
6. The method of claim 3, wherein, The method further comprises: When the to-be-processed media content belongs to the abnormal classification content, marking the to-be-processed media content as abnormal, the abnormal marking being used to indicate reducing the recommendation weight of the to-be-processed media content or excluding the to-be-processed media content from being used as a candidate cover.
7. The method of claim 3, wherein, The determination of the multi-dimensional feature corresponding to the to-be-processed media content comprises: Using a preset image feature extraction model to obtain the image class feature corresponding to the to-be-processed media content, the preset image feature extraction model being obtained by training an initial model using a transfer model; Using a preset text feature extraction model to obtain the text class feature corresponding to the to-be-processed media content, the preset text feature extraction model being obtained by training an initial model using a bidirectional encoder representation model based on a transformer; Based on the image class feature and the text class feature, the multi-dimensional feature is obtained.
8. A model training device for media content recognition, characterized in that, The device comprises: A set acquisition module is configured to acquire a set of media content samples and a set of multi-dimensional features, the set of multi-dimensional features being constructed based on the multi-dimensional feature corresponding to each media content sample in the set of media content samples, the media content sample carrying a label indicating whether it belongs to an abnormal classification content; A set determination module is configured to, when training a to-be-trained decision tree, determine a set of training samples participating in the training based on the set of media content samples, and determine a set of training features participating in the training based on the set of multi-dimensional features; The decision tree construction module is configured to determine an optimal split rule meeting a preset split requirement based on the set of training samples and the set of training features, and train the decision tree to be trained based on the optimal split rule to obtain a first decision tree. The decision model construction module is configured to repeat the steps of determining the set of training samples participating in training and obtaining the first decision tree, and construct at least two random forests based on a plurality of the first decision trees to obtain a decision model. The decision model construction module is configured to determine an optimal split rule meeting a preset split requirement based on the set of training samples and the set of training features, and train the decision tree to be trained based on the optimal split rule to obtain a first decision tree.
9. The apparatus of claim 8, wherein: The preset split requirement comprises a preset split evaluation parameter and a preset split end condition, and the preset split evaluation parameter comprises at least one of information gain and Gini coefficient. The decision tree construction module is further configured to select a training feature indicating a current local optimal split from the set of training features, and generate a local optimal split rule based on the selected training feature, the current local optimal split being determined based on the set of training samples and the preset split evaluation parameter; establish an association between the local optimal split rule and a current decision node to guide the current decision node to perform feature splitting, the current decision node being a child node or a same-level node of a last decision node performing feature splitting in the decision tree to be trained; and repeat the steps of selecting a training feature indicating a current local optimal split and guiding the current decision node to perform feature splitting until the preset split end condition is met to train the decision tree to be trained.
10. A media content identification apparatus, characterized by, The apparatus comprises: A media content acquisition module configured to acquire media content to be processed; A feature determination module configured to determine a plurality of dimensional features corresponding to the media content to be processed; An identification module configured to obtain an identification result of the media content to be processed by taking the plurality of dimensional features as input and using the decision model of claim 1 or 2, the identification result indicating a relationship between the media content to be processed and abnormal classification content.
11. The apparatus of claim 10, wherein, The process of obtaining the identification result of the media content to be processed comprises the following steps: Respectively predict the plurality of dimensional features by using at least two random forests in the decision model; The identification result of the media content to be processed is generated based on a prediction result of each of the random forests, the prediction result being determined based on classification results of respective decision trees in the random forest, the classification result being determined based on the multi-dimensional features and starting from a root node of the decision tree to reach a corresponding leaf node.
12. The apparatus of claim 10, wherein, The process of obtaining the identification result of the media content to be processed comprises the following steps: The multi-dimensional features are processed layer by layer using at least two layers of classification structures in the decision model to obtain the identification result of the media content to be processed, an input of a next layer of classification structure being determined based on an output and an input of an adjacent previous layer of classification structure, and an output of each layer of classification structure being determined based on prediction results of respective random forests, the prediction result being determined based on classification results of respective decision trees in the random forest, the classification result being determined based on the multi-dimensional features and starting from a root node of the decision tree to reach a corresponding leaf node.
13. The apparatus of claim 10, wherein, The device is further configured to: when the media content to be processed belongs to an abnormal classification content, marking the media content to be processed as abnormal, the abnormal marking being used to indicate that a recommendation weight of the media content to be processed is reduced or the media content to be processed is excluded from being used as a candidate cover.
14. The apparatus of claim 10, wherein, The feature determination module is further configured to: determine an image class feature corresponding to the media content to be processed using a preset image feature extraction model, the preset image feature extraction model being obtained by training a transfer model as an initial model; determine a text class feature corresponding to the media content to be processed using a preset text feature extraction model, the preset text feature extraction model being obtained by training a bidirectional encoder representation model based on a transformer as an initial model; and obtain the multi-dimensional features based on the image class feature and the text class feature.
15. An electronic device, comprising: The electronic device comprises a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the model training method for media content identification according to any one of claims 1 to 2 or the media content identification method according to any one of claims 3 to 7.
16. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the model training method for media content identification according to any one of claims 1 to 2 or the media content identification method according to any one of claims 3 to 7.
17. A computer program product, characterised in that, The computer program product comprises at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the model training method for media content identification according to any one of claims 1 to 2 or the media content identification method according to any one of claims 3 to 7.
Citation Information
Patent Citations
Decision model training method, prediction method and device based on longitudinal federation learning
CN111598186A
multi-modal feature-fused false message detection method and device
CN113283535A