Visual semantic detection method and system
By calculating the histogram feature values and label annotations of frame images, vectorization and dimension conversion, combined with semantic analysis and graphic analysis models, the problem of poor detection of non-compliant content in videos in the existing technology is solved, achieving a more efficient Content filtering and compliance judgment.
Patent Information
- Application Number
- CN202111461695.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-02
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2041-12-02
AI Technical Summary
Existing technologies are ineffective at detecting non-compliant violent content in videos, and improved methods and systems are needed to effectively identify and filter such content.
By calculating the eigenvalues of the histogram of the frame image in the gradient direction, the eigenvalue jump points are obtained, labeled with labels, and the frame image at the moment after the label is vectorized and dimensionally converted to obtain a high-dimensional sample set, which is input to graphic analysis Model to determine whether frame images and data streams are compliant.
It improves the accuracy and efficiency of detecting non-compliant content in videos, and can effectively identify and filter non-compliant video data streams to ensure content compliance.
Smart Images

Figure CN114241367B
Abstract
Description
Technical Field
[0001] The present application relates to the field of network multimedia, and in particular to a method and system for visual semantic detection. Background Art
[0002] With the rapid development of online video multimedia, a large number of video programs have emerged, enriching people's leisure life. However, it also brings problems. Violent and other non-compliant content may appear in the video. Although the existing technology calculates the eigenvalue of the histogram of the frame in the gradient direction and uses it for detection, the effect is not particularly good and needs further improvement.
[0003] Therefore, there is an urgent need for a targeted visual semantic detection method and system. Summary of the invention
[0004] The purpose of the present invention is to provide a method and system for visual semantic detection, by calculating the eigenvalues of the histogram of the frame image in the gradient direction, obtaining the eigenvalue jump points, marking them with labels, vectorizing and dimensionalizing the frame image at a moment after the labeling, obtaining a high-dimensional sample set and dividing it according to different planes, and inputting the planarized frame image into a graphic analysis model to determine whether the frame image and the data stream are compliant.
[0005] In a first aspect, the present application provides a method for visual semantic detection, the method comprising:
[0006] Acquire a video data stream, calculate the characteristic value of the histogram of each frame in the gradient direction, and when the difference between the characteristic values between the frames is greater than a preset threshold, determine that an image jump occurs between the frames, and insert a label between the frames, wherein the label is used to mark the point where the image jumps;
[0007] According to the label, extract the frame image at a time after the label, input it into the semantic analysis model, analyze the text information contained in the frame image, obtain key text features, determine whether the frame image includes non-compliant text content, and obtain a first determination result;
[0008] The frame image at a moment after the label is vectorized and then dimensionally converted, and the P*Q dimension of the received frame image is converted into the M*N dimension, wherein P*Q is the dimension of the signal transmission channel, M*N is the dimension of the server load processing, and P, Q, M, and N are all non-zero positive integers. A high-dimensional sample set is input, and a classifier is called to classify the high-dimensional sample set; the classification refers to clustering according to the eigenvalues after the frame image is vectorized and dimensionally converted, and the eigenvalues within a preset difference range are grouped together, and the average eigenvalue of the group is calculated, and different groups whose average eigenvalue differences between the groups are greater than a threshold are grouped into different planes;
[0009] Input the frame image of the same plane into the graphic analysis model again, identify the object information contained in the frame image, obtain key object features, determine whether the frame image includes non-compliant graphic content, and obtain a second determination result;
[0010] According to the first judgment result and the second judgment result, determine whether the frame image at the moment after the label is compliant, and if it is compliant, determine a section of the video data stream between the current label and the next label as a compliant video data stream and store it in the server; otherwise, determine a section of the video data stream between the current label and the next label as non-compliant, and delete the section of the video data stream;
[0011] Move to the next tag and repeat the action of extracting the frame image at the moment after the tag until all video data streams are judged.
[0012] In combination with the first aspect, in a first possible implementation manner of the first aspect, the characteristic value of the histogram in the gradient direction includes detecting a change in a grayscale centroid position of the image.
[0013] In combination with the first aspect, in a second possible implementation manner of the first aspect, the calling classifier classifies the high-dimensional sample set, including an inner product operation between the input vector and the high-dimensional sample set.
[0014] In combination with the first aspect, in a third possible implementation of the first aspect, the kernels of the semantic analysis model and the graphic analysis model both use a neural network model.
[0015] In a second aspect, the present application provides a system for visual semantic detection, the system comprising a processor and a memory:
[0016] The memory is used to store program code and transmit the program code to the processor;
[0017] The processor is used to execute any one of the four possible methods of the first aspect according to the instructions in the program code.
[0018] In a third aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program code, and the program code is used to execute any one of the four possible methods in the first aspect.
[0019] The present invention provides a method and system for visual semantic detection, which calculates the eigenvalue of the histogram of a frame image in the gradient direction, obtains the eigenvalue jump point, marks it with a label, vectorizes and dimensionally transforms the frame image at a moment after the label, obtains a high-dimensional sample set and divides it according to different planes, and inputs the planarized frame image into a graphic analysis model, thereby judging whether the frame image and the data stream are compliant. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 Flow chart of the method of the present invention. DETAILED DESCRIPTION
[0022] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.
[0023] Figure 1 The flowchart of the method for visual semantic detection provided in this application includes:
[0024] Acquire a video data stream, calculate the characteristic value of the histogram of each frame in the gradient direction, and when the difference between the characteristic values between the frames is greater than a preset threshold, determine that an image jump occurs between the frames, and insert a label between the frames, wherein the label is used to mark the point where the image jumps;
[0025] According to the label, extract the frame image at a time after the label, input it into the semantic analysis model, analyze the text information contained in the frame image, obtain key text features, determine whether the frame image includes non-compliant text content, and obtain a first determination result;
[0026] The frame image at a moment after the label is vectorized and then dimensionally converted, and the P*Q dimension of the received frame image is converted into the M*N dimension, wherein P*Q is the dimension of the signal transmission channel, M*N is the dimension of the server load processing, and P, Q, M, and N are all non-zero positive integers. A high-dimensional sample set is input, and a classifier is called to classify the high-dimensional sample set; the classification refers to clustering according to the eigenvalues after the frame image is vectorized and dimensionally converted, and the eigenvalues within a preset difference range are grouped together, and the average eigenvalue of the group is calculated, and different groups whose average eigenvalue differences between the groups are greater than a threshold are grouped into different planes;
[0027] Input the frame image of the same plane into the graphic analysis model again, identify the object information contained in the frame image, obtain key object features, determine whether the frame image includes non-compliant graphic content, and obtain a second determination result;
[0028] According to the first judgment result and the second judgment result, determine whether the frame image at the moment after the label is compliant, and if it is compliant, determine a section of the video data stream between the current label and the next label as a compliant video data stream and store it in the server; otherwise, determine a section of the video data stream between the current label and the next label as non-compliant, and delete the section of the video data stream;
[0029] Move to the next tag and repeat the action of extracting the frame image at the moment after the tag until all video data streams are judged.
[0030] In some preferred embodiments, the characteristic value of the histogram in the gradient direction includes detecting changes in the grayscale centroid position of the image.
[0031] In some preferred embodiments, the calling of the classifier to classify the high-dimensional sample set includes an inner product operation between the input vector and the high-dimensional sample set.
[0032] In some preferred embodiments, the kernels of the semantic analysis model and the graphic analysis model both use neural network models.
[0033] The present application provides a system for visual semantic detection, the system comprising: the system comprising a processor and a memory:
[0034] The memory is used to store program code and transmit the program code to the processor;
[0035] The processor is used to execute the method described in any one of all embodiments of the first aspect according to the instructions in the program code.
[0036] The present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program code, and the program code is used to execute the method described in any one of the embodiments of the first aspect.
[0037] In a specific implementation, the present invention further provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment of the present invention. The storage medium may be a disk, an optical disk, a read-only storage memory (abbreviated as: ROM) or a random access memory (abbreviated as: RAM), etc.
[0038] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention or some parts of the embodiments.
[0039] The same and similar parts between the various embodiments of this specification can be referred to each other. In particular, for the embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.
[0040] The above-described embodiments of the present invention do not limit the protection scope of the present invention.
Claims
1. A visual semantic detection method, characterized in that: The method comprises: Acquire a video data stream, calculate the characteristic value of the histogram of each frame of the image in the gradient direction, and when the difference between the characteristic values between frames is greater than a preset threshold, determine that an image jump occurs between the frames, and insert a label between the frames, wherein the label is used to mark the point where the image jumps; According to the label, extract the frame image at a time after the label, input it into the semantic analysis model, analyze the text information contained in the frame image, obtain key text features, determine whether the frame image includes non-compliant text content, and obtain a first determination result; The frame image at a moment after the label is vectorized and then dimensionally converted, and the P*Q dimension of the received frame image is converted into the M*N dimension, wherein P*Q is the dimension of the signal transmission channel, M*N is the dimension of the server load processing, and P, Q, M, and N are all non-zero positive integers. A high-dimensional sample set is input, and a classifier is called to classify the high-dimensional sample set; the classification refers to clustering according to the eigenvalues after the frame image is vectorized and dimensionally converted, and the eigenvalues within a preset difference range are grouped together, and the average eigenvalue of the group is calculated, and different groups whose average eigenvalue differences between groups are greater than a threshold are grouped into different planes; Input the frame image of the same plane into the graphic analysis model again, identify the object information contained in the frame image, obtain key object features, determine whether the frame image includes non-compliant graphic content, and obtain a second determination result; According to the first judgment result and the second judgment result, determine whether the frame image at the moment after the label is compliant, and if it is compliant, determine a section of the video data stream between the current label and the next label as a compliant video data stream and store it in the server; otherwise, determine a section of the video data stream between the current label and the next label as non-compliant, and delete the section of the video data stream; Move to the next tag and repeat the action of extracting the frame image at the moment after the tag until all video data streams are judged.
2. The method according to claim 1, characterized in that: The characteristic value of the histogram in the gradient direction includes the change of the grayscale centroid position of the detected image.
3. The method according to any one of claims 1-2, characterized in that: The calling classifier classifies the high-dimensional sample set, including an inner product operation between the input vector and the high-dimensional sample set.
4. The method according to claim 3, characterized in that: The kernels of the semantic analysis model and the graphic analysis model both use neural network models.
5. A visual semantic detection system, characterized in that: The system comprises a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the method according to any one of claims 1 to 4 according to the instructions in the program code.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program codes, and the program codes are used to execute the method according to any one of claims 1 to 4.
