Video review method and device
By jointly processing video data with multiple target detection models, the problem of poor video detection accuracy in the existing technology is solved, and higher video detection accuracy and richness of detection methods are achieved.
Patent Information
- Application Number
- CN202410580440.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-11
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-05-11
AI Technical Summary
Existing video review systems only rely on a single model for detection, resulting in poor video detection accuracy.
By obtaining the data to be detected and the name of the review channel of the video to be reviewed, multiple target detection models are queried, these models are called to process the data to be detected, and the final category of the video is determined from multiple detection results.
It improves the accuracy of video detection, enriches detection methods, and enhances the ability to detect abnormalities in videos.
Smart Images

Figure CN118152989B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a video review method and device. Background Art
[0002] With the development of Internet technology, users can access a wide variety of information on the Internet, and video is one of the main information carriers; in order to maintain a clean and green Internet environment, videos need to be reviewed.
[0003] Currently, the review system only uses a single model to detect whether a video is abnormal. For example, it only uses a single image classification model to detect screenshots of a video. The detection method is relatively simple, resulting in poor video detection accuracy. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a video review method and device to solve the problem of poor video detection accuracy when only using a single model to detect whether a video is abnormal.
[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0006] A first aspect of an embodiment of the present invention discloses a video review method, the method comprising:
[0007] Obtain the data to be detected and the name of the review channel of the video to be reviewed, wherein the data to be detected includes text data and image data;
[0008] Query a model name list corresponding to the audit channel name from a rule map, wherein the model name list includes multiple model names;
[0009] Querying a target detection model corresponding to a model name in the model name list from a model map, where the target detection model is a text detection model or an image detection model;
[0010] Calling the target detection model to process the data to be detected to obtain corresponding detection results;
[0011] The detection results obtained by processing the data to be detected using each of the target detection models are used to determine the final category of the video to be reviewed.
[0012] Preferably, calling the target detection model to process the data to be detected to obtain corresponding detection results includes:
[0013] If the target detection model is a text detection model, based on the specified configuration items of the target detection model, the target detection model is called by the service name or IP port to process the text data in the data to be detected, and a corresponding detection result is obtained;
[0014] If the target detection model is an image detection model, based on the specified configuration items of the target detection model, the target detection model is called through the service name or IP port to process the image data in the data to be detected to obtain the corresponding detection result.
[0015] Preferably, the detection result at least includes a category and a probability corresponding to the category;
[0016] Using each of the target detection models to process the detection results obtained by the data to be detected to determine the final category of the video to be reviewed, including:
[0017] From the detection results obtained by processing the data to be detected by each of the target detection models, determine the category with the highest probability as the final category of the video to be reviewed.
[0018] Preferably, it also includes:
[0019] The rule map and the model map are updated periodically according to a preset update cycle.
[0020] Preferably, after determining the final category of the video to be reviewed, the method further includes:
[0021] The final category of the video to be reviewed is sent to a designated message queue, so that the business line obtains the final category of the video to be reviewed from the designated message queue.
[0022] A second aspect of an embodiment of the present invention discloses a video review device, the device comprising:
[0023] An acquisition unit, used to acquire the data to be detected and the name of the audit channel of the video to be audited, wherein the data to be detected includes text data and image data;
[0024] A first query unit, used to query a model name list corresponding to the audit channel name from a rule map, wherein the model name list includes multiple model names;
[0025] A second query unit is used to query a target detection model corresponding to a model name in the model name list from a model map, wherein the target detection model is a text detection model or an image detection model;
[0026] A detection unit, used for calling the target detection model to process the data to be detected and obtain corresponding detection results;
[0027] A determination unit is used to use each of the target detection models to process the detection results obtained by the data to be detected, and determine the final category of the video to be reviewed.
[0028] Preferably, the detection unit is specifically used for:
[0029] If the target detection model is a text detection model, based on the specified configuration items of the target detection model, the target detection model is called by the service name or IP port to process the text data in the data to be detected, and a corresponding detection result is obtained;
[0030] If the target detection model is an image detection model, based on the specified configuration items of the target detection model, the target detection model is called through the service name or IP port to process the image data in the data to be detected to obtain the corresponding detection result.
[0031] Preferably, the detection result at least includes a category and a probability corresponding to the category; the determination unit is specifically used to: determine the category with the highest probability as the final category of the video to be reviewed from the detection results obtained by processing the data to be detected by each target detection model.
[0032] Preferably, it also includes:
[0033] An updating unit is used to periodically update the rule map and the model map according to a preset updating period.
[0034] Preferably, it also includes:
[0035] The sending unit is used to send the final category of the video to be reviewed to a designated message queue, so that the business line obtains the final category of the video to be reviewed from the designated message queue.
[0036] Based on the above-mentioned embodiment of the present invention, a video review method and device are provided. The method is as follows: obtain the data to be detected and the name of the review channel of the video to be reviewed; query the model name list corresponding to the review channel name from the rule map, and the model name list contains multiple model names; query the target detection model corresponding to the model name in the model name list from the model map; call the target detection model to process the data to be detected and obtain the corresponding detection result; use the detection results obtained by processing the data to be detected by each target detection model to determine the final category of the video to be reviewed. In this scheme, the data to be detected and the name of the review channel of the video to be reviewed are obtained, and the multiple target detection models to be called are determined according to the review channel name. Call the target detection model to process the data to be detected to obtain the corresponding detection result, and determine the final category of the video to be reviewed from the multiple detection results. This scheme processes the data to be detected by multiple detection models, and determines the final category of the video to be reviewed from the multiple detection results, which enriches the detection means for the video and improves the accuracy of video detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0038] Figure 1 A flowchart of a video review method provided by an embodiment of the present invention;
[0039] Figure 2 A principle framework diagram of a video review method provided by an embodiment of the present invention;
[0040] Figure 3 A structural block diagram of a video review device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0041] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0042] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0043] From the background technology, we can know that the current review system only uses a single model to detect whether the video is abnormal. For example, only a single image classification model is used to detect screenshots of the video, or only a single text classification model is used to detect the text of the video. The detection method is relatively single, resulting in poor video detection accuracy.
[0044] To solve the above problems, an embodiment of the present invention proposes a video review method and device, which obtains the data to be detected and the review channel name of the video to be reviewed, and determines the multiple target detection models to be called according to the review channel name. The target detection model is called to process the data to be detected to obtain the corresponding detection results, and the final category of the video to be reviewed is determined from the multiple detection results. By processing the data to be detected by multiple detection models and determining the final category of the video to be reviewed from the multiple detection results, the detection means for the video are enriched, thereby improving the accuracy of video detection.
[0045] It should be noted that in order to better understand the contents of the subsequent embodiments of this solution, the terms and components involved in this solution are first explained here.
[0046] Message Queue (MQ): Message queue middleware is an important component in distributed systems. It is mainly used to solve problems such as application coupling, asynchronous messages, and traffic clipping. The message queue used in this solution can be RocketMQ (other types of message queues can also be used).
[0047] Message: The carrier for transmitting information in a message queue.
[0048] Producer: A message producer or publisher, responsible for producing and sending messages. Creating a Producer in RocketMQ requires specifying a topic and group.
[0049] Consumer: A message consumer or message subscriber, responsible for receiving and consuming messages. Creating a Consumer in RocketMQ requires specifying a topic and group.
[0050] Topic: The category of messages sent by Producer and pulled by Consumer. Topic is the message subject. The first-level message type classifies messages by Topic.
[0051] Group: A type of Producer or Consumer. Producers or Consumers of the same type usually produce or consume the same type of messages, and the logic of message publishing or subscription is consistent.
[0052] RPC: Remote Procedure Call, which is equivalent to one node requesting a service provided by another node.
[0053] Apollo: The configuration center used in this solution.
[0054] Text classification: Use text detection models (such as TextCNN, Bert, and other models) to classify text content.
[0055] Image classification: Use image detection models (such as CNN, MobileNet, opennsfw, CLIP, etc.) to classify image content.
[0056] Audit channel: An aggregation relationship that aggregates different types of videos (such as videos uploaded from different sources) into the same channel. Different audit channels use different detection models. For example, the video-sohu-video_131; video-sohu-video_11; video-sohu-video_1 configured in the passage field mentioned in the subsequent embodiments of the present invention are three detection channels.
[0057] Receiver component: As an MQ consumer, it is responsible for receiving the data submitted for inspection (such as a series of images and text information).
[0058] Apollo component: used to configure detection models and rules (also called detection rules).
[0059] Discover component: Used in conjunction with the Apollo component to obtain the configuration of detection models and rules.
[0060] Invoker component: used to call the detection model and obtain the detection results.
[0061] Actioner component: As an MQ producer, it is responsible for sending the detection results of the detection model to the business side.
[0062] Manager component: responsible for arranging all components, accepting image data and text data for inspection, calling detection models to detect image data and text data, and summarizing and sending the detection results to the business side.
[0063] In practical applications, this solution can use multiple different types of AI detection models to jointly detect whether a video is abnormal. Among them, the text detection model is used to detect the text content of the video (such as title, label, concise, and text obtained by voice conversion), and the image detection model is used to detect the screenshot of the video. The detection results of each detection model are combined to determine whether the video is abnormal, thereby improving the accuracy of video detection. The present solution is described in detail through various embodiments below.
[0064] See also Figure 1 , shows a flow chart of a video review method provided by an embodiment of the present invention, the video review method comprising:
[0065] Step S101: Obtain the data to be detected and the name of the review channel of the video to be reviewed.
[0066] In the specific implementation of step S101, the data to be detected and the audit channel name transmitted by the business line to the message queue (such as MQ) are obtained, and the data to be detected includes text data and image data.
[0067] In actual applications, the incoming topic (denoted as topic_in) and outgoing topic (denoted as topic_out) of MQ are determined in advance; the Receiver component listens to the messages in topic_in as a consumer, and the business line sends the data to be tested of the video to be reviewed to topic_in as a producer.
[0068] It should be noted that the text data in the data to be detected can be a text list of videos to be reviewed, which includes video titles, text tags, video introductions, etc. Specifically, the audio of the video to be reviewed can be automatically extracted through a speech-to-text model and the audio can be converted into text data; the image data in the data to be detected can be a screenshot list of the video to be reviewed, and the screenshots in the screenshot list are generated by key frames during the transcoding process of the video to be reviewed.
[0069] When the Receiver component receives the data to be detected, it sends the data type, audit channel name, and data to be detected (text list, screenshot list, etc.) to the Manager component. The audit channel name passed to the Manager component is in the form of a string, which is the content of the passage field mentioned in the subsequent content.
[0070] Step S102: query the model name list corresponding to the audit channel name from the rule map, and the model name list contains multiple model names.
[0071] It should be noted that this solution pre-configures the detection model and detection rules, and then constructs the rule map and model map through the configured detection model and detection rules; the detection model, detection rules, rule map and model map are explained below respectively.
[0072] 1. Specific examples of detection models:
[0073] In the configuration information of the detection model, the key of the detection model is "ai.image.check.models" and the value of the detection model is:
[0074] “[
[0075] {
[0076] "modelName": "pornCheckModel",
[0077] "type":"image",
[0078] "loadBalance": true,
[0079] "serviceName": "monitor.ai-service-v2.online",
[0080] "uri": " / ai / predict",
[0081] "categories": [
[0082] "Category 1",
[0083] "Category 2",
[0084] "Category 3" ]
[0086] },
[0087] {
[0088] "modelName": "horrorCheckModel",
[0089] "type":"image",
[0090] "loadBalance": false,
[0091] "ip": "*.*.*.*:8080",
[0092] "uri": " / ai / predict2",
[0093] "categories": [
[0094] "Category 4",
[0095] "Category 5",
[0096] "Category 6",
[0097] "Category 7" ]
[0099] },
[0100] {
[0101] "modelName": "textCheckModel",
[0102] "type":"text",
[0103] "loadBalance": false,
[0104] "ip": "*.*.*.*:8080",
[0105] "uri": " / ai / predictText",
[0106] "categories": [
[0107] "Category 8",
[0108] "Category 9",
[0109] "Category 10" ]
[0111] },
[0112] {
[0113] "modelName": "textCheckModel2",
[0114] "type":"text",
[0115] "loadBalance": true,
[0116] "serviceName": "monitor.ai-service.online",
[0117] "uri": " / ai / predictText",
[0118] "categories": [
[0119] "Category 11",
[0120] "Category 12",
[0121] "Category 13" ]
[0123] }
[0124] ]”
[0125] It should be noted that the above-mentioned categories 1 to 13 are used to indicate the categories of the videos, and the specific contents of categories 1 to 13 may be set according to actual conditions.
[0126] The configuration information of the detection model in the above example is a JSON list, which configures four detection models (AI detection models): ornCheckModel, horrorCheckModel, textCheckModel, and textCheckModel2. The meaning of each configuration item in these four detection models is as follows:
[0127] modelName is the name of the detection model; type has two values: text and image. text and image respectively indicate that the detection type of the detection model is text detection and image detection. The detection model with type text is a text detection model, and the detection model with type image is an image detection model.
[0128] The loadBalance of the detection model has two values: true and false. When loadBalance is true, you need to configure the serviceName field (configure the service name), which means that when the Invoker component calls the detection model, it can use load balancing and call it through the service name configured by serviceName. The specific load balancing process is: use the ribbon component (load balancing component) of springcloud with the eureka registration center to call the detection model through the service name.
[0129] When loadBalance is false, you need to configure the IP field, which means that when the Invoker component calls the detection model, it can directly use the IP port to call it; the URL field indicates the URL path when calling the detection model; the categories field indicates the categories (or classifications) that the detection model can detect.
[0130] For example, the way to call the detection model using load balancing is as follows: the inference service where the detection model textCheckModel2 is located is an http service, that is, it can be called through the IP port and URL path of the server where textCheckModel2 is located; the inference service where textCheckModel2 is located is deployed on multiple machines; the inference service where textCheckModel2 is located, as a client of the eureka registry, registers its own IP port information with the eureka registry with the registration name "monitor.ai-service.online"; the Invoker component, also as a client of the eureka registry, uses the ribbon component to obtain an IP port of the inference service where textCheckModel2 is located from the eureka registry through the service name "monitor.ai-service.online" and a certain load balancing strategy for calling.
[0131] The advantages of the aforementioned method of calling the detection model in a load balancing manner are: the traffic is evenly distributed to the various machines of the inference service where textCheckModel2 is located to maximize resource utilization; the ribbon component can automatically retry, and when the machine where a certain inference service is located is busy and unresponsive, the next machine can be retried.
[0132] 2. Specific examples of detection rules:
[0133] In the configuration information of the detection rule, the key of the detection rule is "ai.image.check.rules" and the value of the detection rule is:
[0134] “[
[0135] {
[0136] "models": [
[0137] "pornCheckModel",
[0138] "horrorCheckModel"
[0139] ],
[0140] "passage": "video-sohu-video_1"
[0141] },
[0142] {
[0143] "models": [
[0144] "pornCheckModel",
[0145] "textCheckModel",
[0146] "textCheckModel2"
[0147] ],
[0148] "passage": "video-sohu-video_131;video-sohu-video_11"
[0149] }
[0150] ]”
[0151] The meaning of each field in the configuration information of the detection rule in the above example is: the passage field is the name of the review channel. For example, the two review channel names "video-sohu-video_131" and "video-sohu-video_11" respectively represent the review channel "video-sohu-video_131" and the review channel "video-sohu-video_11", which is equivalent to a video aggregation relationship, that is, videos of the same type are aggregated in one review channel.
[0152] The Models field indicates which detection models the audit channel uses for detection. An audit channel can be configured to use multiple detection models (similarly, in actual applications, one detection model can also be configured to use). The model name of the detection model configured for the audit channel is the model name in the above "ai.image.check.models".
[0153] 3. Examples of rule maps and model maps:
[0154] When the Discover component is started, it queries the configuration with the key "ai.image.check.rules" in the Apollo configuration center to obtain all detection rules.
[0155] The Discover component parses each detection rule and saves the model name of the passage and the detection model into the rule map (referred to as rulemap); the structure of the rule map is: the key is the audit channel name, and the value is the model name list.
[0156] The Discover component queries the configuration information with the key "ai.image.check.models" in the Apollo configuration center to obtain the configuration information of all detection models.
[0157] The Discover component parses the configuration information of each detection model, and saves the model name as the key and the model entity as the value into the model map (denoted as modelmap).
[0158] It should be noted that the model entity refers to a Java object, which stores all the contents in the configuration information of the detection model.
[0159] The above is an example description of the detection model, detection rules, rule map, and model map.
[0160] In some embodiments, the rule map and the model map are updated periodically according to a preset update cycle; specifically, the Discover component calls the Apollo configuration center to refresh the rule map and the model map every preset update cycle, for example: the Discover component calls the Apollo configuration center to refresh the rule map and the model map every 3 minutes.
[0161] In the specific implementation of step S102, after obtaining the review channel name of the video to be reviewed, first determine whether the review channel name is configured with a detection rule;
[0162] If the audit channel name is configured with a detection rule, the model name list corresponding to the audit channel name is queried from the rule map. The model name list contains multiple model names (in actual applications, it may also contain only one model name).
[0163] Specifically, the Manager component calls the Discover component to pass in the audit channel name, and determines whether the audit channel name is configured with detection rules; if the audit channel name is configured with detection rules, the Manager component obtains the corresponding model name list from the rule map based on the audit channel name.
[0164] Step S103: querying the target detection model corresponding to the model name in the model name list from the model map, where the target detection model is a text detection model or an image detection model.
[0165] In the process of implementing step S103, after obtaining the model name list corresponding to the input audit channel name from the rule map, the Manager component traverses the model name list and queries the target detection model corresponding to each model name in the model name list from the model map, each target detection model is a text detection model or an image detection model.
[0166] The specific process of querying the target detection model from the model map is as follows:
[0167] After the Discover component builds the model map, the Discover component provides a method to obtain the detection model by model name; create a ModelConfig class to register all detection models as spring beans;
[0168] Register all detection models in the Manager component, that is, register the model name and detection model in checkmodelmap.
[0169] When the Manager component receives the message, it first obtains the detection rules from the rule map according to the audit channel name. If the audit channel name is configured with detection rules, it traverses the detection rules of the audit channel name to obtain the corresponding model name list; then it uses "checkmodelmap" to obtain the Model bean corresponding to the target detection model from the model map according to the model name; finally, it calls the target detection model through the check method of the Model bean and the invoker component.
[0170] Step S104: calling the target detection model to process the data to be detected to obtain corresponding detection results.
[0171] In the specific implementation process of step S104, after the Manager component traverses the model name list to obtain the target detection model, according to the detection category of the target detection model (detecting text or image), the text data or image data in the data to be detected is passed into the target detection model for detection processing, thereby obtaining the detection result for the video to be reviewed obtained by the target detection model.
[0172] In some embodiments, the specific method of calling the target detection model to process the data to be detected to obtain the corresponding detection result is: if the target detection model is a text detection model, based on the specified configuration item of the target detection model (that is, the loadBalance field mentioned in the above step S102), the target detection model is called by the service name (serviceName) or IP port to process the text data in the data to be detected to obtain the corresponding detection result;
[0173] If the target detection model is an image detection model, based on the specified configuration items of the target detection model, the target detection model is called through the service name or IP port to process the image data in the data to be detected to obtain the corresponding detection results.
[0174] In actual applications, the checkmodel parent class is defined, which holds the Invoker component; the Invoker component implements the following methods: calling the detection model by IP port (recorded as "invokeByIp" method), calling the detection model by service name and load balancing (recorded as "invokeByServiceName" method). The load balancing strategy is random, polling, consistent hashing, hashing or weighted, etc.
[0175] The Invoker component decides whether to use the "invokeByIp" method or the "invokeByServiceName" method according to whether the specified configuration item of the target detection model (that is, the loadBalance field mentioned in the above step S102) is true.
[0176] Step S105: Utilize each target detection model to process the detection results obtained from the data to be detected, and determine the final category of the video to be reviewed.
[0177] It should be noted that the detection result obtained by the target detection model at least includes the category and the probability corresponding to the category; for example, the detection result obtained by the target detection model when detecting the data to be detected is as follows:
[0178] "{
[0179] "result": "Normal",
[0180] "probability": 0.9999704360961914
[0181] }".
[0182] Among them, result is the category (or classification) of the video to be reviewed, and probability is the probability corresponding to the detected category of the video to be reviewed.
[0183] In the process of implementing step S105, since multiple detection models are configured in one review channel, the target detection models determined above are also multiple; the Manager component aggregates the detection results obtained by multiple target detection models, and determines the category with the highest probability as the final category of the video to be reviewed from the detection results obtained by each target detection model processing the data to be detected.
[0184] For example, suppose there are two target detection models. The detection results obtained by these two target detection models when processing the data to be detected are as follows:
[0185] "{
[0186] "result": "Category 1",
[0187] "probability": 0.88
[0188] }
[0189] {
[0190] "result": "Category 2",
[0191] "probability": 0.9999704360961914
[0192] }”
[0193] The Manager component summarizes the detection results obtained by the two target detection models and determines that the probability of category 2 is the highest. Therefore, it can be determined that the final category of the video to be reviewed is category 2.
[0194] In some embodiments, after the final category of the video to be reviewed is determined, the final category of the video to be reviewed is sent to a designated message queue (ie, topic_out of the MQ mentioned in step S101), so that the business line obtains the final category of the video to be reviewed from the designated message queue.
[0195] Specifically, the Manager component calls the Actioner component, and the Actioner component, as the producer of topic_out, sends the final category of the video to be reviewed to topic_out; the business line, as the consumer of topic_out, monitors topic_out. After the final category of the video to be reviewed is sent to topic_out, the business line can obtain the final category of the video to be reviewed from topic_out.
[0196] In an embodiment of the present invention, the data to be detected and the name of the audit channel of the video to be reviewed are obtained, and multiple target detection models to be called are determined according to the name of the audit channel. The target detection model is called to process the data to be detected to obtain corresponding detection results, and the final category of the video to be reviewed is determined from the multiple detection results. This solution processes the data to be detected through multiple detection models, and determines the final category of the video to be reviewed from the multiple detection results, which enriches the detection means for the video and improves the accuracy of video detection.
[0197] Through the above-mentioned embodiments of the present invention Figure 1 As can be seen from the contents of each step, this solution implements video review by calling multiple components. Figure 2 A principle framework diagram of a video review method is shown for illustration.
[0198] like Figure 2 It can be seen that the model detection orchestration model includes the discover component, manager component, receiver component, actioner component, invoker component, and result determiner; each detection model is deployed independently.
[0199] The Apollo component is used to configure detection models and detection rules. The discover component is used in conjunction with the Apollo component. The discover component configures and regularly updates the rule map and model map.
[0200] The business line passes the data to be tested of the video to be reviewed into topic_in, and the receiver component obtains the data to be tested from topic_in.
[0201] The manager component obtains configuration information from the discover component and determines the target detection model; the manager component passes the model address to the invoker component, and the manager component passes the voting rule to the result determiner. The voting rule of this solution is "determine the category with the highest probability as the final category of the video to be reviewed."
[0202] The invoker component calls the target detection model according to the multi-threaded service, where service ( Figure 2 Service1 to service3 in the above refers to the HTTP service itself provided by the inference service. Synchronous HTTP and asynchronous HTTP refer to the HTTP response methods provided by the inference service. TPU (tensor processing unit) is a dedicated integrated circuit used for specific applications. CPU, GPU, and TPU specifically refer to the hardware used by the machine where the inference service is located.
[0203] After the invoker component calls the target detection model to process the data to be detected and obtains the corresponding detection result, the invoker component sends the detection result to the result determiner.
[0204] The result determiner gives the final category of the video to be reviewed according to the voting rules (that is, Figure 2 The actioner component sends the final category of the video to be reviewed to topic_out, and the business line obtains the final category of the video to be reviewed from topic_out.
[0205] The implementation principle of the above principle framework diagram can be found in the above embodiment of the present invention. Figure 1 The contents of each step will not be repeated here.
[0206] This solution can be applied in the audit system. In the audit system, a variety of different AI detection models can be orchestrated to work together for different audit channels to improve the accuracy of video anomaly detection and increase the flexibility of AI detection model configuration. The detection model can be dynamically orchestrated without restarting the service, which improves the work efficiency of the audit system operation.
[0207] Corresponding to a video review method provided by the above embodiment of the present invention, see Figure 3 , the embodiment of the present invention also provides a structural block diagram of a video review device, the video review device includes: an acquisition unit 301, a first query unit 302, a second query unit 303, a detection unit 304 and a determination unit 305;
[0208] The acquisition unit 301 is used to acquire the data to be detected and the name of the review channel of the video to be reviewed, where the data to be detected includes text data and image data.
[0209] The first query unit 302 is used to query a model name list corresponding to the audit channel name from the rule map, and the model name list includes multiple model names.
[0210] The second query unit 303 is used to query the target detection model corresponding to the model name in the model name list from the model map, where the target detection model is a text detection model or an image detection model.
[0211] The detection unit 304 is used to call the target detection model to process the data to be detected and obtain the corresponding detection result.
[0212] In a specific implementation, the detection unit 304 is specifically used to: if the target detection model is a text detection model, based on the specified configuration items of the target detection model, call the target detection model through the service name or IP port to process the text data in the data to be detected, and obtain the corresponding detection result;
[0213] If the target detection model is an image detection model, based on the specified configuration items of the target detection model, the target detection model is called through the service name or IP port to process the image data in the data to be detected to obtain the corresponding detection results.
[0214] The determination unit 305 is used to use each target detection model to process the detection results obtained by the data to be detected, and determine the final category of the video to be reviewed.
[0215] In a specific implementation, the detection result at least includes a category and a probability corresponding to the category; the determination unit 305 is specifically used to: determine the category with the highest probability as the final category of the video to be reviewed from the detection results obtained by processing the data to be detected by each target detection model.
[0216] In an embodiment of the present invention, the data to be detected and the name of the audit channel of the video to be reviewed are obtained, and multiple target detection models to be called are determined according to the name of the audit channel. The target detection model is called to process the data to be detected to obtain corresponding detection results, and the final category of the video to be reviewed is determined from the multiple detection results. This solution processes the data to be detected through multiple detection models, and determines the final category of the video to be reviewed from the multiple detection results, which enriches the detection means for the video and improves the accuracy of video detection.
[0217] Preferably, combined Figure 3 The video review device also includes:
[0218] The updating unit is used to periodically update the rule map and the model map according to a preset updating cycle.
[0219] Preferably, combined Figure 3 The video review device also includes:
[0220] The sending unit is used to send the final category of the video to be reviewed to the specified message queue, so that the business line obtains the final category of the video to be reviewed from the specified message queue.
[0221] In summary, the embodiments of the present invention provide a video review method and device, which obtain the data to be detected and the review channel name of the video to be reviewed, and determine the multiple target detection models to be called according to the review channel name. The target detection model is called to process the data to be detected to obtain the corresponding detection results, and the final category of the video to be reviewed is determined from the multiple detection results. This solution processes the data to be detected through multiple detection models, and determines the final category of the video to be reviewed from the multiple detection results, which enriches the detection methods for videos and improves the accuracy of video detection.
[0222] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.
[0223] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0224] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A video review method, characterized in that: The method comprises: Obtain the data to be detected and the name of the audit channel of the video to be reviewed that is passed into the message queue by the business line, wherein the data to be detected includes text data and image data; wherein the audit channel is used to aggregate videos uploaded from different sources; Query a model name list corresponding to the audit channel name from a rule map, wherein the model name list includes multiple model names; Querying a target detection model corresponding to a model name in the model name list from a model map, where the target detection model is a text detection model or an image detection model; Calling the target detection model to process the data to be detected to obtain a corresponding detection result; the detection result at least includes a category and a probability corresponding to the category; wherein there is no same category among the categories that can be detected by any two detection models; From the detection results obtained by processing the data to be detected by each of the target detection models, determine the category with the highest probability as the final category of the video to be reviewed.
2. The method according to claim 1, characterized in that Calling the target detection model to process the data to be detected to obtain corresponding detection results, including: If the target detection model is a text detection model, based on the specified configuration items of the target detection model, the target detection model is called by the service name or IP port to process the text data in the data to be detected, and a corresponding detection result is obtained; If the target detection model is an image detection model, based on the specified configuration items of the target detection model, the target detection model is called through the service name or IP port to process the image data in the data to be detected to obtain the corresponding detection result.
3. The method according to claim 1 or 2, characterized in that: Also includes: The rule map and the model map are updated periodically according to a preset update cycle.
4. The method according to claim 1 or 2, characterized in that: After determining the final category of the video to be reviewed, it also includes: The final category of the video to be reviewed is sent to a designated message queue, so that the business line obtains the final category of the video to be reviewed from the designated message queue.
5. A video review device, characterized in that: The device comprises: An acquisition unit is used to acquire the data to be detected and the name of the audit channel of the video to be reviewed that is transmitted to the message queue by the business line, wherein the data to be detected includes text data and image data; wherein the audit channel is used to aggregate videos uploaded from different sources; A first query unit, used to query a model name list corresponding to the audit channel name from a rule map, wherein the model name list includes multiple model names; A second query unit is used to query a target detection model corresponding to a model name in the model name list from a model map, wherein the target detection model is a text detection model or an image detection model; A detection unit, used for calling the target detection model to process the data to be detected to obtain a corresponding detection result; the detection result at least includes a category and a probability corresponding to the category; wherein there is no same category among the categories that can be detected by any two detection models; A determination unit is used to determine the category with the highest probability as the final category of the video to be reviewed from the detection results obtained by processing the data to be detected by each target detection model.
6. The device according to claim 5, characterized in that The detection unit is specifically used for: If the target detection model is a text detection model, based on the specified configuration items of the target detection model, the target detection model is called by the service name or IP port to process the text data in the data to be detected, and a corresponding detection result is obtained; If the target detection model is an image detection model, based on the specified configuration items of the target detection model, the target detection model is called through the service name or IP port to process the image data in the data to be detected to obtain the corresponding detection result.
7. The device according to claim 5 or 6, characterized in that Also includes: An updating unit is used to periodically update the rule map and the model map according to a preset updating period.
8. The device according to claim 5 or 6, characterized in that Also includes: The sending unit is used to send the final category of the video to be reviewed to a designated message queue, so that the business line obtains the final category of the video to be reviewed from the designated message queue.
