CN115293272A - Training method and device for content audit model - Google Patents

Training method and device for content audit model Download PDF

Info

Publication number
CN115293272A
CN115293272A CN202210960677.4A CN202210960677A CN115293272A CN 115293272 A CN115293272 A CN 115293272A CN 202210960677 A CN202210960677 A CN 202210960677A CN 115293272 A CN115293272 A CN 115293272A
Authority
CN
China
Prior art keywords
content
audit
model
auditing
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210960677.4A
Other languages
Chinese (zh)
Inventor
李博
郝彦超
刘晓龙
陈曦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202210960677.4A priority Critical patent/CN115293272A/en
Publication of CN115293272A publication Critical patent/CN115293272A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • G06N20/20Ensemble learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Electrically Operated Instructional Devices (AREA)

Abstract

The application provides a training method, a device, equipment, a storage medium and a computer program product of a content audit model; the method comprises the following steps: performing compliance prediction on at least one piece of content to be audited through a content auditing model to obtain a prediction auditing result of each piece of content to be audited; determining the prediction difficulty score of the content to be audited based on the prediction audit result aiming at each content to be audited; screening at least one piece of content to be audited to obtain target audit content with the prediction difficulty score meeting the difficulty score condition; training the content auditing model by taking the target auditing content as a sample and taking an actual auditing result of the target auditing content as a sample label of the sample so as to update the content auditing model; by the method and the device, the training cost of the content auditing model can be reduced, and the training speed and the content auditing accuracy of the content auditing model are improved.

Description

Training method and device for content audit model
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to a method, an apparatus, a device, a storage medium, and a computer program product for training a content audit model.
Background
Artificial Intelligence (AI) is a comprehensive technique in computer science, and by studying the design principles and implementation methods of various intelligent machines, the machines have the functions of perception, reasoning and decision making. The artificial intelligence technology is a comprehensive subject, and relates to a wide range of fields, for example, natural language processing technology and machine learning/deep learning and other directions.
Content auditing is also an important application direction of artificial intelligence. In the related art, content auditing is usually performed by using a content auditing model which is trained in advance, but the training of the content auditing model is completed in advance, a large number of training samples need to be constructed and labeled, and the acquisition of unqualified content samples is very difficult, so that the model training cost is very high, the model iteration period is long, the content auditing model is fixed, and the auditing accuracy for complex and variable contents to be audited is not high.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment, a storage medium and a computer program product for training a content audit model, which can reduce the training cost of the content audit model and improve the training speed and the content audit accuracy of the content audit model.
The technical scheme of the embodiment of the application is realized as follows:
the embodiment of the application provides a training method of a content audit model, which comprises the following steps:
performing compliance prediction on at least one piece of content to be audited through a content auditing model to obtain a prediction auditing result of each piece of content to be audited;
for each content to be audited, determining a forecast difficulty score of the content to be audited based on the forecast audit result;
the prediction difficulty score is used for indicating the difficulty degree of predicting the content to be audited through the content auditing model to obtain an accurate prediction result;
screening the at least one piece of content to be audited to obtain target audit content with the prediction difficulty score meeting the difficulty score condition, and obtaining an actual audit result of the target audit content;
and training the content auditing model by taking the target auditing content as a sample and taking the actual auditing result of the target auditing content as a sample label of the sample so as to update the content auditing model.
In the above scheme, the training the content audit model by using the target audit content as a sample and using the actual audit result of the target audit content as a sample label of the sample includes:
acquiring a first audit content sample and a second audit content sample, wherein the first audit sample carries a label, and the second audit content sample does not carry a label;
taking the target audit content as a sample, taking an actual audit result of the target audit content as a sample label of the sample, and training the content audit model by combining the first audit content sample to obtain an intermediate content audit model;
and training the number of target rounds of the intermediate content auditing model by adopting the second auditing content sample.
In the foregoing solution, the number of target rounds is k, where k is an integer greater than 0, and the training of the number of target rounds on the intermediate content audit model by using the second audit content sample includes:
predicting the second audit content sample through the intermediate content audit model aiming at the 1 st round of training in the k rounds of training to obtain a first prediction result, and taking the first prediction result as a first sample label of the second audit content sample;
training the intermediate content auditing model based on the second audited content sample carrying the first sample label to obtain a first content auditing model trained in the 1 st round of the k rounds of training;
for the nth training in the k training rounds, predicting the second audit content sample through the first content audit model of the (n-1) th training round to obtain a second prediction result, and taking the second prediction result as a second sample label of the second audit content sample;
training the first content auditing model of the (n-1) th round of training based on the second audited content sample carrying the second sample label to obtain the first content auditing model of the (n-1) th round of training in the k rounds of training, wherein n is an integer greater than 1 and less than or equal to k;
and traversing the n to obtain a first content auditing model of the kth round of training.
In the foregoing solution, the intermediate content audit model includes a plurality of sub content audit models, and the predicting the second audit content sample by the intermediate content audit model to obtain a first prediction result includes:
predicting the second audit content sample through at least two target sub-content audit models in the plurality of sub-content audit models respectively to obtain a sub-model prediction result of each target sub-content audit model;
acquiring a weight value of each target sub-content auditing model;
and carrying out weighted average processing on the sub-model prediction results of at least two target sub-content auditing models based on the weight value of each target sub-content auditing model to obtain the first prediction result.
The embodiment of the present application further provides a training apparatus for a content audit model, including:
the prediction module is used for performing compliance prediction on at least one piece of content to be audited through the content auditing model to obtain a prediction auditing result of each piece of content to be audited;
the determining module is used for determining the prediction difficulty score of the content to be audited based on the prediction auditing result aiming at each content to be audited; the prediction difficulty score is used for indicating the difficulty degree of predicting the content to be audited through the content auditing model so as to obtain an accurate prediction result;
the screening module is used for screening and obtaining target audit contents with prediction difficulty scores meeting the difficulty score condition from the at least one piece of content to be audited, and obtaining the actual audit results of the target audit contents;
and the training module is used for training the content audit model by taking the target audit content as a sample and taking the actual audit result of the target audit content as a sample label of the sample so as to update the content audit model.
In the above solution, the prediction module is further configured to obtain a generation time point of each content to be audited; inputting the at least one piece of content to be audited to the content auditing model in batches according to the sequence of the generation time points; and sequentially carrying out compliance prediction on the contents to be audited in each batch through the content auditing model to obtain a prediction auditing result of each content to be audited, wherein each batch comprises a target number of contents to be audited.
In the foregoing solution, the content audit model includes a plurality of sub-content audit models, and the prediction module is further configured to, for each content to be audited, respectively perform the following processing: performing compliance prediction on the to-be-audited content through each sub-content audit model to obtain an intermediate prediction audit result of each sub-content audit model; aiming at each sub-content auditing model, acquiring a prediction accurate score of the sub-content auditing model, and taking the prediction accurate score as a weighted value of the sub-content auditing model; the prediction accuracy score is used for indicating the accuracy degree of the intermediate prediction auditing result of the corresponding sub-content auditing model; and weighting the intermediate prediction auditing results of the plurality of sub-content auditing models based on the weight values of the sub-content auditing models to obtain the prediction auditing result of the content to be audited.
In the above solution, the content auditing model is used for performing classification prediction of at least two categories, and the prediction auditing result includes: the probability value of the content to be audited belonging to each category; the determining module is further configured to determine, based on the probability value that the content to be checked belongs to each category, an information entropy value corresponding to the content to be checked, and use the information entropy value as a prediction difficulty score of the content to be checked.
In the above solution, the content audit model includes a first number of sub-content audit models, the prediction audit result includes a middle prediction audit result of each sub-content audit model, and the sub-content audit model is used for performing classification prediction of at least two categories; the determining module is further configured to obtain, for each of the categories, a second number of the sub-content audit models of the category indicated by the intermediate prediction audit result, from among the first number of sub-content audit models; and determining the prediction difficulty score of the content to be audited based on the first quantity and the second quantity corresponding to each category.
In the foregoing scheme, the screening module is further configured to select, from the at least one piece of content to be audited, a content to be audited whose predicted difficulty score reaches a first difficulty score threshold value as the target audit content.
In the above scheme, the screening module is further configured to sort the at least one piece of content to be audited in a descending order based on the prediction difficulty score; and selecting the contents to be checked with the target quantity ranked at the top from the at least one piece of sorted contents to be checked as the target checking contents.
In the above scheme, when the number of the target audit contents is multiple, the screening module is further configured to determine, for each target audit content, an object audit score of the target audit content based on a prediction difficulty score of the target audit content, where the object audit score is used to indicate a possible degree of object audit performed on the target audit content; determining target audit content with the object audit score reaching the audit score threshold value as object audit content; correspondingly, the screening module is further configured to obtain an actual audit result of the object audit content; correspondingly, the training module is further configured to train the content audit model by using the object audit content as a sample and using an actual audit result of the object audit content as a sample label of the sample.
In the foregoing solution, the screening module is further configured to, when the predicted difficulty score is lower than a second difficulty score threshold, take a product of the predicted difficulty score and an object review proportion of the object review as an object review score of the target review content; and when the predicted difficulty score is not lower than the second difficulty score threshold, determining the object audit score of the target audit content as a target score, wherein the target score is used for indicating to execute the operation of determining the target audit content as the object audit content.
In the above scheme, the screening module is further configured to obtain a scheduled content audit amount and a remaining content audit amount in a target time period, and use a ratio of the remaining content audit amount to the scheduled content audit amount as a time period audit proportion of the target time period; correspondingly, the screening module is further configured to use a product of the prediction difficulty score, the object review proportion and the time period review proportion as an object review score of the target review content; correspondingly, the screening module is further configured to determine that the object audit score of the target audit content is a product of the target score and the time interval audit proportion.
In the above scheme, the training module is further configured to determine a first audit content from the target audit content, where a predicted audit result of the first audit content is different from an actual audit result of the first audit content; performing data enhancement processing on the first audit content to obtain second audit content, and taking an actual audit result of the first audit content as an actual audit result of the second audit content; and taking the target audit content and the second audit content as the sample, and taking an actual audit result of the target audit content and an actual audit result of the second audit content as sample labels of the sample, and training the content audit model.
In the above scheme, the training module is further configured to obtain a first audit content sample and a second audit content sample, where the first audit content sample carries a label and the second audit content sample does not carry a label; taking the target audit content as a sample, taking an actual audit result of the target audit content as a sample label of the sample, and training the content audit model by combining the first audit content sample to obtain an intermediate content audit model; and training the number of target rounds of the intermediate content auditing model by adopting the second auditing content sample.
In the above scheme, the number of target rounds is k, where k is an integer greater than 0, and the training module is further configured to predict the second audit content sample through the intermediate content audit model for a 1 st round of training in the k rounds of training to obtain a first prediction result, and use the first prediction result as a first sample label of the second audit content sample; training the intermediate content auditing model based on the second audited content sample carrying the first sample label to obtain a first content auditing model trained in the 1 st round of the k rounds of training; for the nth training in the k training rounds, predicting the second audit content sample through the first content audit model of the (n-1) th training round to obtain a second prediction result, and taking the second prediction result as a second sample label of the second audit content sample; training the first content auditing model of the (n-1) th training round based on the second audited content sample carrying the second sample label to obtain the first content auditing model of the (n-1) th training round in the k-round training, wherein n is an integer which is more than 1 and less than or equal to k; and traversing the n to obtain a first content auditing model of the kth round of training.
In the above scheme, the intermediate content auditing model includes a plurality of sub-content auditing models, and the training module is further configured to predict the second audited content sample through at least two target sub-content auditing models in the plurality of sub-content auditing models, respectively, to obtain a sub-model prediction result of each target sub-content auditing model; acquiring a weight value of each target sub-content auditing model; and carrying out weighted average processing on the sub-model prediction results of at least two target sub-content auditing models based on the weight value of each target sub-content auditing model to obtain the first prediction result.
In the above scheme, the training module is further configured to obtain a test audit content sample, where the test audit content sample carries a test sample label; predicting the test audit content sample through a target content audit model obtained by training the content audit model to obtain a test prediction result; determining a prediction accuracy score of the target content auditing model based on the test prediction result and the test sample label, wherein the prediction accuracy score is used for indicating the accuracy degree of the test prediction result; and when the predicted accuracy score exceeds an accuracy score threshold value, updating the content auditing model by adopting the target content auditing model so as to update the content auditing model.
An embodiment of the present application further provides an electronic device, including:
a memory for storing computer executable instructions;
and the processor is used for implementing the training method of the content auditing model provided by the embodiment of the application when executing the computer executable instructions stored in the memory.
The embodiment of the present application further provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, the method for training a content audit model provided in the embodiment of the present application is implemented.
The embodiment of the present application further provides a computer program product, which includes a computer program or a computer executable instruction, and when the computer program or the computer executable instruction is executed by a processor, the method for training a content audit model provided in the embodiment of the present application is implemented.
The embodiment of the application has the following beneficial effects:
firstly, content auditing is carried out on the content to be audited through a content auditing model, and training of the content auditing model is realized based on target auditing content in the content to be audited. Therefore, the content auditing model can be trained while the content is audited, a training set (including a constructed sample and a labeled sample label) required by model training does not need to be additionally constructed, and the model training cost is reduced.
And secondly, after the contents to be audited are audited through the content audit model, screening target audit contents with prediction difficulty scores meeting the difficulty score condition from at least one content to be audited based on the prediction difficulty scores of the content audit model aiming at the contents to be audited. Thus, in the aspect of content review, 1) if the target review content is manually reviewed to obtain an actual review result (i.e., a manual review result), the manual review amount can be reduced, and the manual review cost can be reduced. Namely, the machine audit of the content to be audited can be realized, the manual audit of the target audit content with the prediction difficulty score meeting the difficulty score condition can be realized, the manual audit cost is reduced and the content audit efficiency is improved by a man-machine cooperation audit mode while the manual audit amount is reduced; 2) In the aspect of model training, marking of a large number of training samples is not needed, and only the target audit content with the prediction difficulty score meeting the difficulty score condition is marked, so that the model training speed is increased, and the timeliness is improved.
Thirdly, with the progress of the model training process, the prediction capability of the obtained content auditing model is stronger and stronger, the prediction difficulty score for the content to be audited is also reduced, and the target auditing content screened based on the prediction difficulty score can be fewer and fewer, so that the labeling cost is further reduced (namely the target auditing content required to obtain the actual auditing result is reduced) and the model training speed is improved.
And fourthly, the model can be optimized and updated according to the content to be audited generated in real time, so that the trained content audit model is more flexible, the method can adapt to the complex and changeable content to be audited, and the audit accuracy of content audit based on the model is improved.
Drawings
Fig. 1 is a schematic architecture diagram of a training system 100 for a content audit model provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of an electronic device 500 implementing a training method for a content audit model according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating a method for training a content audit model according to an embodiment of the present disclosure;
FIG. 4 is a flowchart illustrating a method for training a content audit model according to an embodiment of the present disclosure;
FIG. 5 is a flowchart illustrating a method for training a content audit model according to an embodiment of the present disclosure;
FIG. 6 is a flowchart illustrating a method for training a content audit model according to an embodiment of the present disclosure;
fig. 7 is a flowchart illustrating a training method for a content audit model according to an embodiment of the present application;
FIG. 8 is a schematic diagram of an architecture of a content audit framework for human-computer collaboration provided in an embodiment of the present application;
fig. 9 is a schematic training diagram of a content audit model provided in an embodiment of the present application.
Detailed Description
In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be described in further detail with reference to the attached drawings, the described embodiments should not be considered as limiting the present application, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
In the following description, references to the terms "first \ second \ third" are only to distinguish similar objects and do not denote a particular order, but rather the terms "first \ second \ third" are used to interchange specific orders or sequences, where appropriate, so as to enable the embodiments of the application described herein to be practiced in other than the order shown or described herein.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the present application only and is not intended to be limiting of the application.
Before further detailed description of the embodiments of the present application, terms and expressions referred to in the embodiments of the present application will be described, and the terms and expressions referred to in the embodiments of the present application will be used for the following explanation.
1) A client, an application program running in the terminal for providing various services, such as a content client.
2) In response to indicating a condition or state on which the performed operation depends, one or more of the performed operations may be in real-time or may have a set delay when the dependent condition or state is satisfied; there is no restriction on the order of execution of the operations performed unless otherwise specified.
3) Active Learning: the method is a sub-field of machine learning, and is also called as query learning or optimal experimental design in the field of statistics. The active learning tries to solve the labeling bottleneck of the samples, and the most valuable unlabeled samples are actively selected in priority to be labeled, so that the expected performance of the model is achieved by using as few labeled samples as possible.
4) Uncertain samples: sample data which is difficult to distinguish in the model and sample data with low model confidence coefficient.
5) Integrated learning: also known as a multi-classifier system, committee-based learning, and the like. The basic idea is to combine multiple learners to achieve a learner with better generalization performance than a single learner.
6) Semi-Supervised Learning (SSL): the method is a key problem in the research in the field of pattern recognition and machine learning, and is a learning method combining supervised learning and unsupervised learning. Semi-supervised learning uses large amounts of unlabeled data, and simultaneously labeled data, to perform pattern recognition operations. When semi-supervised learning is used, it is generally desirable to have as few personnel as possible to do the work, while at the same time providing a relatively high degree of accuracy.
7) And (3) distillation learning: a soft-target related to a teacher network (complex but excellent reasoning performance) is introduced to be used as a part of the total loss so as to induce the training of a student network (simple and low-complexity) and realize knowledge transfer (knowledge transfer), thereby achieving a model effect with less model parameters and better generalization.
8) Incremental learning: means that a learning system can continuously learn new knowledge from new samples and can save most of the previously learned knowledge.
9) Cold starting of the model: refers to the process of building a business model (e.g., a content audit model) from 0 to 1 with no or little training data.
The embodiment of the application provides a method, a device, equipment, a storage medium and a computer program product for training a content audit model, which can reduce the training cost of the content audit model and improve the training speed and the content audit accuracy of the content audit model.
An implementation scenario of the training method for the content audit model provided in the embodiment of the present application is described below. Referring to fig. 1, fig. 1 is a schematic architecture diagram of a training system 100 for a content audit model provided in an embodiment of the present application, in order to support an exemplary application, a terminal 400 is connected to a server 200 through a network 300, where the network 300 may be a wide area network or a local area network, or a combination of the two, and data transmission is implemented using a wireless or wired link.
Terminals 400 (including at least one terminal, each of which may be provided with a content distribution client) for transmitting a content to the server 200 in response to a confirmation distribution instruction for the content;
the server 200 is configured to receive at least one piece of content sent by the terminal 400, and determine the at least one piece of content as a content to be audited; performing compliance prediction on at least one piece of content to be audited through a content auditing model to obtain a prediction auditing result of each piece of content to be audited; aiming at each content to be audited, determining a prediction difficulty score of the content to be audited based on a prediction audit result, wherein the prediction difficulty score is used for indicating the difficulty degree of predicting the content to be audited through a content audit model so as to obtain an accurate prediction result; screening target audit contents with prediction difficulty scores meeting the difficulty score condition from at least one piece of content to be audited, and acquiring actual audit results of the target audit contents;
in practical application, the predicted auditing result and the actual auditing result can be determined as the auditing result of the corresponding content to be audited, and the auditing result is used for indicating whether the content to be audited is in compliance; processing the content to be checked according to the checking result, if the checking result represents that the content to be checked is not compliant, intercepting the content to be checked to prohibit the content to be checked from being issued, and returning a notification message that the content is not compliant to the terminal 400, and if the checking result represents that the content to be checked is compliant, issuing the content to be checked, and returning a notification message that the content is compliant to the terminal 400;
the server 200 is further configured to train the content audit model by using the target audit content as a sample and using an actual audit result of the target audit content as a sample label of the sample to obtain a target content audit model; and updating the content auditing model by adopting the target content auditing model so as to predict the compliance through the updated content auditing model. In practical application, the training method of the content auditing model provided by the embodiment of the application can be circularly executed according to the content to be audited generated in real time, so that iterative training is performed on the content auditing model, the auditing accuracy of the content auditing model is improved, and the manual auditing cost is reduced.
The terminal 400 is further configured to receive and display a notification message returned by the server 200.
In some embodiments, the training method for the content audit model provided in this embodiment of the present application may be implemented by various electronic devices, for example, the training method may be implemented by a terminal alone, or by a server alone, or by a terminal and a server in cooperation. For example, the terminal alone executes the method for training the content audit model provided in the embodiment of the present application. The embodiment of the application can be applied to various scenes, including but not limited to cloud technology, artificial intelligence, intelligent traffic, driving assistance and the like.
In some embodiments, the electronic device implementing the training of the content auditing model provided in the embodiments of the present application may be various types of terminal devices or servers. The server (e.g., server 200) may be an independent physical server, or may be a server cluster or distributed system formed by a plurality of physical servers. The terminal (e.g., terminal 400) may be, but is not limited to, a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart voice interaction device (e.g., smart speaker), a smart appliance (e.g., smart tv), a smart watch, a vehicle-mounted terminal, and the like. The terminal and the server may be directly or indirectly connected through wired or wireless communication, which is not limited in this embodiment of the application.
In some embodiments, the training method of the content audit model provided in the embodiments of the present application may be implemented by means of Cloud Technology (Cloud Technology), which refers to a hosting Technology for unifying series resources such as hardware, software, and network in a wide area network or a local area network to implement computation, storage, processing, and sharing of data. The cloud technology is a general term of network technology, information technology, integration technology, management platform technology, application technology and the like applied based on a cloud computing business model, can form a resource pool, is used as required, and is flexible and convenient. Cloud computing technology will become an important support. Background services of the technical network system require a large amount of computing and storage resources. By way of example, a server (e.g., server 200) may also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, web services, cloud communications, middleware services, domain name services, security services, CDNs, and big data and artificial intelligence platforms.
In some embodiments, the terminal or the server may implement the training method of the content auditing model provided in the embodiments of the present application by running a computer program, for example, the computer program may be a native program or a software module in an operating system; can be a local (Native) Application program (APP), i.e. a program that needs to be installed in an operating system to run; or may be an applet, i.e. a program that can be run only by downloading it to the browser environment; but also an applet that can be embedded into any APP. In general, the computer programs described above may be any form of application, module or plug-in.
In some embodiments, multiple servers may be grouped into a blockchain, and a server is a node on the blockchain, and there may be an information connection between each node in the blockchain, and information transmission between nodes may be performed through the information connection. Data (for example, the content audit model, the sample tag, and the like) related to the training method of the content audit model provided in the embodiment of the present application may be stored in the block chain.
The following describes an electronic device implementing a training method for a content audit model according to an embodiment of the present application. Referring to fig. 2, fig. 2 is a schematic structural diagram of an electronic device 500 implementing a training method for a content audit model according to an embodiment of the present application. Taking the electronic device 500 as the server shown in fig. 1 as an example, the electronic device 500 implementing the training method for the content audit model according to the embodiment of the present application includes: at least one processor 510, memory 550, at least one network interface 520, and a user interface 530. The various components in the electronic device 500 are coupled together by a bus system 540. It is understood that the bus system 540 is used to enable communications among the components. The bus system 540 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 540 in fig. 2.
The Processor 510 may be an integrated circuit chip having Signal processing capabilities, such as a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like, wherein the general purpose Processor may be a microprocessor or any conventional Processor, or the like.
The memory 550 may be removable, non-removable, or a combination thereof. Memory 550 optionally includes one or more storage devices physically located remote from processor 510. The memory 550 may include either volatile memory or nonvolatile memory, and may also include both volatile and nonvolatile memory. The non-volatile Memory may be a Read Only Memory (ROM), and the volatile Memory may be a Random Access Memory (RAM). The memory 550 described in embodiments herein is intended to comprise any suitable type of memory.
In some embodiments, memory 550 can store data to support various operations, examples of which include programs, modules, and data structures, or subsets or supersets thereof, as exemplified below.
An operating system 551 including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
a network communication module 552 for communicating with other electronic devices via one or more (wired or wireless) network interfaces 520, exemplary network interfaces 520 including: bluetooth, wireless compatibility authentication (WiFi), and Universal Serial Bus (USB), etc.;
in some embodiments, the training apparatus for content audit model provided in this application embodiment may be implemented in software, and fig. 2 illustrates the training apparatus 553 for content audit model stored in the memory 550, which may be software in the form of programs and plug-ins, and includes the following software modules: prediction module 5531, determination module 5532, screening module 5533, training module 5534, and update module 5535, which are logical and thus can be combined or further split in any combination depending on the functionality implemented, the functionality of each of which will be described below.
The following describes a method for training a content audit model provided in an embodiment of the present application. In some embodiments, the training method for the content audit model provided in this embodiment of the present application may be implemented by various electronic devices, for example, the training method may be implemented by a terminal alone, or by a server alone, or by a terminal and a server in cooperation. Taking a server as an example, referring to fig. 3, fig. 3 is a schematic flow chart of a training method of a content audit model provided in an embodiment of the present application, where the training method of the content audit model provided in the embodiment of the present application includes:
step 101: and the server performs compliance prediction on at least one piece of content to be audited through the content auditing model to obtain the prediction auditing result of each piece of content to be audited.
In step 101, the content audit model may be an initially constructed content audit model, or may be obtained by training based on a small number of content samples (carrying manually labeled tags, that is, audit results of manual audit performed on the content samples). In actual implementation, a model cold start process may be performed, creating the content audit model with no or a small number of training samples.
In step 101, the at least one piece of content to be audited may be content sent by the user in real time, or may be content sent by the user within a period of time. The content may be media information such as news, music, short video, long video, pictures, text, etc. Because a large amount of information such as graphics, video, audio, comments, barrage, and the like exists in the content, in practical applications, the content generally needs to be checked to determine whether the content meets relevant regulations, so as to determine whether to perform operations such as content delivery, release, and the like.
In step 101, when the server obtains at least one piece of content to be audited generated by the user, compliance prediction is performed on the at least one piece of content to be audited, so as to obtain a prediction audit result of each piece of content to be audited. In practical applications, compliance refers to compliance with relevant regulations established, which may be established for the legitimacy, quality, subject matter, security, etc. of the content. The prediction audit results can be seen in the following examples: 1) Judging black, namely identifying that the content to be audited contains harmful components (namely, non-compliant content); 2) Judging the white content, and identifying that the content to be audited does not contain harmful components; 3) And judging grey, and identifying that the content to be audited may contain harmful components.
In some embodiments, the number of the contents to be audited generally has a fluctuating characteristic, that is, the number of the contents to be audited is different at different times, so that in order to enable efficient utilization of model prediction computing resources, at least one piece of the contents to be audited can be subjected to prediction processing in batches, and a target number of the contents to be audited to be processed is set for each batch. Namely, the server can perform compliance prediction on at least one piece of content to be audited through the content auditing model in the following way, so as to obtain the predicted auditing result of each piece of content to be audited: acquiring the generation time point of each content to be checked; inputting at least one piece of content to be checked into the content checking model in batches according to the sequence of the generation time points; and sequentially carrying out compliance prediction on the contents to be audited of each batch through the content auditing model to obtain a prediction auditing result of each content to be audited, wherein the batch comprises the target number of the contents to be audited.
In some embodiments, the content audit model may include a plurality of sub-content audit models. Based on this, referring to fig. 4, fig. 4 is a flowchart illustrating a training method of a content audit model provided in an embodiment of the present application, and fig. 4 shows that step 101 in fig. 3 can be implemented by steps 1011 to 1013: and respectively executing the following processing aiming at each content to be audited: step 1011, performing compliance prediction on the contents to be audited through each sub-content audit model to obtain an intermediate prediction audit result of each sub-content audit model; step 1012, aiming at each sub-content auditing model, acquiring the prediction accuracy score of the sub-content auditing model, and taking the prediction accuracy score as the weight value of the sub-content auditing model; the prediction accuracy score is used for indicating the accuracy degree of the intermediate prediction auditing result of the corresponding sub-content auditing model; and 1013, weighting the intermediate prediction and audit results of the plurality of sub-content audit models based on the weight values of the sub-content audit models to obtain the prediction and audit results of the content to be audited.
In practical application, the content audit model may be constructed in an ensemble learning manner, that is, the content audit model is defined to include a plurality of sub-content audit models. In step 1012, the prediction accuracy score may be represented by an accuracy rate of the sub-content audit model, that is, when an audit content sample set (including a plurality of audit content samples, each audit content sample carrying a sample label) is predicted based on the sub-content audit model and a prediction result is obtained, the accuracy rate of the sub-content audit model may be determined based on the prediction result and the sample label, for example, a ratio between the number of the audit content samples having the same prediction result and sample labels and the total number of the audit content samples is used as the accuracy rate of the sub-content audit model. In step 1013, the weighting process may be a weighted average process or a weighted sum process.
Step 102: and determining the prediction difficulty score of the content to be audited based on the prediction audit result aiming at each content to be audited.
The prediction difficulty score is used for indicating the difficulty degree of predicting the content to be checked through the content checking model so as to obtain an accurate prediction result.
In step 102, for each content to be audited, a prediction difficulty score of the content to be audited is determined based on a prediction audit result of the content to be audited. The prediction difficulty score is used for predicting the content to be checked through the content checking model so as to obtain the difficulty degree of an accurate prediction result. It should be noted that, when the difference between the predicted audit result and the actual audit result of the content to be audited is lower than the difference threshold, or the predicted audit result is the same as the actual audit result of the content to be audited, the predicted audit result is an accurate prediction result. The predicted difficulty score can be represented by information entropy, a corresponding difficulty score can be set according to the difference, and the difficulty score corresponding to the difference between the predicted auditing result and the actual auditing result is used as the predicted difficulty score.
In step 102, the higher the prediction difficulty score is, the higher the difficulty representing that the content to be checked is predicted by the content checking model to obtain an accurate prediction result is, and meanwhile, the higher the uncertainty representing the content to be checked by the content checking model is. In this way, when the content audit model is trained based on the content to be audited, the content to be audited may be referred to as an uncertain sample for the content audit model. Therefore, part of the contents to be audited can be selected from the at least one piece of contents to be audited based on the prediction difficulty score, and after the selected contents to be audited are audited manually, the content audit model is trained again based on the actual audit result obtained by human audit.
In some embodiments, the content auditing model is used for performing classification prediction of at least two categories, and the prediction auditing result includes probability values of the content to be audited belonging to each category; based on the method, the server can determine the prediction difficulty score of the content to be audited based on the prediction auditing result in the mode: and determining the value of the information entropy corresponding to the content to be audited based on the probability value of the content to be audited belonging to each category, and taking the value of the information entropy as the prediction difficulty score of the content to be audited.
In practical application, the information entropy value corresponding to the content to be checked can be determined based on the probability value of the content to be checked belonging to each category through the following formula (one):
Figure BDA0003792705510000161
where H is the value of the information entropy, P θ (y i | x) is the possibility that the content to be audited x is predicted to be in the ith category (namely the probability value of the content to be audited belonging to the ith category) through the content auditing model theta.
In some embodiments, the content audit model comprises a first number of sub-content audit models, the predicted audit result comprises an intermediate predicted audit result for each sub-content audit model, and the sub-content audit models are used for performing classification prediction of at least two categories; based on the above, the server can determine the predicted difficulty score of the content to be audited based on the predicted auditing result in the manner as follows: aiming at each category, acquiring a second number of the sub-content auditing models of the category indicated by the intermediate prediction auditing result in the first number of sub-content auditing models; and determining the prediction difficulty score of the content to be audited based on the first quantity and the second quantity corresponding to each category.
In practical application, if the contents to be checked are divided into the same category by the plurality of sub-content checking models, the contents to be checked are easy to distinguish, and the uncertainty is small; if the contents to be audited are divided into different categories by the plurality of sub-content auditing models, the contents to be audited are difficult to distinguish, and the uncertainty is large. Thus, based on the first quantity and the second quantity corresponding to each category, the predicted difficulty score of the content to be audited can be determined through the following formula (two):
Figure BDA0003792705510000171
wherein H VE Indicates the predicted difficulty score, y i Denotes the ith class, V (y) i ) The indication of the intermediate prediction auditing result aiming at the content to be audited is y i C represents the total number of models (i.e., the first number) of the sub-content audit models.
In practical application, the server may further determine the predicted difficulty score of the content to be audited based on the first number and the second number corresponding to each category by: determining the ratio of the second quantity to the first quantity corresponding to each category; determining the maximum target ratio from the ratios corresponding to the categories; acquiring a corresponding relation between the maximum ratio and the candidate prediction difficulty score (wherein the larger the maximum ratio is, the smaller the candidate prediction difficulty score is); and determining the candidate prediction difficulty score corresponding to the target ratio as the prediction difficulty score of the content to be audited based on the corresponding relation.
Step 103: and screening the target audit content with the prediction difficulty score meeting the difficulty score condition from the at least one piece of content to be audited, and acquiring an actual audit result of the target audit content.
In step 103, the higher the prediction difficulty score is, the higher the difficulty degree representing that the content to be audited is predicted by the content audit model to obtain an accurate prediction result is, and meanwhile, the higher the uncertainty degree representing the content to be audited by the content audit model is, the more inaccurate the corresponding prediction audit result is. Therefore, based on the predicted difficulty score, the to-be-audited content with the predicted difficulty score meeting the difficulty score condition (for example, the to-be-audited content with the predicted difficulty score reaching the score threshold value and the to-be-audited content with the predicted difficulty score being sorted in descending order before the predicted difficulty score) is selected from the at least one to-be-audited content as the target audit content, and the actual audit result (namely, the manual audit result) of the target audit content is obtained, that is, the selected target audit content is manually audited, so that the actual audit result of the target audit content is obtained. Therefore, the accuracy of content audit is ensured, and in step 104, the content audit model is trained by taking the target audit content as a sample and taking the actual audit result of the target audit content as a sample label, so that the target content audit model with higher audit accuracy than the current content audit model is obtained.
In some embodiments, the server may obtain the target audit content with the predicted difficulty score meeting the difficulty score condition by screening as follows: and selecting the to-be-audited content with the prediction difficulty score reaching the first difficulty score threshold value from at least one to-be-audited content as a target audit content.
In some embodiments, the server may further screen the target audit content with the predicted difficulty score meeting the difficulty score condition by: based on the prediction difficulty score, sequencing at least one piece of content to be audited in a descending order; and selecting the contents to be checked with the target quantity in the top sequence from at least one piece of sorted contents to be checked as target checking contents.
In some embodiments, when the number of the target audit contents is multiple, after the server obtains the target audit contents with the prediction difficulty scores meeting the difficulty score condition through screening, before obtaining the actual audit result of the target audit contents, the server may further screen the obtained target audit contents, so as to reduce the manual audit cost. Specifically, the server may filter the obtained target audit content by: aiming at each target audit content, determining an object audit score of the target audit content based on the prediction difficulty score of the target audit content, wherein the object audit score is used for indicating the possibility degree of object audit on the target audit content; determining target audit content with the object audit score reaching the audit score threshold value as object audit content; correspondingly, when the server obtains the actual audit result of the target audit content, the server obtains the actual audit result of the target audit content; therefore, when the content auditing model is trained, the content auditing model is trained by taking the object auditing content as a sample and taking the actual auditing result of the object auditing content as a sample label of the sample.
In practical application, when the number of the target audit contents is multiple, in order to reduce the manual audit cost, the target audit contents may be further screened, for example, when the number of the target audit contents reaches a number threshold, the target audit contents may be further screened. When the target audit contents are screened, the object audit score of each target audit content can be determined, and the object audit score can be represented by a probability value of object audit (namely, manual audit) performed on the target audit contents. The audit score threshold may be preset, and when the determined object audit score reaches the audit score threshold, the target audit content with the object audit score reaching the audit score threshold is used as the object audit content, so as to perform manual audit on the object audit content, and obtain an actual audit result of the object audit content.
Based on this, the server can only obtain the actual audit result of the object audit content, thereby further reducing the manual audit cost. Correspondingly, the server takes the object audit content as a sample, and takes the actual audit result of the object audit content as a sample label of the sample, and trains the content audit model.
Referring to fig. 5, fig. 5 is a schematic flowchart of a training method for a content audit model according to an embodiment of the present application, including: step 301, screening multiple target audit contents with prediction difficulty scores meeting the difficulty score condition from at least one piece of content to be audited; 302, aiming at each target audit content, determining an object audit score of the target audit content based on the prediction difficulty score of the target audit content; step 303, determining target audit content with the audit score reaching the audit score threshold as object audit content; step 304, obtaining an actual auditing result of the object auditing content; and 305, training the content audit model by taking the object audit content as a sample and taking the actual audit result of the object audit content as a sample label of the sample to obtain a target content audit model.
In some embodiments, the server may determine the object review score for the target review content by: when the predicted difficulty score is lower than a second difficulty score threshold value, taking the product of the predicted difficulty score and the object auditing proportion of the object auditing as the object auditing score of the target auditing content; and when the predicted difficulty score is not lower than the second difficulty score threshold, determining the object audit score of the target audit content as the target score, wherein the target score is used for indicating to execute the operation of determining the target audit content as the object audit content.
In practical applications, a second difficulty score threshold and an object review ratio (i.e., a manual review ratio) may be preset, and it should be noted that the second difficulty score threshold may be greater than the first difficulty score threshold. For target audit content with the prediction difficulty score lower than the second difficulty score threshold, the product of the object audit proportion of the object audit and the prediction difficulty score can be used as the object audit score of the target audit content; and determining the target audit score of the target audit content as a target score, such as 1, aiming at the target audit content with the prediction difficulty score not lower than the second difficulty score threshold, wherein the target score is used for indicating to execute the operation of determining the target audit content with the prediction difficulty score not lower than the second difficulty score threshold as the target audit content.
In practical implementation, the method can be realized by the following formula (three), and the object audit score p of the target audit content is:
Figure BDA0003792705510000201
wherein H VE In order to predict the difficulty score, alpha is a human trial and trial proportion, and epsilon is a difficulty score threshold.
In some embodiments, the server may further control the cost of the manual review based on the time period. The server can obtain the scheduled content auditing amount and the residual content auditing amount of the target time period, and the ratio of the residual content auditing amount to the scheduled content auditing amount is used as the time period auditing proportion of the target time period. Here, the target period of time may be 24 hours, 12 hours, one week, one month, or the like.
Correspondingly, the server can take the product of the prediction difficulty score, the object auditing proportion and the time interval auditing proportion as the object auditing score of the target auditing content; and determining the object auditing score of the target auditing content as the product of the target score and the time interval auditing proportion.
In practical application, taking a target time period as one day (24 hours) as an example, the number of manual audits per day can be controlled to ensure budget, and the object audit score p of the target audit content can be calculated by the following formula (four):
Figure BDA0003792705510000202
wherein, B is daily planned content auditing quantity, B is the remaining content auditing quantity of the current day, and B/B is used for controlling the auditing quantity to balance the labor cost.
Step 104: and training a content audit model by taking the target audit content as a sample and taking the actual audit result of the target audit content as a sample label of the sample so as to update the content audit model.
In step 104, the target audit content is used as a sample, and the actual audit result of the target audit content is used as a sample label of the sample, the content audit model is trained, the content audit model is updated through the target content audit model obtained through training, the updating of the content audit model is realized, and the compliance prediction of the content to be audited is performed based on the updated content audit model. Therefore, the content audit model can be trained while the content audit is carried out, a large number of training samples do not need to be additionally obtained and marked, the manual marking cost is reduced, the training efficiency and the training speed of the content audit model are improved, the timeliness is improved, the content to be audited generated in real time can be optimized and updated, and the content audit model has better adaptability. Further, a target content auditing model is obtained through the training content auditing model, so that the target content auditing model is adopted to update the content auditing model, the content auditing model is updated, and compliance prediction is performed through the updated content auditing model.
In some embodiments, referring to fig. 6, fig. 6 is a flowchart illustrating a method for training a content audit model provided in an embodiment of the present application, and fig. 6 shows that step 104 in fig. 3 may be implemented through steps 1041 to 1043: step 1041, determining a first audit content from the target audit content, wherein a predicted audit result of the first audit content is different from an actual audit result of the first audit content; 1042, performing data enhancement processing on the first audit content to obtain a second audit content, and taking an actual audit result of the first audit content as an actual audit result of the second audit content; and step 1043, taking the target audit content and the second audit content as samples, taking the actual audit result of the target audit content and the actual audit result of the second audit content as sample tags, and training the content audit model to obtain a target content audit model.
Here, data enhancement processing is performed on the target audit content in which the result of the prediction audit (of the content audit model) does not coincide with the result of the manual (actual) audit, so that data with a deviation in prediction can be sufficiently learned in the next stage. In practical application, the data enhancement processing mode can be determined according to a data modality (such as text, image and the like), for example, the data enhancement mode of the text can be repeated sampling, replacement of a similar meaning word, replacement of a sentence sequence and the like; the data enhancement mode of the image can be rotation, expansion, inversion and the like.
In some embodiments, referring to fig. 7, fig. 7 is a flowchart illustrating a training method for a content audit model provided in an embodiment of the present application, and fig. 7 shows that step 104 in fig. 3 can also be implemented through steps 201 to 203: step 201, obtaining a first audit content sample and a second audit content sample, wherein the first audit content sample carries a label, and the second audit content sample does not carry a label; step 202, taking the target audit content as a sample, taking an actual audit result of the target audit content as a sample label of the sample, and training a content audit model by combining the first audit content sample to obtain an intermediate content audit model; and 203, training the intermediate content auditing model by using a second auditing content sample to obtain a target content auditing model.
In step 104, the content audit model may be trained in a semi-supervised learning manner. In order to expand the sample size of the training set, a first audit content sample carrying a tag may be obtained, so that in step 202, the content audit model is trained by taking the target audit content as a sample and taking the actual audit result of the target audit content as a sample tag of the sample, in combination with the first audit content sample, to obtain an intermediate content audit model. Then, in step 203, a second audit content sample which does not carry a label is used for carrying out multiple iterative training on the intermediate content audit model to obtain a target content audit model.
In some embodiments, the target number of rounds is k, k being an integer greater than 0; step 203 may be implemented by steps 2031 to 2035: step 2031, for the 1 st round of training in the k rounds of training, predicting the second audit content sample by the intermediate content audit model to obtain a first prediction result, and using the first prediction result as a first sample label of the second audit content sample; step 2032, training the intermediate content audit model based on a second audit content sample carrying the first sample label to obtain a first content audit model of the 1 st round of training in the k rounds of training; step 2033, for the nth training round in the k training rounds, predicting the second audit content sample through the first content audit model of the (n-1) th training round to obtain a second prediction result, and using the second prediction result as a second sample label of the second audit content sample; step 2034, based on a second audit content sample carrying a second sample label, training the (n-1) th round of trained first content audit model to obtain an (n-1) th round of trained first content audit model in k rounds of training, wherein n is an integer greater than 1 and less than or equal to k; step 2035, traversing n to obtain the first content auditing model of the kth round of training, and using the first content auditing model of the kth round of training as the target content auditing model.
In some embodiments, the intermediate content audit model includes a plurality of sub-content audit models, and the server may predict the second audit content sample through the intermediate content audit model in the following manner to obtain the first prediction result: predicting the second audit content sample through at least two target sub-content audit models in the plurality of sub-content audit models to obtain sub-model prediction results of each target sub-content audit model; acquiring the weight value of each target sub-content auditing model; and carrying out weighted average processing on the sub-model prediction results of at least two target sub-content auditing models based on the weight value of each target sub-content auditing model to obtain a first prediction result. Therefore, the labeling accuracy of the unlabeled second audit content sample can be improved, and the effect of model training through the second audit content sample is improved.
After the target content auditing model is obtained by training the content auditing model in the steps, the content auditing model is updated by the trained target content auditing model, so that the updated content auditing model is used for performing compliance prediction on subsequently generated contents to be audited; meanwhile, the steps 101 to 104 can be continuously and circularly executed, so that the content audit model is iteratively trained and updated in the content audit process, the audit precision of the content audit model is higher and higher, the labor cost is reduced, the training efficiency and the training speed of the content audit model are improved, the content to be audited generated in real time can be optimized and updated, and the content audit model has better adaptability.
In some embodiments, the server may update the content audit model with the target content audit model by: obtaining a test audit content sample, wherein the test audit content sample carries a test sample label; predicting the test audit content sample through a target content audit model to obtain a test prediction result; determining a prediction accuracy score of the target content auditing model based on the test prediction result and the test sample label, wherein the prediction accuracy score is used for indicating the accuracy degree of the test prediction result; and when the predicted accuracy score exceeds the accuracy score threshold value, updating the content auditing model by adopting the target content auditing model.
By applying the embodiment of the application, firstly, the content to be audited is audited through the content audit model, and the training of the content audit model is realized based on the target audit content in the content to be audited. Therefore, the content auditing model can be trained while the content is audited, a training set (including a constructed sample and a labeled sample label) required by model training does not need to be additionally constructed, and the model training cost is reduced.
And secondly, after the contents to be audited are audited through the content audit model, screening target audit contents with the forecasting difficulty scores meeting the difficulty score condition from at least one content to be audited based on the forecasting difficulty scores of the content audit model aiming at each content to be audited. In this way, in the aspect of content review, 1) if the target review content is manually reviewed to obtain an actual review result (that is, a manual review result), the amount of manual review can be reduced, and the manual review cost can be reduced. Namely, the machine audit of the content to be audited can be realized, the manual audit of the target audit content only with the prediction difficulty score meeting the difficulty score condition can also be realized, the manual audit cost is reduced and the content audit efficiency is improved by a man-machine cooperation audit mode while the manual audit amount is reduced; 2) In the aspect of model training, labeling of a large number of training samples is not needed, and only the target audit content with the prediction difficulty score meeting the difficulty score condition is labeled, so that the model training speed is increased, and the timeliness is improved.
Thirdly, with the progress of the model training process, the prediction capability of the obtained content auditing model is stronger and stronger, the prediction difficulty score for the content to be audited is also reduced, and the target auditing content screened based on the prediction difficulty score can be fewer and fewer, so that the labeling cost is further reduced (namely the target auditing content required to obtain the actual auditing result is reduced) and the model training speed is improved.
And fourthly, the model can be optimized and updated according to the content to be audited generated in real time, so that the trained content audit model is more flexible, the method can adapt to the complex and changeable content to be audited, and the audit accuracy of content audit based on the model is improved.
An exemplary application of the embodiments of the present application in a practical application scenario will be described below. With the development and popularization of the internet, more and more contents are presented to users through the internet, and for example, content consumption products (such as news, music, short videos, long videos and other media information) become one of the most important information acquisition channels for users. In practical applications, the content generally needs to be checked to determine whether the content meets relevant regulations, so as to determine whether to perform operations such as content delivery and release.
In the related art, human and machine inspections are generally considered as two parts of the relative fracture, namely: and (4) formulating a label marking standard of the machine review algorithm model through manual experience summary, organizing a marking team to carry out manual data marking, and carrying out training on the machine review algorithm model after the data marking is finished. However, 1) the labor cost of the data labeling standard preparation and data labeling process is huge, and an effective means is lacked to obtain a large number of target harmful samples (i.e. non-compliant content samples), so that a large amount of data needs to be labeled; 2) The iteration cycle of the model is long, and the uncertain samples cannot be efficiently optimized; 3) The model threshold is difficult to determine, the definition of the machine-audited algorithm model to judge ash (whether to be handed to manual review) is fixed, and a flexible mode is lacked to balance the human audit cost and the leakage/false interception risk. Therefore, the problems that training data labeling cost is high, data labeling standards are difficult to define, offline models are poor in timeliness, algorithm thresholds are difficult to set, risks and costs are difficult to balance and the like often exist in the related technology.
Based on this, the embodiments of the present application provide a training method for a content audit model (i.e., a content audit method based on human-computer cooperation of active learning), which effectively integrates and unifies life cycles (training, iteration, and online prediction) of human audit and machine audit algorithms through an active learning theory, so as to at least solve the existing problems. In the embodiment of the application, human review and machine review are unified into one frame, training data of a machine review algorithm is supplemented by using human review results, and data needing human review is selected by using the machine review algorithm, so that human review cost and machine review risk are effectively balanced, and the response speed of a machine review algorithm model (namely the content review model) to uncertain samples is improved. In actual implementation, the machine-trial algorithm generally has three functions: 1) Judging black, identifying that the content to be audited contains harmful components (namely, non-compliant content), and forbidding processing; 2) Judging white, identifying that the content to be audited does not contain harmful components, and performing external processing; 3) Judging ash, identifying that the content to be audited possibly contains harmful components, sending the content to manual audit processing, and generating human audit cost at the moment.
Referring to fig. 8, fig. 8 is a schematic structural diagram of a man-machine collaborative content auditing framework provided in an embodiment of the present application. The man-machine collaborative content auditing framework comprises: (1) online auditing modules; (2) a man-machine cooperation module; and (3) a model iteration module. The modules will be described in detail below.
(1) The online auditing module: the core module for online machine review reasoning is responsible for predicting compliance (namely harmful possibility) of real-time contents to be examined accessed online, processing non-compliant contents (namely harmful data) and preventing risk leakage. The processing flow of the online auditing module comprises the following steps: (a) cold start of the model; accessing real-time content to be checked; (c) model prediction; and (d) performing online inspection and quality inspection on the model. Wherein, the first and the second end of the pipe are connected with each other,
(a) And (5) cold starting of the model (namely a construction phase of a first version content audit model). In order to quickly and effectively carry out cold start on the content auditing model, historical content is used as a sample, and the auditing result of a corresponding person is used as a label to establish a training data set so as to train the initial content auditing model. Here, the advantage of using human examination results as labels is 1) simplifying the manual experience standardization process, omitting the definition of label standard; 2) The data acquisition process is simplified, and a large amount of sample data is acquired while the human review work is necessary; 3) The data acquisition automation is realized, and training samples can be continuously supplemented in a streaming manner.
In practical applications, considering that content samples (e.g., samples containing non-compliant content) are generally complex and various, in the embodiment of the present application, a content audit model may be constructed in an ensemble learning manner, that is, a content audit model is defined to include a plurality of sub-content audit models, each of which is { θ } 12 ,...θ c }. In practical implementation, the selection of the content auditing model can be determined according to data modalities (such as texts, images, videos and the like), for example, the texts can adopt network models such as bert, albert, eletra and enre, and the images or videos can adopt network models such as incept, vgg and restet.
(b) Accessing real-time content to be checked. Here, access is made to the content to be audited that is generated in real time. Because the subsequent model prediction process depends on computing resources, and real-time data streams (i.e., the number of contents to be audited) in the service often fluctuate periodically, the accessed real-time data streams need to be limited, so as to call an audit prediction algorithm to predict according to the limited real-time data streams.
(c) And (5) model prediction. In order to improve the algorithm prediction efficiency and reasonably utilize computing resources, the contents to be checked are predicted in a batch processing (batch) mode. When the number of the to-be-audited contents contained in each batch of batch processing is n, and the number of the sub-content audit models is c, the content audit models can predict n to-be-audited contents at one time, wherein each sub-content audit model theta j And performing compliance prediction on the n pieces of contents to be checked. For each piece of content to be audited, the possibility that the content to be audited is predicted to be in the ith category through the content auditing model can be represented in the following way (five):
Figure BDA0003792705510000261
wherein, w j Examining a model for sub-content (as a classification model) θ j A predicted accuracy score (i.e., accuracy rate);
Figure BDA0003792705510000262
to pass through theta j And predicting the possibility that the content to be audited is in the ith category.
In practical applications, the content audit model can be used for classification of three categories, including: category 1: judging black, namely identifying that the content to be audited contains harmful components (namely, non-compliant content); category 2: judging white, and identifying that the content to be audited does not contain harmful components; category 3: and identifying that the content to be audited may contain harmful components, and sending to manual auditing treatment.
(d) And (5) performing online inspection on the model and performing quality inspection on the model. After each round of iteration of the content audit model is finished, a test sample set is randomly extracted from the historical content samples carrying the audit results of people, the new content audit model obtained by iteration is used for predicting compliance (namely harmful possibility) of the test sample set, and the prediction accuracy fraction (such as accuracy) of the new content audit model is calculated. And when the predicted accurate score exceeds a specified score threshold value, automatically enabling the new content auditing model to be online, and otherwise, abandoning the new content auditing model to be online.
(2) The man-machine cooperation module: in order to balance risks and cost and ensure the key of fast and efficient iteration of the model by reasonably selecting manual review data, the method plays a core role in carrying out knowledge transformation on manual experience. The man-machine cooperation module comprises: (a) a human review trigger; (b) a cost controller; and (c) manually checking. Wherein the content of the first and second substances,
(a) A human review trigger. Target audit content most beneficial to model iteration and audit error prevention and control can be determined from massive contents to be audited through a query function in active learning, so that human audit cost is reduced, and model iteration and uncertain sample optimization are accelerated.
In practical application, entropy (Entropy) can be used for measuring the uncertainty of the content to be checked by the content checking model to obtain an accurate prediction result, wherein the larger the Entropy is, the larger the uncertainty of the content checking model is, and the smaller the Entropy is, the smaller the uncertainty of the content checking model is. Therefore, under the single-model two-class or multi-class scene, the content to be audited with larger entropy can be selected as the target audit content, so as to carry out manual audit on the target audit content. The entropy is calculated as shown in formula (one):
Figure BDA0003792705510000271
wherein H is entropy, P θ (y i | x) is the possibility of predicting the content x to be audited to be the ith category (i.e. predicting the audit result) by theta.
Therefore, when the method is popularized to a scene with a plurality of sub-content auditing models, the difficulty degree of predicting the content to be audited by the plurality of sub-content auditing models to obtain an accurate prediction result can be measured by using the entropy. If the contents to be audited are divided into the same category by the plurality of sub-content auditing models, the contents to be audited are easy to distinguish, and the uncertainty degree is small; if the contents to be audited are divided into different categories by the plurality of sub-content auditing models, the contents to be audited are difficult to distinguish, and the uncertainty is large. Thus, the difficulty degree (i.e., the prediction difficulty score, represented by entropy) of predicting the content to be audited by using the content audit model (including a plurality of sub-content audit models) to obtain an accurate prediction result can be determined by the following formula (two):
Figure BDA0003792705510000272
wherein H VE Indicates the predicted difficulty score, y i Denotes the ith class, V (y) i ) The predicted auditing result for the content to be audited is represented as y i C represents the total number of sub-content audit models, i.e. the number of sub-content audit models
Figure BDA0003792705510000273
The target auditing content with the forecasting difficulty score reaching the score threshold value can be extracted from the plurality of contents to be audited for manual auditing, and the target auditing content with the largest forecasting difficulty score can also be selected for manual auditing.
(b) A cost controller. When the target audit content is selected for manual audit, human audit cost needs to be considered, and the audit sending probability of the content to be audited can be represented by the following formula (three):
Figure BDA0003792705510000281
wherein, alpha is the human trial and trial proportion, and epsilon is the difficulty score threshold value.
In practical application, the number of manual reviews per day can be controlled to ensure budget, and the trial delivery probability of the content to be reviewed can be represented by the following formula (four):
Figure BDA0003792705510000282
wherein, B is the total amount of people's audits on the day, B is the residual audit amount of people's audits on the day, and B/B is used for controlling the audit amount to balance the labor cost.
c) And (6) manual auditing. And the human audit expert audits the target audit content to be audited to obtain a manual audit result, and then constructs a human audit sample by taking the target audit content as a sample and taking the corresponding manual audit result as a sample label for iterative updating of the content audit model. In practical applications, if there is a higher requirement for auditing timeliness at this stage, sub-process splitting may be performed, for example: harmful examination can be performed firstly in the initial examination stage, harmless contents are released, and then the harmful contents are labeled in detail in the review stage so as to meet the requirement of model training.
(3) A model iteration module: and training the content auditing model based on the human review sample. In order to facilitate the rapid iteration of the model, incremental learning or model fine tuning (finetune) technology is used for realizing the fine tuning of the model, and the model is updated rapidly. The model iteration module comprises: (a) sample reflow and data enhancement; (b) supervised sample extraction and 1 round model iteration; (c) unsupervised sample extraction and k-round model iteration; (d) model distillation. Wherein the content of the first and second substances,
(a) Sample reflow and data enhancement. Performing reflux acquisition on a human review sample (constructed by taking target review content as a sample and taking a corresponding manual review result as a sample label) output by the human-computer cooperation module; meanwhile, data enhancement processing is carried out on target audit content (of the content audit model) with inconsistent prediction audit result and manual audit result, so that data with prediction deviation can be fully learned in the next stage. In practical application, the data enhancement processing mode can be determined according to a data modality (such as text, image and the like), for example, the data enhancement mode of the text can be repeated sampling, replacement of a similar meaning word, replacement of a sentence sequence and the like; the data enhancement mode of the image can be rotation, expansion, inversion and the like.
(b) Supervised sample extraction and 1 round model iteration. Generally speaking, considering the human review cost, the proportion of human review samples in a large disk is small, and it is difficult to make the limited human review samples exert the maximum value. In the embodiment of the application, a scheme combining semi-supervised learning and distillation learning is provided.
Referring to fig. 9, fig. 9 is a schematic diagram of training a content audit model provided in an embodiment of the present application. Here, assume that the content audit model includes 4 child content audit models { θ } 1234 I.e. C =4. During 1 round of model iteration, in order to fully utilize the human review sample d, data enhancement processing can be firstly carried out on the part with conflict (the predicted review result is inconsistent with the manual review result) in the human review sample, then the 1 st iteration training is carried out on the content review model by combining the human review sample subjected to the data enhancement processing and the supervision sample carrying the label in the historical content sample, then finetune is carried out on 4 sub-content review models according to the sample label in the human review sample, and the sub-intermediate content review model { theta ] obtained by 1 round of iteration is obtained 1 11 21 31 4 }。
c) Unsupervised sample extraction and k-round model iteration. During the iteration of the k-round model, model iteration is performed on each sub-intermediate content auditing model obtained through the 1 st round of iterative training by randomly obtaining a large number of unlabeled historical content samples. In actual implementation, at least two sub-intermediate content audit models can be randomly adopted to predict a large number of unsupervised samples, and a weighted average value (a weight value can be the accuracy of the sub-intermediate content audit model) of prediction results of the at least two sub-intermediate content audit models is used as a label (namely soft-label) of the unsupervised sample to obtain a new training data set.
d) And (4) carrying out model distillation. Here, during the k-round model iterations, finetune and model distillation were performed through a training data set carrying soft-label. Repeating the process for a plurality of times can distill knowledge from limited human review samples, so that the finally obtained content review model has better generalization. With continued reference to FIG. 9, a sub-intermediate content audit model θ is employed, for example 1 2 And theta 1 4 Labeling the unsupervised sample to obtain a new sample D 1 1 Adopting a sub-intermediate content audit model theta 1 1 And theta 1 3 Labeling the unsupervised sample to obtain a new sample D 1 2 Adopting a sub-intermediate content audit model theta 1 1 And theta 1 2 Labeling the unsupervised sample to obtain a new sample D 1 3 Adopting a sub-intermediate content audit model theta 1 3 And theta 1 4 Labeling the unsupervised sample to obtain a new sample D 1 4 And further through new samples D during iterations of the k-round model 1 1 、D 1 2 、D 1 3 And D 1 4 Audit model for sub-intermediate content { theta 1 11 21 31 4 Carrying out model distillation of the 1 st round to obtain,obtaining a sub-intermediate content audit model { theta 2 12 22 32 4 }; and analogizing in turn until the K-th model distillation is finished based on the unsupervised sample to obtain the final content audit model { theta } k 1k 2k 3k 4 }。
With continued reference to fig. 8, a processing flow of the content auditing framework of human-computer collaboration provided in the embodiment of the present application may be as follows: 1. performing cold starting on the model to obtain a content auditing model; 2. performing model prediction on the content to be audited generated in real time through a content auditing model to obtain a prediction auditing result; 3. based on the predicted auditing result, determining whether to trigger manual auditing aiming at the content to be audited through a human auditing trigger; 4. determining target audit content needing manual audit through a cost controller; 5. performing manual review on the target review content to obtain a manual review result; 6. constructing a human review sample by taking the target review content as a sample and taking the manual review result of the target review content as a sample label of the sample, and performing sample reflux; 7. performing data enhancement processing on the part with conflict (the predicted review result is inconsistent with the manual review result) in the human review sample to obtain a human review sample after the data enhancement processing; 8. extracting a supervision sample from historical data, and performing 1 iteration on the content auditing model by using the human auditing sample subjected to data enhancement processing and the extracted supervision sample; 9. extracting an unsupervised sample from historical data, and performing labeling operation on the unsupervised sample through a content audit model obtained through 1 iteration to obtain a new sample carrying a label (namely soft-label); 10. performing model distillation on the content auditing model obtained by 1 iteration through a new sample carrying a label to complete k iterations to obtain a target content auditing model; 11. performing model quality inspection on the target content auditing model to obtain a quality inspection result; 12. and if the quality inspection result represents that the quality inspection passes, the model is on line, namely the target content auditing model is adopted to update the content auditing model, and the updated content auditing model is obtained. In practical application, based on the content to be audited generated in real time, the content audit model can be updated for multiple times based on the circulation of the steps, so that the content audit model with more accurate audit precision can be gradually obtained.
As such, the training logic of the content review model may be as follows. Wherein, the input is a human review sample d, and the content review model is { theta 12 ,...θ c And (5) assuming that the maximum iteration number is m.
Figure BDA0003792705510000301
Figure BDA0003792705510000311
In practical applications, there may be multiple ways to select a human panel sample, such as an uncertainty sampling query, a committee-based query, a model change expectation-based query, an error reduction-based query, a variance reduction-based query, a density weight-based query, etc.; for the updating of the model after the human review sample reflows, the updating can be realized by referring to technologies such as online learning and the like besides a semi-supervised distillation method.
In practical application, the man-machine collaborative content auditing method provided by the embodiment of the application can be applied to the following content auditing scenes: 1) In the aspect of content wind control auditing, the method can effectively combine human auditing and machine auditing, balance cost and risk and accelerate uncertain sample optimization. 2) In the aspect of user data verification, similar to a content wind control scene, the method can also reduce the workload of verifying problems such as low-quality account numbers, head portraits, data and the like, and accelerate model iteration and perfection. 3) In other general auditing aspects, through reasonable modeling, the method can play a similar role in auditing links of various scenes such as loan wind control, reimbursement wind control, intelligent operation and maintenance wind control, public opinion wind control and the like.
The above embodiments mainly relate to two subjects, namely a machine review algorithm model and a human review, and a plurality of data flow actions are included around the two subjects, and mainly relate to the following technologies: active learning, ensemble learning, semi-supervised learning, distillation learning, incremental learning, and the like.
By applying the embodiment of the application, the human review cost and the missed placement risk can be effectively balanced in the content review service, the development cost of the machine review model is reduced, and the method and the device have wide practical application prospects. In the security audit service of the image-text and the interactive content, the scheme provided by the embodiment of the application can reduce the whole labeled sample size from hundreds of thousands of levels to thousands of levels, and improve the accuracy of model audit in multiple audit services.
It is understood that in the embodiments of the present application, related data such as user information is referred to, when the embodiments of the present application are applied to specific products or technologies, user permission or consent needs to be obtained, and the collection, use and processing of the related data need to comply with relevant laws and regulations and standards in relevant countries and regions.
Continuing with the exemplary structure of the training apparatus 553 for a content auditing model provided by the embodiment of the present application implemented as a software module, in some embodiments, as shown in fig. 2, the software module stored in the training apparatus 553 for a content auditing model of the memory 550 may include: the prediction module 5531 is configured to perform compliance prediction on at least one piece of content to be audited through a content audit model, so as to obtain a predicted audit result of each piece of content to be audited; a determining module 5532, configured to determine, for each to-be-checked content, a prediction difficulty score of the to-be-checked content based on the prediction checking result; the prediction difficulty score is used for indicating the difficulty degree of predicting the content to be audited through the content auditing model to obtain an accurate prediction result; the screening module 5533 is configured to screen a target audit content, of which the predicted difficulty score meets the difficulty score condition, from the at least one piece of content to be audited, and obtain an actual audit result of the target audit content; the training module 5534 is configured to train the content audit model by using the target audit content as a sample and using an actual audit result of the target audit content as a sample label of the sample, so as to update the content audit model.
In some embodiments, the prediction module 5531 is further configured to obtain a generation time point of each content to be audited; inputting the at least one piece of content to be audited to the content auditing model in batches according to the sequence of the generation time points; and sequentially carrying out compliance prediction on the contents to be audited in each batch through the content auditing model to obtain a prediction auditing result of each content to be audited, wherein each batch comprises a target number of contents to be audited.
In some embodiments, the content audit model includes a plurality of sub-content audit models, and the prediction module 5531 is further configured to, for each content to be audited, respectively perform the following processing: performing compliance prediction on the to-be-audited content through each sub-content audit model to obtain an intermediate prediction audit result of each sub-content audit model; aiming at each sub-content auditing model, acquiring a prediction accurate score of the sub-content auditing model, and taking the prediction accurate score as a weighted value of the sub-content auditing model; the prediction accuracy score is used for indicating the accuracy degree of the intermediate prediction auditing result of the corresponding sub-content auditing model; and weighting the intermediate prediction auditing results of the plurality of sub-content auditing models based on the weight values of the sub-content auditing models to obtain the prediction auditing result of the content to be audited.
In some embodiments, the content review model is configured to perform classification predictions for at least two categories, the prediction review result including: the probability value of the content to be audited belonging to each category; the determining module 5532 is further configured to determine, based on the probability value that the content to be checked belongs to each category, an information entropy value corresponding to the content to be checked, and use the information entropy value as the prediction difficulty score of the content to be checked.
In some embodiments, the content audit models include a first number of sub-content audit models, the predicted audit results include intermediate predicted audit results for each of the sub-content audit models, and the sub-content audit models are used for performing classification prediction for at least two categories; the determining module 5532 is further configured to, for each of the categories, obtain a second number of the sub-content auditing models of the category indicated by the intermediate prediction auditing result in the first number of sub-content auditing models; and determining the prediction difficulty score of the content to be audited based on the first quantity and the second quantity corresponding to each category.
In some embodiments, the screening module 5533 is further configured to select, from the at least one piece of content to be reviewed, a piece of content to be reviewed whose predicted difficulty score reaches a first difficulty score threshold as the target review content.
In some embodiments, the screening module 5533 is further configured to sort the at least one piece of content to be reviewed in a descending order based on the predicted difficulty score; and selecting the contents to be checked with the target quantity ranked at the top from the at least one piece of sorted contents to be checked as the target checking contents.
In some embodiments, when the number of the target audit contents is multiple, the screening module 5533 is further configured to determine, for each target audit content, a target audit score of the target audit content based on a prediction difficulty score of the target audit content, where the target audit score is used to indicate a possible degree of target audit on the target audit content; determining target audit content with the object audit score reaching the audit score threshold value as object audit content; correspondingly, the screening module 5533 is further configured to obtain an actual audit result of the object audit content; correspondingly, the training module 5534 is further configured to train the content audit model by using the object audit content as a sample, and using an actual audit result of the object audit content as a sample label of the sample.
In some embodiments, the screening module 5533 is further configured to take a product of the predicted difficulty score and a subject review proportion of the subject review as a subject review score of the target review content when the predicted difficulty score is lower than a second difficulty score threshold; and when the predicted difficulty score is not lower than the second difficulty score threshold, determining the object audit score of the target audit content as a target score, wherein the target score is used for indicating to execute the operation of determining the target audit content as the object audit content.
In some embodiments, the screening module 5533 is further configured to obtain a scheduled content audit amount and a remaining content audit amount of a target time period, and use a ratio of the remaining content audit amount and the scheduled content audit amount as a time period audit ratio of the target time period; correspondingly, the screening module 5533 is further configured to use a product of the prediction difficulty score, the object review ratio, and the time interval review ratio as the object review score of the target review content; correspondingly, the screening module 5533 is further configured to determine that an object review score of the target review content is a product of the target score and the time period review ratio.
In some embodiments, the training module 5534 is further configured to determine a first review content from the target review content, a predicted review result of the first review content being different from an actual review result of the first review content; performing data enhancement processing on the first audit content to obtain second audit content, and taking an actual audit result of the first audit content as an actual audit result of the second audit content; and taking the target audit content and the second audit content as the sample, and taking an actual audit result of the target audit content and an actual audit result of the second audit content as sample labels of the sample, and training the content audit model.
In some embodiments, the training module 5534 is further configured to obtain a first audit content sample and a second audit content sample, where the first audit content sample carries a tag, and the second audit content sample does not carry a tag; taking the target audit content as a sample, taking an actual audit result of the target audit content as a sample label of the sample, and training the content audit model by combining the first audit content sample to obtain an intermediate content audit model; and training the number of target rounds of the intermediate content auditing model by adopting the second audited content sample.
In some embodiments, the target round number is k, where k is an integer greater than 0, and the training module 5534 is further configured to predict, by the intermediate content audit model, the second audit content sample for a 1 st round of training in the k rounds of training, to obtain a first prediction result, and use the first prediction result as a first sample label of the second audit content sample; training the intermediate content auditing model based on the second audited content sample carrying the first sample label to obtain a first content auditing model trained in the 1 st round of the k rounds of training; for the nth training in the k training rounds, predicting the second audit content sample through the first content audit model of the (n-1) th training round to obtain a second prediction result, and taking the second prediction result as a second sample label of the second audit content sample; training the first content auditing model of the (n-1) th round of training based on the second audited content sample carrying the second sample label to obtain the first content auditing model of the (n-1) th round of training in the k rounds of training, wherein n is an integer greater than 1 and less than or equal to k; and traversing the n to obtain a first content auditing model of the kth round of training.
In some embodiments, the intermediate content auditing model includes a plurality of sub-content auditing models, and the training module 5534 is further configured to predict the second audited content sample through at least two target sub-content auditing models of the plurality of sub-content auditing models, respectively, to obtain sub-model prediction results of each target sub-content auditing model; acquiring a weight value of each target sub-content auditing model; and carrying out weighted average processing on the sub-model prediction results of at least two target sub-content auditing models based on the weight value of each target sub-content auditing model to obtain the first prediction result.
In some embodiments, the training module 5534 is further configured to obtain a test audit content sample, where the test audit content sample carries a test sample label; predicting the test audit content sample through a target content audit model obtained by training the content audit model to obtain a test prediction result; determining a prediction accuracy score of the target content auditing model based on the test prediction result and the test sample label, wherein the prediction accuracy score is used for indicating the accuracy degree of the test prediction result; and when the predicted accuracy score exceeds an accuracy score threshold, updating the content auditing model by adopting the target content auditing model so as to update the content auditing model.
By applying the embodiment of the application, firstly, the content to be audited is audited through the content audit model, and the training of the content audit model is realized based on the target audit content in the content to be audited. Therefore, the training of the content audit model can be realized while the content audit is carried out, a training set (comprising a constructed sample and a labeled sample label) required by model training does not need to be additionally constructed, and the model training cost is reduced.
And secondly, after the contents to be audited are audited through the content audit model, screening target audit contents with the forecasting difficulty scores meeting the difficulty score condition from at least one content to be audited based on the forecasting difficulty scores of the content audit model aiming at each content to be audited. Thus, in the aspect of content review, 1) if the target review content is manually reviewed to obtain an actual review result (i.e., a manual review result), the manual review amount can be reduced, and the manual review cost can be reduced. Namely, the machine audit of the content to be audited can be realized, the manual audit of the target audit content with the prediction difficulty score meeting the difficulty score condition can be realized, the manual audit cost is reduced and the content audit efficiency is improved by a man-machine cooperation audit mode while the manual audit amount is reduced; 2) In the aspect of model training, labeling of a large number of training samples is not needed, and only the target audit content with the prediction difficulty score meeting the difficulty score condition is labeled, so that the model training speed is increased, and the timeliness is improved.
Thirdly, with the progress of the model training process, the prediction capability of the obtained content auditing model is stronger and stronger, the prediction difficulty score for the content to be audited is also reduced, and the target auditing content screened based on the prediction difficulty score can be fewer and fewer, so that the labeling cost is further reduced (namely the target auditing content required to obtain the actual auditing result is reduced) and the model training speed is improved.
And fourthly, the model can be optimized and updated according to the content to be audited generated in real time, so that the trained content auditing model is more flexible, the method can adapt to the complex and changeable content to be audited, and the auditing accuracy of content auditing based on the model is improved.
Embodiments of the present application also provide a computer program product comprising a computer program or computer executable instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer-executable instructions from the computer-readable storage medium, and executes the computer-executable instructions, so that the electronic device executes the training method of the content audit model provided in the embodiment of the present application.
Embodiments of the present application further provide a computer-readable storage medium, in which computer-executable instructions are stored, and when executed by a processor, the computer-executable instructions cause the processor to execute the method for training a content audit model provided in embodiments of the present application.
In some embodiments, the computer-readable storage medium may be memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.
In some embodiments, the computer-executable instructions may be in the form of programs, software modules, scripts or code written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages, and they may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
By way of example, computer-executable instructions may correspond, but do not necessarily have to correspond, to files in a file system, and may be stored in a portion of a file that holds other programs or data, such as in one or more scripts in a hypertext Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub-programs, or portions of code).
By way of example, computer-executable instructions may be deployed to be executed on one electronic device or on multiple electronic devices located at one site or distributed across multiple sites and interconnected by a communication network.
The above description is only an example of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, and improvement made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims (15)

1. A method for training a content audit model, the method comprising:
performing compliance prediction on at least one piece of content to be audited through a content auditing model to obtain a prediction auditing result of each piece of content to be audited;
for each content to be audited, determining a forecast difficulty score of the content to be audited based on the forecast audit result;
the prediction difficulty score is used for indicating the difficulty degree of predicting the content to be audited through the content auditing model so as to obtain an accurate prediction result;
screening target audit contents with prediction difficulty scores meeting the difficulty score condition from the at least one piece of content to be audited, and acquiring actual audit results of the target audit contents;
and training the content auditing model by taking the target auditing content as a sample and taking an actual auditing result of the target auditing content as a sample label of the sample so as to update the content auditing model.
2. The method of claim 1, wherein the performing compliance prediction on at least one piece of content to be checked through a content checking model to obtain a predicted checking result of each piece of content to be checked includes:
acquiring the generation time point of each content to be audited;
inputting the at least one piece of content to be audited to the content auditing model in batches according to the sequence of the generation time points;
and sequentially carrying out compliance prediction on the contents to be audited in each batch through the content auditing model to obtain a prediction auditing result of each content to be audited, wherein each batch comprises a target number of contents to be audited.
3. The method of claim 1, wherein the content audit model includes a plurality of sub-content audit models, and performing compliance prediction on at least one piece of content to be audited through the content audit model to obtain a predicted audit result of each piece of content to be audited includes:
and respectively executing the following processes aiming at the contents to be audited:
performing compliance prediction on the content to be audited through each sub-content audit model to obtain an intermediate prediction audit result of each sub-content audit model;
aiming at each sub-content auditing model, acquiring a prediction accurate score of the sub-content auditing model, and taking the prediction accurate score as a weighted value of the sub-content auditing model;
the prediction accuracy score is used for indicating the accuracy degree of the intermediate prediction auditing result of the corresponding sub-content auditing model;
and weighting the intermediate prediction auditing results of the plurality of sub-content auditing models based on the weight values of the sub-content auditing models to obtain the prediction auditing result of the content to be audited.
4. The method of claim 1, wherein the content review model is used to make classification predictions for at least two categories, the prediction review results comprising: the probability value of the content to be audited belonging to each category;
the determining the prediction difficulty score of the content to be checked based on the prediction checking result comprises:
determining the value of the information entropy corresponding to the content to be checked based on the probability value of the content to be checked belonging to each category, and determining the value of the information entropy corresponding to the content to be checked
And taking the value of the information entropy as the prediction difficulty score of the content to be audited.
5. The method of claim 1, wherein the content audit model comprises a first number of sub-content audit models, the predicted audit results comprise intermediate predicted audit results for each of the sub-content audit models, the sub-content audit models being used to make at least two categories of classification predictions;
the determining the prediction difficulty score of the content to be checked based on the prediction checking result comprises:
acquiring a second number of the sub-content auditing models of the category indicated by the intermediate prediction auditing result in the first number of sub-content auditing models for each category;
and determining the prediction difficulty score of the content to be audited based on the first quantity and the second quantity corresponding to each category.
6. The method of claim 1, wherein the screening of target review content with a predicted difficulty score meeting the difficulty score condition from the at least one piece of content to be reviewed comprises:
and selecting the to-be-audited content with the prediction difficulty score reaching the first difficulty score threshold value from the at least one to-be-audited content as the target audit content.
7. The method of claim 1, wherein the screening of target review content with a predicted difficulty score meeting the difficulty score condition from the at least one piece of content to be reviewed comprises:
based on the prediction difficulty scores, sequencing the at least one piece of content to be audited in a descending order;
and selecting the contents to be checked with the target quantity ranked at the top from the at least one piece of sorted contents to be checked as the target checking contents.
8. The method of claim 1, wherein when the number of the target audit content is multiple, before the obtaining the actual audit result of the target audit content, the method further comprises:
for each target audit content, determining an object audit score of the target audit content based on a prediction difficulty score of the target audit content, wherein the object audit score is used for indicating the possibility degree of object audit on the target audit content;
determining target audit content with the object audit score reaching the audit score threshold value as object audit content;
the obtaining of the actual audit result of the target audit content includes: acquiring an actual auditing result of the object auditing content;
the training of the content audit model by taking the target audit content as a sample and taking the actual audit result of the target audit content as a sample label of the sample comprises the following steps:
and taking the object audit content as a sample, and taking the actual audit result of the object audit content as a sample label of the sample, and training the content audit model.
9. The method of claim 8, wherein determining a target review score for the target review content based on the predicted difficulty score for the target review content comprises:
when the prediction difficulty score is lower than a second difficulty score threshold value, taking the product of the prediction difficulty score and the object auditing proportion of the object auditing as the object auditing score of the target auditing content;
and when the predicted difficulty score is not lower than the second difficulty score threshold, determining the object audit score of the target audit content as a target score, wherein the target score is used for indicating to execute the operation of determining the target audit content as the object audit content.
10. The method of claim 9, wherein the method further comprises:
acquiring the scheduled content auditing amount and the residual content auditing amount of a target time period, and taking the ratio of the residual content auditing amount to the scheduled content auditing amount as the time period auditing proportion of the target time period;
taking the product of the prediction difficulty score and the object auditing proportion of the object auditing as the object auditing score of the target auditing content, wherein the method comprises the following steps:
taking the product of the prediction difficulty score, the object auditing proportion and the time interval auditing proportion as the object auditing score of the target auditing content;
the determining that the object audit score of the target audit content is the target score includes:
and determining the object auditing fraction of the target auditing content as the product of the target fraction and the time interval auditing proportion.
11. The method of claim 1, wherein training the content audit model with the target audit content as a sample and the actual audit result of the target audit content as a sample label of the sample comprises:
determining first audit content from the target audit content, wherein the predicted audit result of the first audit content is different from the actual audit result of the first audit content;
performing data enhancement processing on the first audit content to obtain second audit content, and taking an actual audit result of the first audit content as an actual audit result of the second audit content;
and taking the target audit content and the second audit content as the sample, and taking an actual audit result of the target audit content and an actual audit result of the second audit content as sample labels of the sample, and training the content audit model.
12. The method of claim 1, wherein training the content audit model with the target audit content as a sample and the actual audit result of the target audit content as a sample label of the sample comprises:
acquiring a first audit content sample and a second audit content sample, wherein the first audit sample carries a label, and the second audit content sample does not carry a label;
taking the target audit content as a sample, taking an actual audit result of the target audit content as a sample label of the sample, and training the content audit model by combining the first audit content sample to obtain an intermediate content audit model;
and training the number of target rounds of the intermediate content auditing model by adopting the second audited content sample.
13. The method of claim 12, wherein the target round number is k, and wherein k is an integer greater than 0, and wherein the training of the target round number for the intermediate content audit model using the second audit content sample comprises:
predicting the second audit content sample through the intermediate content audit model aiming at the 1 st round of training in the k rounds of training to obtain a first prediction result, and taking the first prediction result as a first sample label of the second audit content sample;
training the intermediate content auditing model based on the second audited content sample carrying the first sample label to obtain a first content auditing model trained in the 1 st round of the k rounds of training;
for the n-th round of training in the k-th round of training, predicting the second audit content sample through a first content audit model of the (n-1) -th round of training to obtain a second prediction result, and taking the second prediction result as a second sample label of the second audit content sample;
training the first content auditing model of the (n-1) th round of training based on the second audited content sample carrying the second sample label to obtain the first content auditing model of the (n-1) th round of training in the k rounds of training, wherein n is an integer greater than 1 and less than or equal to k;
and traversing the n to obtain a first content auditing model of the kth round of training.
14. The method of claim 1, wherein after training the content audit model using the target audit content as a sample and using the actual audit result of the target audit content as a sample label of the sample, the method further comprises:
obtaining a test audit content sample, wherein the test audit content sample carries a test sample label;
predicting the test audit content sample through a target content audit model obtained by training the content audit model to obtain a test prediction result;
determining a prediction accuracy score of the target content auditing model based on the test prediction result and the test sample label, wherein the prediction accuracy score is used for indicating the accuracy degree of the test prediction result;
and when the predicted accuracy score exceeds an accuracy score threshold, updating the content auditing model by adopting the target content auditing model so as to update the content auditing model.
15. An apparatus for training a content audit model, the apparatus comprising:
the prediction module is used for performing compliance prediction on at least one piece of content to be audited through the content auditing model to obtain a prediction auditing result of each piece of content to be audited;
the determining module is used for determining the prediction difficulty score of the content to be audited based on the prediction auditing result aiming at each content to be audited; the prediction difficulty score is used for indicating the difficulty degree of predicting the content to be audited through the content auditing model so as to obtain an accurate prediction result;
the screening module is used for screening and obtaining target audit contents with prediction difficulty scores meeting the difficulty score condition from the at least one piece of content to be audited, and obtaining the actual audit results of the target audit contents;
and the training module is used for training the content audit model by taking the target audit content as a sample and taking the actual audit result of the target audit content as a sample label of the sample so as to update the content audit model.
CN202210960677.4A 2022-08-11 2022-08-11 Training method and device for content audit model Pending CN115293272A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210960677.4A CN115293272A (en) 2022-08-11 2022-08-11 Training method and device for content audit model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210960677.4A CN115293272A (en) 2022-08-11 2022-08-11 Training method and device for content audit model

Publications (1)

Publication Number Publication Date
CN115293272A true CN115293272A (en) 2022-11-04

Family

ID=83827343

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210960677.4A Pending CN115293272A (en) 2022-08-11 2022-08-11 Training method and device for content audit model

Country Status (1)

Country Link
CN (1) CN115293272A (en)

Similar Documents

Publication Publication Date Title
CN109496320B (en) Artificial intelligence engine with architect module
JP2023539532A (en) Text classification model training method, text classification method, device, equipment, storage medium and computer program
CN112256537B (en) Model running state display method and device, computer equipment and storage medium
CN111897934A (en) Question and answer pair generation method and device
CN111563158A (en) Text sorting method, sorting device, server and computer-readable storage medium
CN117149989A (en) Training method for large language model, text processing method and device
CN112069781A (en) Comment generation method and device, terminal device and storage medium
US20210383426A1 (en) Creating an effective product using an attribute solver
CN111737438B (en) Data processing method and device based on text similarity and electronic equipment
US10896034B2 (en) Methods and systems for automated screen display generation and configuration
CN115129902B (en) Media data processing method, device, equipment and storage medium
CN115293272A (en) Training method and device for content audit model
US20210216287A1 (en) Methods and systems for automated screen display generation and configuration
CN114580533A (en) Method, apparatus, device, medium, and program product for training feature extraction model
Zhang Sharing of teaching resources for English majors based on ubiquitous learning resource sharing platform and neural network
Xiaogang A research on distance education system based on artificial intelligence technology
Wang et al. Online mobile teaching methods based on Android in the 5G environment
Pu et al. Embedding cognitive framework with self-attention for interpretable knowledge tracing
Mo et al. Design of distance multimedia physical education teaching platform based on artificial intelligence technology
CN117336539B (en) Video script production method and system for short video IP (Internet protocol) construction
CN116894089B (en) Digest generation method, digest generation device, digest generation apparatus, digest generation program, and digest generation program
CN117216537A (en) Training method, device, equipment, storage medium and program product of integrated model
CN117708319A (en) User category identification method and device, electronic equipment and storage medium
HAN et al. Metaverse Framework Designing for Energy Scheduling in Energy Internet of Things Considering Emergence
Wang et al. Research on Evaluation of Teaching Skills of Normal Students Based on Text Mining Technology—Take Information Technology as an Example

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination