Model updating method, resource auditing method and device and electronic equipment
By building a data flywheel and using online reflux data to conduct multiple rounds of iterative training on the initial model, the output model and effectiveness threshold are determined, which solves the problems of model lag and long iteration cycle in illegal resource governance, achieves rapid response and efficient identification of illegal resources, and improves the robustness and accuracy of the model.
Patent Information
- Application Number
- CN202510961888.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-11
- Publication Date
- 2025-09-05
AI Technical Summary
The existing illegal resource governance model has lagging functions and long iteration cycles, and is unable to intervene in illegal resources quickly and effectively. In addition, the types of illegal resources are complex, highly confrontational, and highly hidden, resulting in short model timeliness and high maintenance costs.
By building a data flywheel and using online reflux data to conduct multiple rounds of iterative training on the initial model, the qualified model and effectiveness threshold are determined, and the model is automatically updated and iterated, thereby improving the timeliness and accuracy of illegal resource identification.
It achieves rapid response and identification of illegal resources, reduces model iteration cycle and maintenance costs, and improves the robustness and accuracy of the model.
Smart Images

Figure CN120602354A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to the fields of network security and deep learning technology. More specifically, the present disclosure provides a model updating method, a resource auditing method, an apparatus, an electronic device, a storage medium, and a computer program product. Background Art
[0002] With the continuous development of computer and internet technologies, a large amount of illegal, non-compliant, and maliciously diverting content has appeared on websites and platforms. Addressing these illegal resources presents challenges, such as the wide variety of pollutants and the obscurity of these resources. Furthermore, existing audit models are lagging behind in functionality and have long iteration cycles, making it difficult to quickly and effectively intervene in these illegal resources. Summary of the Invention
[0003] The present disclosure provides a model updating method, a resource auditing method, an apparatus, an electronic device, a storage medium, and a computer program product.
[0004] According to a first aspect, a model updating method is provided, comprising: obtaining reflux data within a preset time range as sample data, wherein the reflux data includes illegal resources detected from online resources and normal resources extracted from online resources, and the online resources are resources approved and released by the initial model; performing multiple rounds of iterative training on the initial model using the sample data; determining an exit model and an effective threshold of the exit model from multiple models obtained from the multiple rounds of iterative training, wherein the effective threshold is a threshold for reviewing whether a resource is in violation; and replacing the initial model according to the exit model and the effective threshold to obtain an updated model.
[0005] According to a second aspect, a resource audit method is provided, the method comprising: auditing the to-be-published resource using an initial model; and in response to the initial model being replaced with an updated model, auditing the to-be-published resource using the updated model, wherein the updated model is obtained according to the method provided by the present disclosure.
[0006] According to a third aspect, a model updating device is provided, which includes: an acquisition module for acquiring backflow data within a preset time range as sample data, wherein the backflow data includes illegal resources detected from online resources and normal resources extracted from online resources, and the online resources are resources that have been reviewed and released by the initial model; a training module for performing multiple rounds of iterative training on the initial model using the sample data; a model determination module for determining an exit model and an effective threshold of the exit model from multiple models obtained from multiple rounds of iterative training, wherein the effective threshold is a threshold for reviewing whether a resource is in violation; and a replacement module for replacing the initial model according to the exit model and the effective threshold to obtain an updated model.
[0007] According to a fourth aspect, a resource audit device is provided, which includes: a first audit module for auditing the resources to be released using an initial model; and a second audit module for auditing the resources to be released using an updated model in response to the initial model being replaced with an updated model, wherein the updated model is obtained according to the device provided by the present disclosure.
[0008] According to a fifth aspect, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method provided according to the present disclosure.
[0009] According to a sixth aspect, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute the method provided according to the present disclosure.
[0010] According to a seventh aspect, a computer program product is provided, comprising a computer program stored on at least one of a readable storage medium and an electronic device, wherein the computer program implements the method provided according to the present disclosure when executed by a processor.
[0011] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.
[0013] Figure 1 is a schematic diagram of an exemplary system architecture to which a model updating method, a resource auditing method, and an apparatus thereof can be applied according to an embodiment of the present disclosure;
[0014] Figure 2 is a flowchart of a model updating method according to an embodiment of the present disclosure;
[0015] Figure 3 is a flowchart of obtaining sample data according to one embodiment of the present disclosure;
[0016] Figure 4 is a schematic structural diagram of an initial model according to an embodiment of the present disclosure;
[0017] Figure 5 is a flowchart of a model updating method according to another embodiment of the present disclosure;
[0018] Figure 6is a system architecture diagram of a model update according to an embodiment of the present disclosure;
[0019] Figure 7 is a flow chart of a resource audit method according to an embodiment of the present disclosure;
[0020] Figure 8 is a structural block diagram of a model updating device according to an embodiment of the present disclosure;
[0021] Figure 9 is a block diagram of a resource audit apparatus according to an embodiment of the present disclosure; and
[0022] Figure 10 is a block diagram of an electronic device applicable to a model updating method and a resource auditing method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0023] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0024] In the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0025] In the technical solution disclosed herein, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.
[0026] Identifying illegal resources based on content generally involves two approaches: one is based on a sensitive word filtering vocabulary, matching sensitive words within the text to determine whether the text contains the target sensitive words. The other is based on a neural network model, which trains the neural network model to identify illegal content within the text.
[0027] The above two solutions for managing illegal resources have the following main shortcomings:
[0028] 1. The dimensions and types of illegal resources are extremely complex. According to current content security access standards, illegal resources can be categorized into different types, encompassing a wide variety of manifestations. Given the ever-increasing variety of illegal resource types, building a content dimension model for only a single scenario can achieve high accuracy, but it also results in high maintenance costs and low iteration efficiency.
[0029] Second, illegal resources are highly adversarial. Users who post illegal resources often use methods such as altering videos, images, and text to bypass review. Reviewing illegal resources puts a high test on the model's semantic generalization capabilities.
[0030] 3. Illegal resources are highly concealed. To pass review, illegal resources often use obscure expressions, innuendos, and textual representations that replace key content with variant text, making it extremely difficult for models to identify them.
[0031] Fourth, model upgrades require high timeliness. Due to the highly resistant nature of illegal resources, new types of illegal resources and anti-censorship measures are constantly emerging. This results in shorter timeliness for models in the illegal resource confrontation scenario compared to other risk control scenarios. Currently, we rely primarily on contamination rate assessments to identify issues and then iterate the model to resolve them. The contamination rate can be defined as the percentage of illegal content detected in online spot checks. From data collection to model evaluation and launch, labor costs are high and the iteration cycle is long.
[0032] Based on this, the present disclosure proposes a model update method and a resource audit method, which aims to build a data flywheel, train the model based on timely online return resources, and realize iterative training and online update of the model through an automatic iteration mechanism, so as to respond to illegal resources more quickly and effectively combat illegal resources.
[0033] Figure 1 This is a schematic diagram of an exemplary system architecture to which the model updating method, resource auditing method and apparatus thereof can be applied according to an embodiment of the present disclosure. It should be noted that, Figure 1 The examples shown are merely examples of system architectures to which the embodiments of the present disclosure may be applied, to help those skilled in the art understand the technical content of the present disclosure, but do not mean that the embodiments of the present disclosure may not be used in other devices, systems, environments or scenarios.
[0034] like Figure 1 As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0035] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to upload and publish resources, which may include text, images, videos, and other data uploaded by users. Terminal devices 101, 102, and 103 can be various electronic devices, including but not limited to smartphones, tablet computers, laptop computers, and the like.
[0036] Server 105 can provide various services, such as reviewing resources uploaded by users using terminal devices 101, 102, or 103 and determining whether to allow their publication. The backend management server can analyze and process received resources and provide feedback to the terminal device regarding the analysis results (e.g., determining whether the resource violates regulations based on trained models and judgment rules). Server 105 can also be deployed with a pre-trained model, which can be used to review user-uploaded resources and determine whether the resources violate regulations.
[0037] At least one of the model updating method and the resource auditing method provided by the embodiments of the present disclosure may generally be executed by the server 105. Accordingly, at least one of the model updating apparatus and the resource auditing apparatus provided by the embodiments of the present disclosure may generally be provided in the server 105. The model updating method and the resource auditing method provided by the embodiments of the present disclosure may also be executed by a server or a server cluster that is different from the server 105 and that is capable of communicating with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the model updating apparatus and the resource auditing apparatus provided by the embodiments of the present disclosure may also be provided in a server or a server cluster that is different from the server 105 and that is capable of communicating with the terminal devices 101, 102, 103 and / or the server 105.
[0038] Figure 2 is a flowchart of a model updating method according to an embodiment of the present disclosure.
[0039] like Figure 2 As shown, the model updating method 200 of this embodiment includes operations S210 to S240.
[0040] In operation S210, reflow data within a preset time range is obtained as sample data, wherein the reflow data includes illegal resources detected from online resources and normal resources extracted from online resources. Online resources are resources that have been reviewed and released by the initial model.
[0041] Sample data can be data used to train the model. The preset time range can be within a preset time period (for example, within 12 hours) or a fixed time period (12:00 to 24:00) from the current time. The initial model can be a deep learning model that is already used online to review resources uploaded by users. Online resources can refer to publicly visible resources uploaded by users, reviewed by the initial model, and published online. Online resources can include data such as text, pictures, videos, animated images, and files in other formats. Reflux data can be data obtained based on online resources, and can include illegal resources obtained through secondary review or spot checks of online resources, or normal resources randomly extracted from online resources.
[0042] For example, between 12:00 and 12:00, 1,000 online resources were released after passing the initial model review. A secondary review of these resources revealed 50 non-compliant resources, and 100 non-compliant resources were extracted from the online resources. These 50 non-compliant resources and 100 non-compliant resources can be used as sample data.
[0043] In operation S220 , the initial model is trained iteratively for multiple rounds using the sample data.
[0044] In the embodiments of the present disclosure, iterative training may refer to the process of adjusting the model parameters based on the output of the initial model for the sample data, and then repeatedly training the model using the sample data. Each round of iterative training can produce a model with adjusted parameters. Through multiple rounds of iterative training, a corresponding number of models can be obtained.
[0045] In operation S230, an exit model and a validation threshold of the exit model are determined from a plurality of models obtained through multiple rounds of iterative training, wherein the validation threshold is a threshold used to review whether a resource is in violation of regulations.
[0046] The "exit model" can be a model selected from the aforementioned multiple models to replace the initial model. The "exit model" can be the model that best meets expectations (e.g., its accuracy or recall meets certain standards). The "validation threshold" can be the threshold used by the model to determine whether a resource is in violation of regulations. For example, if the probability of a resource being in violation of regulations is greater than the validation threshold, the resource is considered in violation of regulations; otherwise, it is considered normal content.
[0047] In operation S240 , the initial model is replaced according to the permitted model and the validation threshold to obtain an updated model.
[0048] For example, the model file and the effective threshold configuration file of the approval model can be configured to the resource publishing platform, and the approval model can be put online on the resource publishing platform to realize automatic iteration of the model.
[0049] According to the embodiments of the present disclosure, by using online reflux data as sample data, the initial model is iteratively trained, an automatic iteration mechanism is established, and new types of illegal content are automatically supplemented and identified, thereby improving the timeliness of online illegal content identification and effectively reducing the online contamination rate.
[0050] According to an embodiment of the present disclosure, operation S230 may include determining a qualified model based on the recall rate of the model obtained in each round of iteration. Determining a qualified model and a validation threshold for the qualified model from multiple models obtained through multiple rounds of iterative training includes: testing the recall rate of the model obtained through each round of iteration using a test sample; determining a qualified model from the multiple models after the multiple rounds of iterative training based on the recall rate; evaluating the accuracy of the qualified model under multiple thresholds using an evaluation sample; and determining a validation threshold from the multiple thresholds based on the accuracy rate.
[0051] The test samples can be samples separated from the reflow data for testing. Using the test samples, multiple models obtained through multiple iterations can be tested. The recall rate of each model can be determined based on the model output. Models whose recall rates meet the preset requirements can be selected as qualified models.
[0052] Evaluation samples can be samples separated from the backflow data for evaluation, or they can be samples obtained from the backend or resource library of the resource publishing platform. The evaluation samples are used to test the output model. Multiple thresholds are set for the output model, and the accuracy of the output model at different thresholds is calculated. The threshold with the highest accuracy is determined as the effective threshold.
[0053] For example, after N iterations, N models can be obtained. Each of the N models is tested using test samples, and the recall rate of each model is calculated. When the recall rate of the normal samples in the test sample is greater than or equal to the recall rate threshold (for example, 0.998), and the recall rate of the noncompliant samples is the highest, the corresponding model is considered the qualified model. For the qualified model, multiple discrimination thresholds can be set, for example, a first threshold of 0.9 and a second threshold of 0.8. The discrimination threshold is the threshold used to determine whether a resource is noncompliant. When the model output is greater than or equal to the discrimination threshold, the resource input to the model is considered noncompliant; when the model output is less than the discrimination threshold, the resource input to the model is considered noncompliant. Evaluation samples are used to determine the accuracy of the qualified model at different discrimination thresholds. The discrimination threshold that meets the required accuracy (for example, greater than 95%) is designated as the effective threshold.
[0054] According to the embodiments of the present disclosure, an automatic iteration mechanism is used to determine the eligible model based on the recall rate of the model in each round of iteration, and the effective threshold is determined based on the accuracy of the eligible model under multiple discrimination thresholds, thereby improving the accuracy, recall and robustness of the model.
[0055] According to an embodiment of the present disclosure, a resource including a publishing status is acquired as an evaluation sample, wherein the publishing status is one of allowing publishing and rejecting publishing; and a label of the evaluation sample is determined according to the publishing status.
[0056] The evaluation sample can be sample data obtained from the backend or resource library of the resource publishing platform, including the release status, where the release status includes allowed release and rejected release. The sample data can be determined as a violation resource or a normal resource based on the release status of the resource.
[0057] For example, if the release status of a resource is "allowed to release," the resource as sample data may be labeled as a normal sample. If the release status of a resource is "rejected to release," the resource as sample data may be labeled as an illegal sample.
[0058] Next, combine Figure 3 The process of obtaining the sample data disclosed in the present invention is further explained.
[0059] Figure 3 is a flowchart of obtaining sample data according to one embodiment of the present disclosure.
[0060] like Figure 3 As shown, reflow data 301 can be partial data obtained from online resources, including illegal resources and some normal resources obtained through online secondary review. The Advanced File System (AFS) database 310 can store key fields, images, videos, and other data from the reflow data 301. The AFS database 310 can include resources 302 that violate laws or regulations, resources 303 that contain harmful information, and resources 304 that have passed review and have been successfully published. Among them, resources 302 that violate laws or regulations and resources 303 that contain harmful information are illegal resources 305, while resources 304 that have passed review and have been successfully published are normal resources 306.
[0061] Violating resources 305 and normal resources 306 are vectorized and stored in a vector database Redis 320. A preset ratio of violating resources 305 and normal resources 306 is periodically retrieved from Redis 320. Violating resources 305 are added to a violation sample pool 330 as violation samples, and normal resources 306 are added to a normal sample pool 340 as normal samples. The violation samples in violation sample pool 330 and the normal samples in normal sample pool 340 constitute sample data 307, which is used to train the initial model.
[0062] In the embodiments of the present disclosure, the backflow data is periodically pulled from the AFS and vectorized and stored in the vector database Redis. A certain proportion of illegal resources and normal resources are periodically pulled from the vector database Redis as training samples, which can improve the timeliness of the sample data.
[0063] For example, the return flow data can be online resources stored in the AFS database from 12:00 to 12:00 the previous day. At 12:30 on the same day, the return flow data can be retrieved from the AFS database, converted to vectors, and stored in the Redis database. The data in the Redis database is then retrieved and stored locally. A certain number of normal and violation samples are extracted according to the ratio to train the model.
[0064] According to an embodiment of the present disclosure, reflow data and an index file of the reflow data can be obtained from a database according to a preset time period, wherein the index file is generated based on the time information of the reflow data; and according to the time sequence in the index file, a preset proportion of illegal resources and normal resources can be obtained from the reflow data as sample data.
[0065] In an embodiment of the present disclosure, the preset time period can be a fixed time point every day, such as 12:30 noon and 1:30 am every day. The reflow data 301 has time information. The time information can refer to the release time of the reflow data, which can be used to characterize the timeliness of the reflow data. After obtaining the data in the Redis database and storing it locally, an index file of the reflow data can be generated based on the time information. When pulling training data from the Redis database, the latest reflow data can be loaded based on the index file. Old data can also be cleaned up regularly according to the index file to improve the timeliness of the training data.
[0066] For example, the ratio of normal resources to illegal resources in the sample data can be set to 3:1. Sample data in vector form is retrieved from Redis database 320 according to the chronological order in the index file. For example, 300 normal samples are extracted to form a normal sample pool 330, and 100 illegal samples are extracted to form an illegal sample pool 340. The model is trained using this sample data with a 3:1 ratio of normal samples to illegal samples.
[0067] According to the embodiments of the present disclosure, the model is trained by regularly acquiring high-timeliness samples, and rapid intervention is performed on the endless stream of bad and illegal information, thereby reducing the optimization iteration cycle of the model while improving the accuracy and robustness.
[0068] According to an embodiment of the present disclosure, reflow data can be obtained by the following method: using an initial model to review the resources to be published; in response to the resources to be published passing the review of the initial model, publishing the resources to be published to obtain online resources; and determining the reflow data from the online resources and storing it in a database.
[0069] The resources to be published can be resource information uploaded by users to the server and awaiting review. The returned data can be part of the online resources that have been published after review by the initial model.
[0070] The embodiments of the present disclosure can form a data flywheel through the resources to be released, the return data, and the sample data, open up the data path, and ensure efficient (for example, daily level) training iteration and online update of the model based on the automatic iteration mechanism. The model is trained based on the continuously updated resources online, which can effectively respond to the rapid changes of illegal resources, improve the resistance ability, and save machine resources and maintenance costs.
[0071] In an embodiment of the present disclosure, multiple rounds of iterative training of an online audit model using sample data include: for each resource in the sample data, extracting features of the text content and image content in the resource respectively to obtain text features and image features; encoding the text features and image features respectively to obtain text encoding features and image encoding features; weightedly fusing the text encoding features and image encoding features to obtain fused features; determining the audit result of the resource based on the fused features, wherein the audit result represents whether the resource is an illegal resource; and adjusting the parameters of the initial model based on the audit result of the resource.
[0072] Next, combine Figure 4 Further explanation of the model structure of this disclosure
[0073] Figure 4 Schematic diagram of the structure of an initial model according to an embodiment of the present disclosure.
[0074] like Figure 4 As shown, the initial model of this embodiment includes a feature extraction module 410 and a recognition module 420. After acquiring sample data, the resource content in the sample data can be divided into text content and graphic content, and features are extracted for each of them.
[0075] The text content in the sample data can be processed through sliding cutting 401 to segment longer text content according to specific rules, and feature extraction is performed on the segmented text content through the language model BERT (Bidirectional Encoder Representations from Transformers) 402 to obtain text features of the sample data.
[0076] With respect to the image content in the sample data, feature extraction may be performed on the image content by ViT-Base (Vision Transformer Base) 404 to obtain image features of the sample data.
[0077] According to an embodiment of the present disclosure, the initial model includes a dual-tower model, and the dual-tower model includes a text tower and an image tower; encoding text features and image features respectively to obtain text encoding features and image encoding features includes: using the text tower and the image tower to encode text features and image features respectively to obtain text encoding features and image encoding features.
[0078] In the embodiments of the present disclosure, through analysis of violation information, it can be seen that the image and text information of violation information are usually not correlated, and the effect of extracting and fusing the multimodal features of sample data in the early stage is poor. Therefore, the text features and image features can be processed separately through the text tower and image tower, and then feature fusion can be performed later.
[0079] Both the text tower and the image tower can be constructed by stacking four layers of transformer encoders. By processing text and image data separately, interference between data of different modalities can be avoided. Text features can be encoded using the text tower 403 in the recognition module 420 to obtain text encoding features. Image features can be encoded using the image tower 405 to obtain image encoding features. These text encoding features and image encoding features are then weightedly fused using the gating layer 406 and the MLP (Multi-Layer Perception) 407 to obtain fused features. Based on these fused features, the discrimination result 408 for the sample data is obtained.
[0080] In an embodiment of the present disclosure, the audit result 408 represents the probability that the input sample data is a violation resource. Based on the audit result 408, it can be determined whether the model identifies the sample data as a violation resource. Based on the difference between the audit result 408 and the actual label of the sample, the parameters of the initial model are adjusted to obtain an updated model.
[0081] According to the embodiments of the present disclosure, an audit model is constructed using multimodal data such as text and images, and a two-stage model structure is designed, including image and text feature extraction based on BERT and ViT-Base models and late fusion using a twin-tower model-like structure. This can achieve effective fusion of multimodal data, enable the model to effectively identify illegal content on the platform, and improve the accuracy of the model in identifying illegal content.
[0082] Figure 5 is a flowchart of a model updating method according to another embodiment of the present disclosure.
[0083] like Figure 5 As shown, the model updating method of this embodiment includes operations S510 to S550.
[0084] In operation S510 , the model is trained using sample data.
[0085] In an embodiment of the present disclosure, the sample data may be obtained based on the reflow data 501 within a predetermined time range, and the sample data may include a violation sample 502 representing a violation resource and a normal sample 503 representing a normal resource.
[0086] In operation S520 , an eligible model is determined from the multiple models of multiple rounds of iterations to obtain an eligible model file.
[0087] The recall rate of each model can be determined using test samples, and the model whose normal sample recall rate meets certain conditions and whose violation sample recall rate is the highest can be selected as the qualified model.
[0088] In operation S530 , a validation threshold for the model is determined, and a validation threshold configuration file is obtained.
[0089] The evaluation samples can be used to determine the accuracy of the model under multiple thresholds, and the discrimination threshold that meets the accuracy requirements can be selected as the effective threshold.
[0090] In operation S540 , the exit model file and the validation threshold configuration file are stored in a preset storage path.
[0091] In operation S550 , in response to detecting the updated model file and threshold configuration file from the preset storage path, the updated model file and threshold configuration file are distributed to the resource distribution platform to replace the initial model.
[0092] After storing the exit model file and the effective threshold configuration file in the preset storage path, the new exit model can be used to replace the initial model through data flow distribution to enable the online launch and use of the updated model.
[0093] According to the embodiments of the present disclosure, by distributing the approval model file and the effectiveness threshold configuration file, the model is updated and put online, which can effectively and continuously resist the attack of illegal content and improve the model's ability to resist illegal content.
[0094] Figure 6 This is a system architecture diagram of a model update according to an embodiment of the present disclosure.
[0095] like Figure 6 As shown, the model update system includes a service encapsulation module, an iterative update module, a model training module and a data storage module.
[0096] In an embodiment of the present disclosure, the service encapsulation module may include UGC (User-Generated Content) services, short video services, image services, text services, and illegal content identification, etc. Among them, UGC services, short video services, image services, and text services are used to provide users with resource publishing services. The illegal content identification service can review resources uploaded and published by users. By encapsulating each service and achieving service modularization, it can effectively solve the problems of few labeled samples, a single recognition style, poor implementation, and poor portability, and can quickly and targetedly achieve system iterative optimization.
[0097] The data storage module may include an AFS database storing the reflow data and a Redis database converting the reflow data into a vector form for storage.
[0098] The iterative update module may include timed iterative training and model updating. The model is trained by periodically obtaining sample data from the data storage module to obtain a qualified model and an effective threshold. The initial model is replaced with the qualified model to obtain an updated model.
[0099] The model training module includes data preprocessing, image feature extraction, text feature extraction, and resource identification. Valid sample data is obtained by performing deduplication, sliding segmentation, and uniform frame extraction on the AFS database. Image feature extraction is performed on images and text feature extraction on text to generate audit results. Based on these audit results, it can be determined whether the input sample data represents a non-compliant resource.
[0100] Figure 7 The diagram is a flow chart of a resource audit method according to an embodiment of the present disclosure.
[0101] like Figure 7 As shown, the resource audit method 700 of this embodiment includes operations S710 to S720.
[0102] In operation S710 , resources to be published are reviewed using the initial model.
[0103] In operation S720 , in response to the initial model being replaced with the updated model, the to-be-published resource is reviewed using the updated model.
[0104] In an embodiment of the present disclosure, the updated model can be the exit model in the model update method 200 described above. By storing the exit model and the corresponding effectiveness threshold in a preset storage path, when determining the model update, the updated model can be used to promptly replace the initial model to review the resources to be released.
[0105] According to the embodiments of the present disclosure, by replacing the initial model through an automatic update and iteration mechanism, the timeliness of the online model can be improved, the model iteration cycle can be reduced, the rapid changes of illegal resources can be effectively responded to, and the efficiency of identifying illegal content can be improved.
[0106] Figure 8 4 is a structural block diagram of a model updating device according to an embodiment of the present disclosure.
[0107] like Figure 8 As shown, the model updating device 800 of this embodiment includes an acquisition module 810 , a training module 820 , a model determination module 830 and a replacement module 840 .
[0108] The acquisition module 810 is used to obtain backflow data within a preset time range as sample data, wherein the backflow data includes illegal resources detected from online resources and normal resources extracted from online resources. Online resources are resources that have been reviewed and released by the initial model.
[0109] The training module 820 is used to perform multiple rounds of iterative training on the initial model using sample data.
[0110] The model determination module 830 is used to determine the exit model and the effectiveness threshold of the exit model from multiple models obtained through multiple rounds of iterative training, wherein the effectiveness threshold is a threshold used to review whether a resource is in violation of regulations.
[0111] The replacement module 840 is used to replace the initial model according to the qualified model and the effectiveness threshold to obtain an updated model.
[0112] According to an embodiment of the present disclosure, the acquisition module includes a generation submodule and an acquisition submodule.
[0113] The generation submodule is used to obtain the reflow data and the index file of the reflow data from the database according to a preset time period. The index file is generated according to the time information of the reflow data.
[0114] The acquisition submodule is used to obtain a preset ratio of illegal resources and normal resources from the reflow data according to the time sequence in the index file as sample data.
[0115] According to an embodiment of the present disclosure, the model updating apparatus 800 further includes a review module, a publishing module, and a storage module.
[0116] The review module is used to review resources to be released using the initial model.
[0117] The publishing module is used to publish the resources to be published in response to the resources to be published being approved by the initial model, and obtain the online resources.
[0118] The storage module is used to determine the return flow data from the online resources and store it in the database.
[0119] According to an embodiment of the present disclosure, the training module 820 includes a feature extraction submodule, an encoding submodule, a fusion submodule, a result determination submodule, and an adjustment submodule.
[0120] For each resource in the sample data, the feature extraction submodule is used to extract features from the text and image content in the resource, respectively, to obtain text features and image features. The encoding submodule is used to encode the text features and image features, respectively, to obtain text encoding features and image encoding features. The fusion submodule is used to perform weighted fusion of the text encoding features and image encoding features to obtain fused features. The result determination submodule is used to determine the audit result of the resource based on the fused features, where the audit result indicates whether the resource is a non-compliant resource. The adjustment submodule is used to adjust the parameters of the initial model based on the audit result of the resource.
[0121] According to an embodiment of the present disclosure, the initial model includes a dual-tower model, which includes a text tower and an image tower; the encoding submodule includes an encoding unit, which is used to use the text tower and the image tower to encode text features and image features respectively to obtain text encoding features and image encoding features.
[0122] According to an embodiment of the present disclosure, the model determination module 830 includes a testing submodule, a model determination submodule, an evaluation submodule, and a threshold determination submodule.
[0123] The testing submodule is used to test the recall rate of the model obtained in each round of iteration using test samples.
[0124] The model determination submodule is used to determine the correct model from multiple models after multiple rounds of iterative training based on the recall rate.
[0125] The evaluation submodule is used to evaluate the accuracy of the output model under multiple thresholds using evaluation samples.
[0126] The threshold determination submodule is used to determine an effective threshold from multiple thresholds based on the accuracy rate.
[0127] According to an embodiment of the present disclosure, the model updating apparatus 800 further includes a state determination module and a label determination module.
[0128] The status determination module is used to obtain resources containing a publishing status as an evaluation sample, wherein the publishing status is one of allowing publishing and denying publishing.
[0129] The label determination module is used to determine the label of the evaluation sample according to the release status.
[0130] According to an embodiment of the present disclosure, the replacement module 840 includes a storage submodule and a delivery submodule.
[0131] The storage submodule is used to store the model file of the output model and the threshold configuration file of the effective threshold to a preset storage path.
[0132] The distribution submodule is configured to distribute the updated model file and threshold configuration file to the resource distribution platform in response to detecting the updated model file and threshold configuration file from the preset storage path to replace the initial model.
[0133] Figure 9 is a block diagram of a resource auditing apparatus according to an embodiment of the present disclosure.
[0134] like Figure 9 As shown, the resource audit device 900 of this embodiment includes a first audit module 910 and a second audit module 920 .
[0135] The first review module 910 is used to review the resources to be released using the initial model.
[0136] The second review module 920 is configured to review the to-be-released resources using the updated model in response to the initial model being replaced with the updated model, wherein the updated model is obtained according to the apparatus provided by the present disclosure.
[0137] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0138] Figure 10 is a block diagram of an electronic device applicable to a model updating method and a resource auditing method according to an embodiment of the present disclosure.
[0139] Electronic device is intended to refer to various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic device may also refer to various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are intended to be examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0140] like Figure 10As shown, device 1000 includes a computing unit 1001, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1002 or a computer program loaded from a storage unit 1008 into a random access memory (RAM) 1003. RAM 1003 may also store various programs and data required for the operation of device 1000. Computing unit 1001, ROM 1002, and RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to bus 1004.
[0141] Various components in device 1000 are connected to I / O interface 1005, including an input unit 1006, such as a keyboard, mouse, etc.; an output unit 1007, such as various types of displays, speakers, etc.; a storage unit 1008, such as a magnetic disk, optical disk, etc.; and a communication unit 1009, such as a network card, modem, wireless communication transceiver, etc. The communication unit 1009 allows device 1000 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0142] Computing unit 1001 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of computing unit 1001 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Computing unit 1001 performs the various methods and processes described above, such as the model update method and the resource audit method. For example, in some embodiments, the model update method and the resource audit method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 1008. In some embodiments, part or all of the computer program may be loaded and / or installed onto device 1000 via ROM 1002 and / or communication unit 1009. When the computer program is loaded into RAM 1003 and executed by computing unit 1001, one or more steps of the model update method and resource audit method described above may be performed. Alternatively, in other embodiments, the computing unit 1001 may be configured to execute the model updating method and the resource auditing method in any other appropriate manner (for example, by means of firmware).
[0143] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-a-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0144] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0145] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fibers, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0146] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0147] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0148] Computer systems may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The client and server relationship arises through computer programs running on the respective computers and having a client-server relationship to each other.
[0149] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not limited herein.
[0150] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. A model updating method, comprising: Obtaining reflux data within a preset time range as sample data, wherein the reflux data includes illegal resources detected from online resources and normal resources extracted from the online resources, wherein the online resources are resources that have been approved and released by the initial model; Perform multiple rounds of iterative training on the initial model using the sample data; Determining an exit model and a validation threshold of the exit model from a plurality of models obtained through multiple rounds of iterative training, wherein the validation threshold is a threshold used to review whether a resource is in violation of regulations; and According to the permitted-exit model and the effective threshold, the initial model is replaced to obtain an updated model.
2. The method according to claim 1, wherein The acquiring of the reflux data within a preset time range as sample data includes: Acquire the reflow data and an index file of the reflow data from a database according to a preset time period, wherein the index file is generated according to time information of the reflow data; and According to the time sequence in the index file, a preset ratio of illegal resources and normal resources is obtained from the reflow data as the sample data.
3. The method according to claim 2, further comprising: Reviewing resources to be released using the initial model; In response to the resource to be released being approved by the initial model, the resource to be released is released to obtain the online resource; as well as Return flow data is determined from the online resources and stored in the database.
4. The method according to claim 1, wherein The performing multiple rounds of iterative training on the online audit model using the sample data includes: for each resource in the sample data, Extracting features of the text content and image content in the resource to obtain text features and image features; Encoding the text features and the image features respectively to obtain text encoding features and image encoding features; Performing weighted fusion on the text coding features and the image coding features to obtain fusion features; Determining an audit result of the resource based on the fusion feature, wherein the audit result indicates whether the resource is an illegal resource; and According to the audit result of the resource, the parameters of the initial model are adjusted.
5. The method according to claim 4, wherein The initial model includes a double-tower model, and the double-tower model includes a text tower and an image tower; encoding the text features and the image features respectively to obtain text encoding features and image encoding features includes: The text features and the image features are respectively encoded using the text tower and the image tower to obtain the text encoding features and the image encoding features.
6. The method according to claim 1, wherein Determining a model to be selected from the multiple models obtained from multiple rounds of iterative training and a validation threshold of the model to be selected includes: Use the test samples to test the recall rate of the model obtained in each round of iteration; Determining a qualified model from the multiple models after the multiple rounds of iterative training according to the recall rate; Using evaluation samples to evaluate the accuracy of the output model under multiple thresholds; and The effective threshold is determined from the multiple thresholds according to the accuracy rate.
7. The method according to claim 6, further comprising: Acquire a resource including a publishing status as an evaluation sample, wherein the publishing status is one of allowing publishing and denying publishing; and A label of the evaluation sample is determined according to the release status.
8. The method according to claim 1, wherein The replacing the initial model according to the exit model and the effectiveness threshold to obtain an updated model includes: Storing the model file of the permitted model and the threshold configuration file of the effective threshold to a preset storage path; and In response to detecting an updated model file and threshold configuration file from the preset storage path, the updated model file and threshold configuration file are distributed to a resource distribution platform to replace the initial model.
9. A resource audit method, comprising: Use the initial model to review resources to be released; as well as In response to the initial model being replaced with an updated model, reviewing the resources to be published using the updated model, Wherein, the updated model is obtained according to the method according to any one of claims 1 to 8.
10. A model updating device comprising: An acquisition module, configured to acquire reflux data within a preset time range as sample data, wherein the reflux data includes illegal resources detected from online resources and normal resources extracted from the online resources, wherein the online resources are resources that have been approved and released by the initial model; A training module, configured to perform multiple rounds of iterative training on the initial model using the sample data; A model determination module, configured to determine an exit model and a validation threshold of the exit model from a plurality of models obtained through multiple rounds of iterative training, wherein the validation threshold is a threshold for reviewing whether a resource is in violation of regulations; and A replacement module is used to replace the initial model according to the qualified model and the effectiveness threshold to obtain an updated model.
11. A resource auditing device, comprising: A first review module, used to review resources to be released using an initial model; as well as A second review module is configured to review the resources to be released using the updated model in response to the initial model being replaced with the updated model. Wherein, the updated model is obtained according to the apparatus described in claim 10.
12. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9.
13. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 9.
14. A computer program product, comprising a computer program, wherein the computer program is stored on at least one of a readable storage medium and an electronic device, and when the computer program is executed by a processor, implements the method according to any one of claims 1 to 9.