CROSS REFERENCE TO RELATED APPLICATIONS

This application claims priority to Chinese Patent Application No. 201910355336.2, filed on Apr. 29, 2019, which is hereby incorporated by reference in its entirety.

FIELD

The present disclosure relates to the field of multimedia, in particular to a video rating method, a video rating device, equipment and a storage medium.

BACKGROUND

With the development of multimedia technology, more and more people share their lives by shooting videos and uploading videos. Since the contents of videos are diverse, and the audience scope of the videos is wide, the videos need to be rated, for example, the videos are rated into popular videos, restricted videos and adult videos, and therefore different ratings of videos are shown to different groups of people, and videos that are inappropriate for minors are prevented from being shown to minors.

In related technologies, the ratings of the videos are manually labeled by auditors. Specifically, video playback platforms have to be staffed by special auditors. The auditors need to watch each video uploaded on the video platforms. After watching any video, the auditors will mark the ratings of the videos based on their understanding of the plots of the videos.

The mode of manually marking the ratings of the videos is inefficient.

SUMMARY

The present disclosure provides a video rating method, a video rating device, equipment and a storage medium, and can overcome the problem of low efficiency in video rating.

According to the first aspect of the embodiments of the present disclosure, a video rating method is provided and includes: acquiring features of multiple modals of a video; fusing the features of the multiple modals to acquire a target feature; for each candidate rating of at least one candidate rating of the video, acquiring a matching degree between rating embedding of the candidate rating and the target feature, where the rating embedding is a vector representing the candidate rating; and selecting a candidate rating corresponding to rating embedding with a highest matching degree from the at least one candidate rating as a rating of the video according to the matching degree between each rating embedding and the target feature.

In a possible implementation manner, the acquiring a matching degree between the rating embedding of the candidate rating and the target feature includes: carrying out cross product on the rating embedding and the target feature to acquire a first result; inputting the first result to at least one first full connection layer to output a second result; and acquiring the matching degree according to the second result.

In a possible implementation manner, the acquiring the matching degree according to the second result includes any one of the following steps: carrying out cross product on the second result and the rating embedding to acquire a third result, inputting the third result to at least one second full connection layer, outputting a fourth result, and calculating the matching degree by taking the second result and the fourth result into an activation function; or calculating the matching degree by taking the second result into an activation function.

In a possible implementation manner, before acquiring the matching degree between the rating embedding of the candidate rating and the target feature, the method further includes: generating rating embedding of each candidate rating in the at least one candidate rating according to the sequential relationship of the at least one candidate rating, where the sequential relationship indicates an inappropriate degree of videos corresponding to the at least one candidate rating for target age groups.

In a possible implementation manner, the generating rating embedding of each candidate rating in the at least one candidate rating according to the sequential relationship of the at least one candidate rating includes: for an i-th candidate rating of the at least one candidate rating, generating a first vector according to i, where values of i dimensions in the first vector are first values, and the i is a positive integer; and generating rating embedding of the i-th candidate rating according to the first vector.

In a possible implementation manner, the first vector includes m dimensions, and values of first i dimensions among the m dimensions are the first values, values of the last (m-i) dimensions are second values, the m represents a total number of the at least one candidate rating, the m is a positive integer, and the m is greater than or equal to the i.

In a possible implementation manner, the generating the rating embedding of the i-th candidate rating according to the first vector includes: encoding values of respective dimensions in the first vector to acquire a second vector; and generating the rating embedding of the i-th candidate rating according to the second vector.

In a possible implementation manner, the generating the rating embedding of the i-th candidate rating according to the second vector includes: inputting the second vector to at least one third full connection layer to output the rating embedding of the i-th candidate rating.

In a possible implementation manner, the step of encoding the values of respective dimensions in the first vector to acquire the second vector includes: for each dimension of the respective dimensions in the first vector, carrying out one-hot encoding on a value of the each dimension to acquire a one-hot encoding value of the each dimension; and splicing one-hot encoding values of the respective dimensions to acquire the second vector.

In a possible implementation manner, the fusing the features of the multiple modals to acquire the target feature includes: for each modal of the multiple modals, inputting a feature of the modal to a first neural layer corresponding to the modal to output a hidden layer feature of the modal; and splicing hidden layer features of the multiple modals to acquire the target feature.

In a possible implementation manner, before inputting the feature of the modal to first neural layer corresponding to the modal and outputting hidden layer feature of the modal, the method further includes: acquiring the features of multiple modals of a sample video; for each modal of the multiple modals of the sample video, inputting a feature of the modal of the sample videos to a first neural layer corresponding to the modal, and outputting a hidden layer feature of the modal; splicing hidden layer features of the multiple modals of the sample video to acquire a target feature of the sample video; for each of the multiple modals of the sample video, inputting the target feature of the sample video into a second neural layer corresponding to the modal, and outputting a restored feature of the modal of the sample video; acquiring a loss value of the modal according to a difference between the restored feature of the modal of the sample video and the feature of the modal of the sample video; and adjusting parameters of first neural layers corresponding to the multiple modals according to loss values of the multiple modals.

According to a second aspect of the embodiments of the present disclosure, a video rating device is provided, and includes: an acquisition module configured to acquire features of multiple modals of a video; a feature fusion module configured to fuse the features of the multiple modals so as to acquire a target feature; the acquisition module further configured to acquire a matching degree between rating embedding of candidate rating and the target feature for each candidate rating of at least one candidate rating of the video, where the rating embedding is a vector representing the candidate rating; and a selection module configured to select a candidate rating corresponding to rating embedding with the highest matching degree from the at least one candidate rating as a rating of the video according to the matching degree between each rating embedding and the target feature.

In a possible implementation manner, the acquisition module specifically includes: a cross product submodule configured to carry out cross product on the rating embedding and the target feature to acquire a first result; an input submodule configured to input the first result into at least one first full connection layer and output a second result; and an acquisition submodule configured to acquire the matching degree according to the second result.

In a possible implementation manner, the acquisition submodule is configured to carry out cross product on the second result and the rating embedding to acquire a third result, input the third result to at least one second full connection layer to output a fourth result, calculate the matching degree by taking the second result and the fourth result into an activation function, or calculate the matching degree by taking the second result into the activation function.

In a possible implementation manner, the device further includes: a generating module configured to generate rating embedding of each candidate rating in the at least one candidate rating according to the sequential relationship of the at least one candidate rating, where the sequential relationship represents an inappropriate degree of videos corresponding to the at least one candidate rating for target age groups.

In a possible implementation manner, the generating module is configured to generate a first vector according to i for an i-th candidate rating of the at least one candidate rating, and generate rating embedding of the i-th candidate rating according to the first vector, where values of i dimensions in the first vector are first values, and the i is a positive integer.

In a possible implementation manner, the first vector includes m dimensions, and values of first i dimensions among the m dimensions are the first values, values of last (m-i) dimensions are second values, the m represents the total number of the at least one candidate rating, the m is a positive integer, and the m is greater than or equal to the i.

In a possible implementation manner, the generating module is configured to encode values of respective dimensions in the first vector to obtain a second vector, and generate the rating embedding of the i-th candidate rating according to the second vector.

In a possible implementation manner, the generating module is configured to input the second vector to at least one third full connection layer to output the rating embedding of the i-th candidate rating.

In a possible implementation manner, the generating module specifically includes: an encoding submodule configured to, for each dimension of respective dimensions in the first vector, carry out one-hot encoding on a value of the each dimension to acquire a one-hot encoding value of the each dimension; and a splicing submodule configured to splice one-hot encoding values of the respective dimensions to obtain the second vector.

In a possible implementation manner, the feature fusion module includes: an input submodule configured to, for each modal of the multiple modals, input a feature of the modal to a first neural layer corresponding to the modal to output a hidden layer feature of the modal; and a splicing submodule configured to splice hidden layer features of the multiple modals to obtain the target feature.

In a possible implementation manner, the acquisition module is further configured to acquire features of multiple modals of a sample video; the feature fusion module is further configured to, for each modal of the multiple modals of the sample video, input a feature of the modal of the sample video to a first neural layer corresponding to the modal to output a hidden layer feature of the modal, splice hidden layer features of the multiple modals of the sample video to acquire a target feature of the sample video, input the target feature of the sample video to a second neural layer corresponding to the modal for each modal of the multiple modals of the sample video, and to output a restored feature of the modal of the sample video; the acquisition module is further configured to acquire a loss value of the modal according to a difference between the restored feature of the modal of the sample video and the feature of the modal; and the device further includes an adjustment module configured to adjust parameters of first neural layers corresponding to the multiple modals according to loss values of the multiple modals.

According to a third aspect of the embodiments of the present disclosure, computer equipment is provided and includes one or more processors, and one or more memories configured to store instructions executed by the one or more processors, where the one or more processors are configured to execute the above video rating method.

According to a fourth aspect of the embodiments of the present disclosure, a non-transitory computer readable storage medium is provided, and instructions in the storage medium are executed by one or more processors of computer equipment to enable the computer equipment to execute the above video rating method.

According to a fifth aspect of the embodiments of the present disclosure, an application program is provided and includes one or more instructions, and when the one or more instructions are executed by the one or more processors of the computer equipment, the computer equipment is capable of executing the above video rating method.

