CN109522822A - A kind of video detecting method and device - Google Patents

A kind of video detecting method and device Download PDF

Info

Publication number
CN109522822A
CN109522822A CN201811280432.7A CN201811280432A CN109522822A CN 109522822 A CN109522822 A CN 109522822A CN 201811280432 A CN201811280432 A CN 201811280432A CN 109522822 A CN109522822 A CN 109522822A
Authority
CN
China
Prior art keywords
detection model
data
pornographic
video
detected
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811280432.7A
Other languages
Chinese (zh)
Inventor
王涛
李律松
吕树恩
陈强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201811280432.7A priority Critical patent/CN109522822A/en
Publication of CN109522822A publication Critical patent/CN109522822A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content

Abstract

The present invention provides a kind of video detecting method and devices, which comprises obtains the Detection task in task message queue, reads the video data to be detected in the Detection task;Multiple image data are extracted with assigned frequency based on the video data to be detected, the multiple image data are packaged as to the test video frame packet of the video data to be detected;The test video frame packet is inputted to the detection model constructed in advance, the detection model includes pornographic detection model and/or flower screen detection model;Pornographic and/or flower screen detection is carried out to the test video frame packet based on the pornographic detection model and/or flower screen detection model.Based on method provided by the invention, frame processing is taken out by carrying out to video data to be detected, to save detection time while guaranteeing that testing result is accurate;And it will be directly inputted into corresponding detection model after test video frame packet, further promote video detection efficiency.

Description

A kind of video detecting method and device
Technical field
The present invention relates to detection technique fields, more particularly to a kind of video detecting method and device.
Background technique
With the continuous development of network technology, various internet shared informations are also risen therewith.Especially for network video For frequency, other than the videos such as traditional news video, film and television, there are also many small videos and live videos etc..And It may lead to packet loss due to network delay etc. in the communication process of network video and generate some flower screen videos, influence User's perception.In addition, due to more than network video quantity and can concealment it is strong, may be utilized and propagate the flames such as pornographic, And then it causes damages to the public.Therefore, how network video is detected to guarantee that the video for recommending user is healthy and complete Be urgently to be resolved.
Summary of the invention
On the present invention provides a kind of video detecting methods and device to overcome the above problem or at least be partially solved State problem.
According to an aspect of the invention, there is provided a kind of video detecting method, comprising:
The Detection task in task message queue is obtained, the video data to be detected in the Detection task is read;
Multiple image data are extracted with assigned frequency based on the video data to be detected, the multiple image data are beaten Packet is the test video frame packet of the video data to be detected;
The test video frame packet is inputted to the detection model constructed in advance, the detection model includes pornographic detection model And/or flower screen detection model;
Based on the pornographic detection model and/or flower screen detection model to the test video frame packet carry out it is pornographic and/or Hua Ping detection.
Optionally, it is described based on the video data with assigned frequency extract multiple image data after, by the multiframe Image data is packaged as before the test video frame packet of the video data to be detected, further includes:
The multiple image data are decoded, the code of the multiple image data is adjusted to default range of code rates It is interior.
Optionally, described that detection model is chosen in default detection model, and will be described in test video frame packet input Before detection model, further includes:
Pornographic detection model is constructed, and based on the first data set training pornographic detection model;And/or
Building flower screen detection model, and based on the second data set training flower screen detection model.
Optionally, the pornographic detection model of the building, and based on the first data set training pornographic detection model, packet It includes:
Pornographic detection model is constructed based on VGG, Inception or Inception-Resnet network structure;
It obtains network video data and has been subjected to the video data of manual examination and verification, extract the positive sample of the first numerical value respectively Data and the negative sample data of second value construct the first data set;
Based on the first data set training pornographic detection model.
Optionally, building flower screen detection model, and based on the second data set training flower screen detection model, comprising:
Flower screen detection model is constructed based on VGG, Inception or Inception-Resnet network structure;
Training data is fitted by video processing technique and deep learning GAN and constructs the second data set;
Based on second data set training flower screen detection model.
Optionally, it is described based on the pornographic detection model and/or flower screen detection model to the test video frame packet into Row is pornographic and/or flower screen detects, comprising:
It is given a mark based on the pornographic detection model to each frame image data in the test video frame packet;
Configure the first confidence level parameter;
In conjunction with the first confidence level parameter judge the corresponding video data to be detected of the test video frame packet whether be Pornographic video.
Optionally, it is described based on the pornographic detection model and/or flower screen detection model to the test video frame packet into After row pornographic and/or flower screen detection, further includes:
It is given a mark, and analyzed to each frame image data in the test video frame packet based on the flower screen detection model The score value of each frame image data in the test video frame packet;
Configure the second confidence level parameter;
In conjunction with the second confidence level parameter judge the corresponding video data to be detected of the test video frame packet whether be Flower screen video.
Optionally, the Detection task obtained in task message queue, reads the view to be detected in the Detection task Before frequency evidence, further includes:
The task message detected to video data is transmitted by class Kafka Distributed Message Queue Qbus.
According to another aspect of the present invention, a kind of video detecting device is additionally provided, comprising:
Read module is configured to obtain the Detection task in task message queue, read to be checked in the Detection task Survey video data;
Frame module is taken out, the video data to be detected is configured to assigned frequency and extracts multiple image data, by institute State the test video frame packet that multiple image data are packaged as the video data to be detected;
Input module is configured to the test video frame packet inputting the detection model constructed in advance, the detection model Including pornographic detection model and/or flower screen detection model;
Detection module is configured to the pornographic detection model and/or flower screen detection model to the test video frame Packet carries out pornographic and/or flower screen detection.
Optionally, described device further includes decoder module, is configured that and is decoded to the multiple image data, by institute The code for stating multiple image data is adjusted in default range of code rates.
Optionally, described device further includes model construction module, is configured that
Pornographic detection model is constructed, and based on the first data set training pornographic detection model;And/or
Building flower screen detection model, and based on the second data set training flower screen detection model.
Optionally, the model construction module is additionally configured to:
Pornographic detection model is constructed based on VGG, Inception or Inception-Resnet network structure;
It obtains network video data and has been subjected to the video data of manual examination and verification, extract the positive sample of the first numerical value respectively Data and the negative sample data of second value construct the first data set;
Based on the first data set training pornographic detection model.
Optionally, the model construction module is additionally configured to:
Flower screen detection model is constructed based on VGG, Inception or Inception-Resnet network structure;
Training data is fitted by video processing technique and deep learning GAN and constructs the second data set;
Based on second data set training flower screen detection model.
Optionally, the detection module, comprising:
First detection unit is configured to the pornographic detection model to each frame image in the test video frame packet Data are given a mark;
Configure the first confidence level parameter;
In conjunction with the first confidence level parameter judge the corresponding video data to be detected of the test video frame packet whether be Pornographic video.
Optionally, the detection module, comprising:
Second detection unit is configured to the flower screen detection model to each frame image in the test video frame packet Data are given a mark, and analyze the score value of each frame image data in the test video frame packet;
Configure the second confidence level parameter;
In conjunction with the second confidence level parameter judge the corresponding video data to be detected of the test video frame packet whether be Flower screen video.
Optionally, described device further include:
Transmission module is configured to transmit by class Kafka Distributed Message Queue Qbus and be detected to video data Task message.
According to another aspect of the present invention, a kind of computer storage medium, the computer storage medium are additionally provided It is stored with computer program code, when the computer program code is run on the computing device, leads to the calculating equipment Execute video detecting method described in any of the above embodiments.
According to another aspect of the present invention, a kind of calculating equipment is additionally provided, comprising:
Processor;
It is stored with the memory of computer program code;
When the computer program code is run by the processor, the calculating equipment is caused to execute any of the above-described The video detecting method.
The present invention provides a kind of to pornographic and flower screen video detection method and method, when getting Detection task and read After taking video data to be detected, video extraction multiple image data to be detected can be based on, and then beat based on multiple image data Test video frame packet is bundled into input the pornographic detection model constructed in advance and/or be detected in flower screen detection model.Due to One complete possible data volume of video data to be detected is bigger, therefore, logical based on video detecting method provided by the invention It crosses and video data to be detected is carried out to take out frame processing, obtaining multiple image data therein with predeterminated frequency can guarantee to detect As a result detection time is saved while accurate.In addition, pornographic detection model and Hua Ping detection model are preparatory structure in the present invention It builds, is directly inputted into corresponding detection model after the test video frame packet for getting video data to be detected, into one Step promotes video detection efficiency.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
According to the following detailed description of specific embodiments of the present invention in conjunction with the accompanying drawings, those skilled in the art will be brighter The above and other objects, advantages and features of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 is video detecting method flow diagram according to an embodiment of the present invention;
Fig. 2 is VGG network struction process schematic according to an embodiment of the present invention;
Fig. 3 is the data flow diagram of video detecting method according to the preferred embodiment of the invention;
Fig. 4 is task message queue schematic diagram according to an embodiment of the present invention;
Fig. 5 is video detecting device structural schematic diagram according to an embodiment of the present invention;
Fig. 6 is video detecting device structural schematic diagram according to the preferred embodiment of the invention.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.
Fig. 1 is video detecting method flow diagram according to an embodiment of the present invention, as shown in Figure 1, real according to the present invention The video detecting method for applying example may include:
Step S102 obtains the Detection task in task message queue, reads the video counts to be detected in the Detection task According to;
Step S104 extracts multiple image data based on above-mentioned video data to be detected with assigned frequency, by multiple image Data are packaged as the test video frame packet of above-mentioned video data to be detected;
Test video frame packet, is inputted the detection model constructed in advance by step S106, and detection model includes pornographic detection mould Type and/or flower screen detection model;
Step S108, based on pornographic detection model and/or flower screen detection model to test video frame packet carry out it is pornographic and/or Hua Ping detection.
The embodiment of the invention provides a kind of to pornographic and flower screen video detection method, when getting Detection task and read After taking video data to be detected, video extraction multiple image data to be detected can be based on, and then beat based on multiple image data Test video frame packet is bundled into input the pornographic detection model constructed in advance and/or be detected in flower screen detection model.Due to One complete possible data volume of video data to be detected is bigger, therefore, video detection based on the embodiment of the present invention Method takes out frame processing by carrying out to video data to be detected, and obtaining multiple image data therein with predeterminated frequency can protect Card testing result saves detection time while accurate.In addition, pornographic detection model and Hua Ping detection in the embodiment of the present invention Model is building in advance, is directly inputted into corresponding detection model after the test video frame packet for getting video data to be detected In, further promote video detection efficiency.
It is referred in above-mentioned steps S102, when obtaining video data to be detected, the detection first obtained in task message queue is appointed Business, and then read the video data to be detected in Detection task.Qbus progress Detection task is preferentially adopted in the embodiment of the present invention to disappear Therefore the transmission of breath can also include by class Kafka Distributed Message Queue Qbus transmission pair before above-mentioned steps S102 The task message that video data is detected.
Message queue is to provide asynchronous communication mechanism for program or component, is to save West Europe in the transmission process of message The container of A Xi.Qbus message queue has distribution, persistence, supports subscription, highly reliable, high gulps down using Kafka as prototype Spit, high-performance the advantages that, but also support the advantages such as message batch processing, compression and optional reliable rank.The present invention is implemented To Detection task message can transmit the order of certifiable video data detection, Jin Erti in example using Qbus message queue Rise whole detection efficiency.
For a complete video comprising data volume may it is larger, if all data frames for including to it If being detected, not only waste time but also low efficiency.Therefore, the embodiment of the present invention can be based on video data to be detected to refer to Determine decimation in frequency multiple image data, and then the multiple image data extracted are detected.For example, for 2 minutes In a video, can one frame of pumping per second, the final image data for obtaining 120 frames, and then to the image data of above-mentioned 120 frame It is detected.In practical application, the frequency for take out frame to image to be detected data can be according to different scenes and different need It asks and is set, the present invention is without limitation.In addition, also being introduced in above-mentioned steps S104, after extracting multiple image data, may be used also Multiple image data to be packaged as to the test video frame packet of above-mentioned video data to be detected, it is preferable that can be by acquired survey Examination video frame packet is uniformly stored to designated position, it is subsequent video data to be measured is detected when, then go to obtain corresponding Test video frame packet, and then promoted testing efficiency.
Optionally, since the code rate height of network video is different, the present embodiment is in above-mentioned steps S104 to video to be detected After data take out frame to obtain multiple image data, multiple image data can also be decoded, by multiple image number According to code be adjusted in default range of code rates.Code rate, the data bits of unit time transmission when being exactly data transmission.Some videos Code rate it is too high or too low, be all unfavorable for the later period viewing and processing, therefore, in the present embodiment, pass through the multiframe to extraction Image data is decoded, reduce or promoted its code rate with by the code rate of video data to be detected control within a preset range, can Quickly to detect to video data to be detected, and the later period viewing of user is not influenced.
It is described above, when testing video data to be measured, mainly corresponding test video frame packet is inputted preparatory In the detection model of building, and then it is detected by detection model, and above-mentioned detection model may include pornographic detection Model and/or flower screen detection model.It therefore, can also include: the pornographic detection model of building before above-mentioned steps S106, and Based on the pornographic detection model of the first data set training;And/or building flower screen detection model, and based on the second data set training flower screen Detection model.
In a preferred embodiment, the building and training of pornographic detection model can carry out in the following manner:
S1-1-1 constructs pornographic detection model based on VGG, Inception or Inception-Resnet network structure;
S1-1-2 obtains network video data and has been subjected to the video data of manual examination and verification, extracts the first numerical value respectively Positive sample data and second value negative sample data construct the first data set;
S1-1-3, based on the pornographic detection model of above-mentioned first data set training.
When constructing pornographic detection model, the mainly selection to the selection of neural network and training data.In this hair In bright embodiment, pornographic detection model can be constructed based on VGG, Inception or Inception-Resnet network structure.It is above-mentioned Network structure belongs to CNN (convolutional Neural) network structure, and the most important thought of VGG is exactly to increase network depth, Inception Network structure is mainly exactly sparsity structure similar to several intensive submatrixs, thus while reducing parameter, more added with Imitate land productivity computing resource.Fig. 2 shows the building process of VGG network, in which: convolution+ReLU represents convolutional layer;max Pooling represents pond layer;Fully connected+ReLU represents full articulamentum, is finally softmax layers.Softmax can To be interpreted as normalizing, such as current picture classification has 100 kinds, that by softmax layer output be exactly one 100 tie up to Amount.First value in vector is exactly the probability value that current image belongs to the first kind, and second value in vector is exactly current figure The sum of the vector that piece belongs to the probability value ... of the second class this hundred dimension is 1.
Referring to fig. 2 it is found that the input layer of VGG and each convolutional layer can be such that
Input: the picture of 224 × 224 sizes, 3 channels;
First layer convolution: the convolution kernel of 11 × 11 sizes 96, upper 48 of each GPU;
The core of first layer max-pooling:2 × 2;
Second layer convolution: 5 × 5 convolution kernels 256, upper 128 of each GPU;
The core of second layer max-pooling:2 × 2;
Third layer convolution: being to connect entirely with upper one layer, the convolution kernel of 3*3 384, assigns on two GPU each 192;
4th layer of convolution: 3 × 3 convolution kernel 384, two GPU each 192, which connect with upper one layer does not pass through Pooling layers;
Layer 5 convolution: 3 × 3 convolution kernel 256, each 128 on two GPU;
The core of layer 5 max-pooling:2 × 2;
First layer connects entirely: the output of layer 5 max-pooling is connected to become an one-dimensional vector, made by 4096 dimensions For the input of this layer;
The second layer connects entirely: 4096 dimensions;
Softmax layers: exporting is 2, output per it is one-dimensional be all probability that picture belongs to the category.
The characteristics of VGG may include: small convolution kernel, and convolution kernel is replaced all with 3x3 (seldom having used 1x1);Little Chiization Core, the Chi Huahe of all 2x2 of the Chi Huahe of the 3x3 compared to AlexNet, VGG;The deeper characteristic pattern of the number of plies is wider, is based on preceding two Point is outer, since convolution kernel is absorbed in expansion port number, diminution width is absorbed in pond and high, so that deeper broader on model framework Meanwhile the increase of calculation amount is slowed down;Full connection turns convolution, and three of the training stage full connections are replaced with three by the network test stage A convolution, test reuse parameter when training, so that the obtained full convolutional network of test is because of the limitation not connected entirely, thus It can receive any wide or a height of input.
Before being trained in the embodiment of the present invention to pornographic model, acquisition network video data and unusually first The video data of work audit extracts the positive sample data of the first numerical value and the first number of negative sample data building of second value respectively According to collection.Such as
By way of fine-tune, based on VGG, Inception, Inception-Resnet network structure training number According to.Fine-Tune, refer to by trained on the data sets such as ImageNet come basic model (such as CaffeNet, VGGNet, ResNet) it is finely adjusted, it is then applied on training dataset, and then lift scheme detection effect.Of the invention real It applies in example, can preferentially choose VGG16, be balanced between speed and accuracy.
Further, when the pornographic detection model based on above method building carries out pornographic detection to test video frame packet, It can be in the following manner:
S1-2-1 gives a mark to each frame image data in test video frame packet based on pornographic detection model;
S1-2-2 configures the first confidence level parameter;
S1-2-3 judges whether the corresponding video data to be detected of test video frame packet is color in conjunction with the first confidence level parameter Feelings video.
Introducing above is that test video frame packet is input in detection model, but detects in detection model to it When, it remains and each frame image data is detected, and stamp different pornographic scores for each frame image measurement data. At the same time, the first confidence level parameter can also be configured, and then combine the first confidence level parameter pair according to different usage scenarios Whether video data to be detected is pornographic video.
Before understanding confidence level, need first to understand confidence interval.In statistics, the confidence interval of a probability sample (Confidence interval) is the interval estimation to some population parameter of this sample, and what confidence interval showed is this The true value of a parameter has certain probability to fall in the degree around measurement result.What confidence interval provided is to be measured parameter The credibility of measured value, i.e. " certain probability " required by front.This probability is referred to as confidence level.Confidence level is general It is expressed as a percentage, therefore the confidence interval in confidence level 0.95 also can be expressed as: 95% confidence interval.Confidence interval Both ends are referred to as fiducial limit.For the estimation of a given situation, confidence level is higher, and corresponding confidence interval will It is bigger
Confidence level is also known as fiducial probability or confidence coefficient, i.e., estimative population parameter falls in the probability in confidence interval. In the embodiment of the present invention can give a mark to each frame image data in test video frame packet, judge each frame image whether be Pornographic image, it is assumed that set 91 points the above are pornographic image, score is other multiple colors such as doubtful pornographic image at 70~90 points Feelings image judges score range.If it be image data is pornographic that pornographic detection model, which detects in 120 frame images more than 70%, Image then judges the corresponding video data to be detected of the test video frame packet for severe pornographic video.Therefore, the embodiment of the present invention In the first confidence level parameter may include judging that multiple pornographic images judge score range and/or in test video frame Bao Zhongse Feelings image proportion, effectively to be counted to each frame image data in test video frame packet, so as to test video frame The pornographic judgement for wrapping corresponding image to be detected data is more accurate, and then harmful information is carried out effectively filtering, for Family provides more healthy video content.
Similar, in a preferred embodiment, the building and training of flower screen detection model can be by with lower sections Formula carries out:
S2-1-1, based on VGG, Inception or Inception-Resnet network structure building flower screen detection model;
S2-1-2 is fitted training data by video processing technique and deep learning GAN and constructs the second data set;
S2-1-3, based on above-mentioned second data set training flower screen detection model.
Identical CNN net when detection model pornographic with building can be used when constructing flower screen detection model in the embodiment of the present invention Network model, such as VGG, Inception or Inception-Resnet.But unlike pornographic detection model, due to flower The network video data amount of screen may be smaller, and therefore, the embodiment of the present invention can be based on by the processing of traditional video and depth Learn GAN fitting flower screen training data, and by way of fine-tune, is based on VGG, Inception, Inception- Resnet network structure training data.
Deep learning GAN (Generative adversarial networks, production fight network), is a kind of life Accepted way of doing sth model, system are made of a generator and an arbiter.Generator captures the potential distribution of truthful data sample, and Generate new data sample;Arbiter is two classifiers, differentiates that input is the sample of truthful data or generation.Generator It can be used with arbiter and study burning hot deep neural network at present.It is based on by using traditional video processing and deep Degree study GAN fitting flower screen training data, can make while guaranteeing that flower screen detection model training data is accurate and enough The testing result of flower screen detection model is more accurate and reliable.Test based on above-mentioned flower screen detection model to video data to be detected Video frame packet carries out
S2-2-1 gives a mark to each frame image data in test video frame packet based on flower screen detection model, and analyzes The score value of each frame image data in test video frame packet;
S2-2-2 configures the second confidence level parameter;
S2-2-3 judges whether the corresponding video data to be detected of test video frame packet is colored in conjunction with the second confidence level parameter Shield video.
The second confidence level parameter in the embodiment of the present invention may include judge multiple colored screen images judge score range and/ Or in test video frame Bao Zhonghua screen image proportion, can according to different detection scenes and different detection demands into Row setting, the present invention is without limitation.Flower screen detection model based on the embodiment of the present invention can be in test video frame packet Each frame image data whether be that colored screen image is effectively counted so as to the corresponding image to be detected number of test video frame packet According to flower screen situation judgement it is more accurate, and then flower screen will be present and the incomplete video data of picture carries out effective mistake Filter further promotes the perception experience of user.
Fig. 3 shows the data flow diagram of the video detecting method of preferred embodiment of the present invention offer, as shown in figure 3, The embodiment of the present invention can receive the video data to be detected of Call server (call server) transmission by outer layer API, and It carries out taking out test video frame packet of the frame decoding to obtain video data to be detected;Due to the same time test video frame packet compared with More, therefore, for the embodiment of the present invention after receiving test video frame packet, serializable dispatches each task.
It include such as figure referring to fig. 4 it is found that being divided into Receiver and Router inside task schedule, in task message queue Middle A, B, C, D, E, F or more Detection task message.Wherein, Receiver is responsible for reading data from Qbus, according to number Detection model, such as pornographic detection model and Hua Ping detection model are selected according to the priority of itself, is then serially passed by Router Corresponding model is sent to be detected and obtain testing result.Finally, will test result again pulls back to callback server readjustment Server and then output test result.
Based on the same inventive concept, the embodiment of the invention also provides a kind of video detecting devices, as shown in figure 5, according to Video detecting device provided in an embodiment of the present invention may include:
Read module 510 is configured to obtain the Detection task in task message queue, read to be checked in the Detection task Survey video data;
Frame module 520 is taken out, above-mentioned video data to be detected is configured to assigned frequency and extracts multiple image data, it will Above-mentioned multiple image data are packaged as the test video frame packet of video data to be detected;
Input module 530 is configured to test video frame packet inputting the detection model constructed in advance, and detection model includes color Feelings detection model and/or flower screen detection model;
Detection module 540, is configured to pornographic detection model and/or flower screen detection model carries out test video frame packet Pornographic and/or flower screen detection.
In a preferred embodiment, as shown in fig. 6, above-mentioned apparatus can also include decoder module 550, configuration Are as follows: above-mentioned multiple image data are decoded, the code of multiple image data is adjusted in default range of code rates.
In a preferred embodiment, as shown in fig. 6, above-mentioned apparatus can also include model construction module 560, match It is set to:
Pornographic detection model is constructed, and based on the pornographic detection model of the first data set training;And/or
Building flower screen detection model, and based on the second data set training flower screen detection model.
In a preferred embodiment, model construction module 560 is also configured as:
Pornographic detection model is constructed based on VGG, Inception or Inception-Resnet network structure;
It obtains network video data and has been subjected to the video data of manual examination and verification, extract the positive sample of the first numerical value respectively Data and the negative sample data of second value construct the first data set;
Based on the pornographic detection model of the first data set training.
In a preferred embodiment, model construction module 560 is also configured as:
Flower screen detection model is constructed based on VGG, Inception or Inception-Resnet network structure;
Training data is fitted by video processing technique and deep learning GAN and constructs the second data set;
Based on the second data set training flower screen detection model.
In a preferred embodiment, as shown in fig. 6, detection module 540 may include:
First detection unit 541 is configured to pornographic detection model to each frame image data in test video frame packet It gives a mark;
Configure the first confidence level parameter;
Judge whether the corresponding video data to be detected of test video frame packet is pornographic video in conjunction with the first confidence level parameter.
In a preferred embodiment, as shown in fig. 6, detection module 540 can also include:
Second detection unit 542 is configured to flower screen detection model to each frame image data in test video frame packet It gives a mark, and analyzes the score value of each frame image data in test video frame packet;
Configure the second confidence level parameter;
Judge whether the corresponding video data to be detected of test video frame packet is flower screen video in conjunction with the second confidence level parameter.
In a preferred embodiment, as shown in fig. 6, above-mentioned apparatus can also include:
Transmission module 570 is configured to transmit by class Kafka Distributed Message Queue Qbus and detect to video data Task message.
Based on the same inventive concept, the embodiment of the invention also provides a kind of computer storage medium, computer storage is situated between Matter is stored with computer program code, when computer program code is run on the computing device, causes to calculate in equipment execution State described in any item video detecting methods.
Based on the same inventive concept, the embodiment of the invention also provides a kind of calculating equipment, comprising:
Processor;
It is stored with the memory of computer program code;
When computer program code is run by processor, cause to calculate equipment execution video inspection described in any of the above embodiments Survey method.
The embodiment of the invention provides a kind of more efficient video detecting method and devices, provide in the embodiment of the present invention Video detecting method in, take out frame processing by carrying out to video data to be detected, multiframe figure therein obtained with predeterminated frequency As data can save detection time while guaranteeing that testing result is accurate.In addition, pornographic detection mould in the embodiment of the present invention Type and Hua Ping detection model are building in advance, are directly inputted into after the test video frame packet for getting video data to be detected In corresponding detection model, video detection efficiency is further promoted.
In addition, the embodiment of the present invention can refer to we by trained on the data sets such as ImageNet come basic model (such as CaffeNet, VGGNet, ResNet) is finely adjusted, and then promotes the detection of pornographic detection model and Hua Ping detection model Effect.And passed through different usage scenario configuration confidence level ginsengs, so that the testing result obtained is more accurate and reliable.
It is apparent to those skilled in the art that the specific work of the system of foregoing description, device and unit Make process, can refer to corresponding processes in the foregoing method embodiment, for brevity, does not repeat separately herein.
In addition, each functional unit in each embodiment of the present invention can be physically independent, can also two or More than two functional units integrate, and can be all integrated in a processing unit with all functional units.It is above-mentioned integrated Functional unit both can take the form of hardware realization, can also be realized in the form of software or firmware.
Those of ordinary skill in the art will appreciate that: if the integrated functional unit is realized and is made in the form of software It is independent product when selling or using, can store in a computer readable storage medium.Based on this understanding, Technical solution of the present invention is substantially or all or part of the technical solution can be embodied in the form of software products, The computer software product is stored in a storage medium comprising some instructions, with so that calculating equipment (such as Personal computer, server or network equipment etc.) various embodiments of the present invention the method is executed when running described instruction All or part of the steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM), random access memory Device (RAM), the various media that can store program code such as magnetic or disk.
Alternatively, realizing that all or part of the steps of preceding method embodiment can be (all by the relevant hardware of program instruction Such as personal computer, the calculating equipment of server or network equipment etc.) it completes, described program instruction can store in one In computer-readable storage medium, when described program instruction is executed by the processor of calculating equipment, the calculating equipment is held The all or part of the steps of row various embodiments of the present invention the method.
Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent Present invention has been described in detail with reference to the aforementioned embodiments for pipe, those skilled in the art should understand that: at this Within the spirit and principle of invention, it is still possible to modify the technical solutions described in the foregoing embodiments or right Some or all of the technical features are equivalently replaced;And these are modified or replaceed, and do not make corresponding technical solution de- From protection scope of the present invention.
According to an aspect of an embodiment of the present invention, a kind of video detecting method of A1. is provided, comprising:
The Detection task in task message queue is obtained, the video data to be detected in the Detection task is read;
Multiple image data are extracted with assigned frequency based on the video data to be detected, the multiple image data are beaten Packet is the test video frame packet of the video data to be detected;
The test video frame packet is inputted to the detection model constructed in advance, the detection model includes pornographic detection model And/or flower screen detection model;
Based on the pornographic detection model and/or flower screen detection model to the test video frame packet carry out it is pornographic and/or Hua Ping detection.
A2. method according to a1, wherein described that multiple image number is extracted with assigned frequency based on the video data According to later, the multiple image data are packaged as before the test video frame packet of the video data to be detected, further includes:
The multiple image data are decoded, the code of the multiple image data is adjusted to default range of code rates It is interior.
A3. method according to a1, wherein it is described to choose detection model in default detection model, and by the survey Video frame packet is tried to input before the detection model, further includes:
Pornographic detection model is constructed, and based on the first data set training pornographic detection model;And/or
Building flower screen detection model, and based on the second data set training flower screen detection model.
A4. method according to a3, wherein the pornographic detection model of the building, and based on the first data set training institute State pornographic detection model, comprising:
Pornographic detection model is constructed based on VGG, Inception or Inception-Resnet network structure;
It obtains network video data and has been subjected to the video data of manual examination and verification, extract the positive sample of the first numerical value respectively Data and the negative sample data of second value construct the first data set;
Based on the first data set training pornographic detection model.
A5. method according to a3, wherein building flower screen detection model, and based on the second data set training flower Shield detection model, comprising:
Flower screen detection model is constructed based on VGG, Inception or Inception-Resnet network structure;
Training data is fitted by video processing technique and deep learning GAN and constructs the second data set;
Based on second data set training flower screen detection model.
A6. according to the described in any item methods of A1-A5, wherein described based on the pornographic detection model and/or Hua Pingjian It surveys model and pornographic and/or flower screen detection is carried out to the test video frame packet, comprising:
It is given a mark based on the pornographic detection model to each frame image data in the test video frame packet;
Configure the first confidence level parameter;
In conjunction with the first confidence level parameter judge the corresponding video data to be detected of the test video frame packet whether be Pornographic video.
A7. according to the described in any item methods of A1-A5, wherein described based on the pornographic detection model and/or Hua Pingjian After model is surveyed to test video frame packet progress pornographic and/or flower screen detection, further includes:
It is given a mark, and analyzed to each frame image data in the test video frame packet based on the flower screen detection model The score value of each frame image data in the test video frame packet;
Configure the second confidence level parameter;
In conjunction with the second confidence level parameter judge the corresponding video data to be detected of the test video frame packet whether be Flower screen video.
A8. according to the described in any item methods of A1-A5, wherein the Detection task obtained in task message queue is read Before taking the video data to be detected in the Detection task, further includes:
The task message detected to video data is transmitted by class Kafka Distributed Message Queue Qbus.
Other side according to an embodiment of the present invention additionally provides a kind of video detecting device of B9., comprising:
Read module is configured to obtain the Detection task in task message queue, read to be checked in the Detection task Survey video data;
Frame module is taken out, the video data to be detected is configured to assigned frequency and extracts multiple image data, by institute State the test video frame packet that multiple image data are packaged as the video data to be detected;
Input module is configured to the test video frame packet inputting the detection model constructed in advance, the detection model Including pornographic detection model and/or flower screen detection model;
Detection module is configured to the pornographic detection model and/or flower screen detection model to the test video frame Packet carries out pornographic and/or flower screen detection.
B10. the device according to B9, wherein further include decoder module, be configured that the multiple image data into The code of the multiple image data is adjusted in default range of code rates by row decoding.
B11. the device according to B9, wherein further include model construction module, be configured that
Pornographic detection model is constructed, and based on the first data set training pornographic detection model;And/or
Building flower screen detection model, and based on the second data set training flower screen detection model.
B12. the device according to B11, wherein the model construction module is additionally configured to:
Pornographic detection model is constructed based on VGG, Inception or Inception-Resnet network structure;
It obtains network video data and has been subjected to the video data of manual examination and verification, extract the positive sample of the first numerical value respectively Data and the negative sample data of second value construct the first data set;
Based on the first data set training pornographic detection model.
B13. the device according to B11, wherein the model construction module is additionally configured to:
Flower screen detection model is constructed based on VGG, Inception or Inception-Resnet network structure;
Training data is fitted by video processing technique and deep learning GAN and constructs the second data set;
Based on second data set training flower screen detection model.
B14. according to the described in any item devices of B9-B13, wherein the detection module, comprising:
First detection unit is configured to the pornographic detection model to each frame image in the test video frame packet Data are given a mark;
Configure the first confidence level parameter;
In conjunction with the first confidence level parameter judge the corresponding video data to be detected of the test video frame packet whether be Pornographic video.
B15. according to the described in any item devices of B9-13, wherein the detection module, comprising:
Second detection unit is configured to the flower screen detection model to each frame image in the test video frame packet Data are given a mark, and analyze the score value of each frame image data in the test video frame packet;
Configure the second confidence level parameter;
In conjunction with the second confidence level parameter judge the corresponding video data to be detected of the test video frame packet whether be Flower screen video.
B16. according to the described in any item devices of B9-B13, wherein further include:
Transmission module is configured to transmit by class Kafka Distributed Message Queue Qbus and be detected to video data Task message.
Other side according to an embodiment of the present invention additionally provides a kind of computer storage medium of C17., the calculating Machine storage medium is stored with computer program code, when the computer program code is run on the computing device, leads to institute It states and calculates the equipment execution described in any item video detecting methods of A1-A8.
Other side according to an embodiment of the present invention additionally provides a kind of calculating equipment of D18., comprising:
Processor;
It is stored with the memory of computer program code;
When the computer program code is run by the processor, the calculating equipment is caused to execute A1-A8 any Video detecting method described in.

Claims (10)

1. a kind of video detecting method, comprising:
The Detection task in task message queue is obtained, the video data to be detected in the Detection task is read;
Multiple image data are extracted with assigned frequency based on the video data to be detected, the multiple image data are packaged as The test video frame packet of the video data to be detected;
The test video frame packet is inputted into the detection model that constructs in advance, the detection model include pornographic detection model and/ Or flower screen detection model;
Pornographic and/or Hua Ping is carried out to the test video frame packet based on the pornographic detection model and/or flower screen detection model Detection.
2. described to extract multiple image based on the video data with assigned frequency according to the method described in claim 1, wherein After data, the multiple image data are packaged as before the test video frame packet of the video data to be detected, further includes:
The multiple image data are decoded, the code of the multiple image data is adjusted in default range of code rates.
3. it is described that detection model is chosen in default detection model according to the method described in claim 1, wherein, and will be described Test video frame packet inputs before the detection model, further includes:
Pornographic detection model is constructed, and based on the first data set training pornographic detection model;And/or
Building flower screen detection model, and based on the second data set training flower screen detection model.
4. according to the method described in claim 3, wherein, the pornographic detection model of the building, and based on the training of the first data set The pornographic detection model, comprising:
Pornographic detection model is constructed based on VGG, Inception or Inception-Resnet network structure;
It obtains network video data and has been subjected to the video data of manual examination and verification, extract the positive sample data of the first numerical value respectively The first data set is constructed with the negative sample data of second value;
Based on the first data set training pornographic detection model.
5. according to the method described in claim 3, wherein, constructing flower screen detection model, and based on described in the training of the second data set Flower screen detection model, comprising:
Flower screen detection model is constructed based on VGG, Inception or Inception-Resnet network structure;
Training data is fitted by video processing technique and deep learning GAN and constructs the second data set;
Based on second data set training flower screen detection model.
6. method according to claim 1-5, wherein described based on the pornographic detection model and/or Hua Ping Detection model carries out pornographic and/or flower screen detection to the test video frame packet, comprising:
It is given a mark based on the pornographic detection model to each frame image data in the test video frame packet;
Configure the first confidence level parameter;
Judge whether the corresponding video data to be detected of the test video frame packet is pornographic in conjunction with the first confidence level parameter Video.
7. method according to claim 1-5, wherein described based on the pornographic detection model and/or Hua Ping Detection model carries out the test video frame packet after pornographic and/or flower screen detection, further includes:
It is given a mark based on the flower screen detection model to each frame image data in the test video frame packet, and described in analysis The score value of each frame image data in test video frame packet;
Configure the second confidence level parameter;
Judge whether the corresponding video data to be detected of the test video frame packet is Hua Ping in conjunction with the second confidence level parameter Video.
8. a kind of video detecting device, comprising:
Read module is configured to obtain the Detection task in task message queue, reads the view to be detected in the Detection task Frequency evidence;
Frame module is taken out, the video data to be detected is configured to assigned frequency and extracts multiple image data, it will be described more Frame image data is packaged as the test video frame packet of the video data to be detected;
Input module is configured to the test video frame packet inputting the detection model constructed in advance, and the detection model includes Pornographic detection model and/or flower screen detection model;
Detection module, be configured to the pornographic detection model and/or flower screen detection model to the test video frame packet into Row is pornographic and/or flower screen detects.
9. a kind of computer storage medium, the computer storage medium is stored with computer program code, when the computer When program code is run on the computing device, the calculating equipment perform claim is caused to require the described in any item video inspections of 1-7 Survey method.
10. a kind of calculating equipment, comprising:
Processor;
It is stored with the memory of computer program code;
When the computer program code is run by the processor, cause the calculating equipment perform claim that 1-7 is required to appoint Video detecting method described in one.
CN201811280432.7A 2018-10-30 2018-10-30 A kind of video detecting method and device Pending CN109522822A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811280432.7A CN109522822A (en) 2018-10-30 2018-10-30 A kind of video detecting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811280432.7A CN109522822A (en) 2018-10-30 2018-10-30 A kind of video detecting method and device

Publications (1)

Publication Number Publication Date
CN109522822A true CN109522822A (en) 2019-03-26

Family

ID=65773223

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811280432.7A Pending CN109522822A (en) 2018-10-30 2018-10-30 A kind of video detecting method and device

Country Status (1)

Country Link
CN (1) CN109522822A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110427859A (en) * 2019-05-31 2019-11-08 北京金山云网络技术有限公司 A kind of method for detecting human face, device, electronic equipment and storage medium
CN110740347A (en) * 2019-10-31 2020-01-31 北京金山云网络技术有限公司 Video content detection system, method, device, server and storage medium
CN111163332A (en) * 2020-01-08 2020-05-15 深圳市英威诺科技有限公司 Video pornography detection method, terminal and medium
CN112272311A (en) * 2020-10-21 2021-01-26 腾讯科技(北京)有限公司 Method, device, terminal, server and medium for repairing splash screen
CN112511818A (en) * 2020-11-24 2021-03-16 上海哔哩哔哩科技有限公司 Video playing quality detection method and device
CN112565763A (en) * 2020-11-30 2021-03-26 北京达佳互联信息技术有限公司 Abnormal image sample generation method and device, and image detection method and device
CN113177529A (en) * 2021-05-27 2021-07-27 腾讯音乐娱乐科技(深圳)有限公司 Method, device and equipment for identifying screen splash and storage medium
CN113242450A (en) * 2021-04-27 2021-08-10 上海淇玥信息技术有限公司 Distributed video processing method and device based on microservice and electronic equipment
WO2021248787A1 (en) * 2020-06-11 2021-12-16 深圳创维-Rgb电子有限公司 Restricted-rated picture detection method and apparatus, display device, and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107437083A (en) * 2017-08-16 2017-12-05 上海荷福人工智能科技(集团)有限公司 A kind of video behavior recognition methods of adaptive pool
CN107948640A (en) * 2017-12-19 2018-04-20 百度在线网络技术(北京)有限公司 Video playing test method, device, electronic equipment and storage medium
CN108154134A (en) * 2018-01-11 2018-06-12 天格科技(杭州)有限公司 Internet live streaming pornographic image detection method based on depth convolutional neural networks
CN108683877A (en) * 2018-03-30 2018-10-19 中国科学院自动化研究所 Distributed massive video resolution system based on Spark

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107437083A (en) * 2017-08-16 2017-12-05 上海荷福人工智能科技(集团)有限公司 A kind of video behavior recognition methods of adaptive pool
CN107948640A (en) * 2017-12-19 2018-04-20 百度在线网络技术(北京)有限公司 Video playing test method, device, electronic equipment and storage medium
CN108154134A (en) * 2018-01-11 2018-06-12 天格科技(杭州)有限公司 Internet live streaming pornographic image detection method based on depth convolutional neural networks
CN108683877A (en) * 2018-03-30 2018-10-19 中国科学院自动化研究所 Distributed massive video resolution system based on Spark

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110427859A (en) * 2019-05-31 2019-11-08 北京金山云网络技术有限公司 A kind of method for detecting human face, device, electronic equipment and storage medium
CN110740347A (en) * 2019-10-31 2020-01-31 北京金山云网络技术有限公司 Video content detection system, method, device, server and storage medium
CN110740347B (en) * 2019-10-31 2022-04-05 北京金山云网络技术有限公司 Video content detection system, method, device, server and storage medium
CN111163332A (en) * 2020-01-08 2020-05-15 深圳市英威诺科技有限公司 Video pornography detection method, terminal and medium
WO2021248787A1 (en) * 2020-06-11 2021-12-16 深圳创维-Rgb电子有限公司 Restricted-rated picture detection method and apparatus, display device, and readable storage medium
CN112272311A (en) * 2020-10-21 2021-01-26 腾讯科技(北京)有限公司 Method, device, terminal, server and medium for repairing splash screen
CN112272311B (en) * 2020-10-21 2022-08-26 腾讯科技(北京)有限公司 Method, device, terminal, server and medium for repairing splash screen
CN112511818A (en) * 2020-11-24 2021-03-16 上海哔哩哔哩科技有限公司 Video playing quality detection method and device
CN112565763A (en) * 2020-11-30 2021-03-26 北京达佳互联信息技术有限公司 Abnormal image sample generation method and device, and image detection method and device
CN113242450A (en) * 2021-04-27 2021-08-10 上海淇玥信息技术有限公司 Distributed video processing method and device based on microservice and electronic equipment
CN113177529A (en) * 2021-05-27 2021-07-27 腾讯音乐娱乐科技(深圳)有限公司 Method, device and equipment for identifying screen splash and storage medium
CN113177529B (en) * 2021-05-27 2024-04-23 腾讯音乐娱乐科技(深圳)有限公司 Method, device, equipment and storage medium for identifying screen

Similar Documents

Publication Publication Date Title
CN109522822A (en) A kind of video detecting method and device
Gu et al. Blind quality assessment of tone-mapped images via analysis of information, naturalness, and structure
CN108763325B (en) A kind of network object processing method and processing device
CN108154105B (en) Underwater biological detection and identification method and device, server and terminal equipment
CN108322788B (en) Advertisement display method and device in live video
TWI532013B (en) Image quality analysis method and system
CN107679466B (en) Information output method and device
CN108229268A (en) Expression Recognition and convolutional neural networks model training method, device and electronic equipment
Redi et al. Crowdsourcing for rating image aesthetic appeal: Better a paid or a volunteer crowd?
CN109740019A (en) A kind of method, apparatus to label to short-sighted frequency and electronic equipment
CN111539290A (en) Video motion recognition method and device, electronic equipment and storage medium
Mohanty et al. The food recognition benchmark: Using deep learning to recognize food in images
CN108076128A (en) User property extracting method, device and electronic equipment
CN108229300A (en) Video classification methods, device, computer readable storage medium and electronic equipment
CN107864405A (en) A kind of Forecasting Methodology, device and the computer-readable medium of viewing behavior type
CN110427819A (en) The method and relevant device of PPT frame in a kind of identification image
CN109829364A (en) A kind of expression recognition method, device and recommended method, device
CN113763348A (en) Image quality determination method and device, electronic equipment and storage medium
CN114399480A (en) Method and device for detecting severity of vegetable leaf disease
CN105979283A (en) Video transcoding method and device
CN115019390A (en) Video data processing method and device and electronic equipment
CN109660871A (en) A kind of barrage Role Information determines method, device and equipment
CN112966547A (en) Neural network-based gas field abnormal behavior recognition early warning method, system, terminal and storage medium
CN109409305A (en) A kind of facial image clarity evaluation method and device
CN111768005A (en) Training method and device for lightweight detection model, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190326

RJ01 Rejection of invention patent application after publication