Video recommendation model generation method, video recommendation method and device

文档序号:7774 发布日期:2021-09-17 浏览:48次 中文

1. A method for generating a video recommendation model is characterized by comprising the following steps:

extracting a plurality of positive feedback videos and a plurality of negative feedback videos from each user history session;

establishing a plurality of video pairs corresponding to each user historical conversation, wherein each video pair comprises a positive feedback video and a negative feedback video;

and training the video recommendation to be trained according to the characteristics of the positive feedback video, the characteristics of the negative feedback video and the user characteristics in each video pair to obtain the video recommendation.

2. The method of generating a video recommendation model according to claim 1, wherein the video recommendation includes a first neural network and a second neural network; the training of the video recommendation to be trained according to the characteristics of the positive feedback video, the characteristics of the negative feedback video and the user characteristics in each video pair to obtain the video recommendation comprises the following steps:

performing a weighted summation of the user features through the first neural network;

performing weighted summation on the characteristics of the positive feedback video and the characteristics of the negative feedback video in each video pair through the second neural network;

calculating a first similarity between the feature of the positive feedback video after weighted summation and the user feature after weighted summation and a second similarity between the feature of the negative feedback video after weighted summation and the user feature after weighted summation in each video pair;

and calculating a loss function value according to the first similarity and the second similarity corresponding to each video pair, and determining the video recommendation to be trained with the minimum loss function value as the video recommendation.

3. The method for generating the video recommendation model according to claim 1 or 2, wherein the establishing a plurality of video pairs corresponding to each user history session comprises:

and randomly selecting a preset number of positive feedback videos from the multiple positive feedback videos corresponding to each user historical conversation, and sequentially establishing video pairs with the negative feedback videos corresponding to each user historical conversation to obtain the multiple video pairs.

4. The method for generating a video recommendation model according to claim 1, wherein the user history session is a history session that is selected from an original history session and contains a negative feedback video.

5. A method for video recommendation, comprising:

acquiring user characteristics and characteristics of a plurality of candidate recommended videos;

inputting the user characteristics and the characteristics of the plurality of candidate recommended videos into the video recommendation model according to any one of claims 1-4, and outputting negative feedback target videos in the plurality of candidate recommended videos;

recommending other videos than the negative feedback target video in the plurality of candidate recommended videos.

6. The video recommendation method of claim 5, wherein the video recommendation comprises a first neural network and a second neural network; the inputting the user characteristics and the characteristics of the candidate recommended videos into video recommendation and outputting negative feedback target videos in the candidate recommended videos comprises:

inputting the user features into the first neural network to generate first features;

inputting features of the candidate recommended videos into the second neural network to generate a plurality of second features;

and determining a negative feedback target video in the candidate recommended videos according to the first characteristic and the second characteristics.

7. The method of claim 6, wherein the determining a negative feedback target video of the candidate recommended videos according to the first feature and the second features comprises:

calculating the similarity between the first characteristic and each second characteristic;

and determining the candidate recommended video with the similarity smaller than a threshold value as a negative feedback target video in the candidate recommended videos.

8. An apparatus for generating a video recommendation model, comprising:

a video extraction module configured to perform extraction of a plurality of positive feedback videos and a plurality of negative feedback videos from each user history session;

the video pair establishing module is configured to execute establishing of a plurality of video pairs corresponding to each user historical conversation, and each video pair comprises a positive feedback video and a negative feedback video;

and the model training module is configured to execute training of video recommendation to be trained according to the characteristics of the positive feedback video, the characteristics of the negative feedback video and the user characteristics in each video pair to obtain the video recommendation.

9. An electronic device, comprising:

a processor;

a memory for storing the processor-executable instructions;

wherein the processor is configured to execute the instructions to implement the method of any one of claims 1 to 7.

10. A storage medium having instructions that, when executed by a processor of an electronic device, enable the electronic device to perform the method of any of claims 1-7.

Background

At present, a plurality of video applications exist in the market, and the applications recommend videos which possibly meet the user interests to users according to the historical behavior information of the users so as to achieve the effects of improving the click rate and prolonging the retention of the users. In addition to the positive feedback process of "recommending favorite works to a user" for a user, there is often a negative feedback process of "filtering out disliked works by the user". The product form of the negative feedback process is generally to provide a negative feedback button, such as "dislike", "uninteresting", etc., on the video presentation page, and after the user triggers the negative feedback button, the recommendation system will reduce or avoid the presentation of this type of video.

In the related art, one of the negative feedback filtering methods is filtering based on a model, and a video that a user triggers a negative feedback button can be used as a positive sample, and the other video can be used as a negative sample to perform model training. Then, a negative feedback score is predicted for each video to be recommended by using the trained model, and the video with the negative feedback score exceeding the threshold value is not recommended to the user. The model-based filtering mode only carries out model training according to the negative feedback video of the user at the current moment, and the judgment of the model on the video with negative feedback possibility is inaccurate due to the understanding deviation of the negative feedback video of the user, so that the recommendation of the video for the user is inaccurate.

Disclosure of Invention

The present disclosure provides a method and an apparatus for generating a video recommendation model, an electronic device, and a storage medium, and a method and an apparatus for video recommendation, an electronic device, and a storage medium, so as to at least solve the problem in the related art that video recommendation is inaccurate. The technical scheme of the disclosure is as follows:

according to a first aspect of the embodiments of the present disclosure, a method for generating a video recommendation model is provided, including:

extracting a plurality of positive feedback videos and a plurality of negative feedback videos from each user history session;

establishing a plurality of video pairs corresponding to each user historical conversation, wherein each video pair comprises a positive feedback video and a negative feedback video;

and training the video recommendation model to be trained according to the characteristics of the positive feedback video, the characteristics of the negative feedback video and the user characteristics in each video pair to obtain the video recommendation model.

In another embodiment of the present disclosure, a video recommendation model includes a first neural network and a second neural network; training a video recommendation model to be trained according to the characteristics of the positive feedback video, the characteristics of the negative feedback video and the user characteristics in each video pair to obtain a video recommendation model, and the method comprises the following steps:

carrying out weighted summation on the user characteristics through a first neural network;

performing weighted summation on the characteristics of the positive feedback video and the characteristics of the negative feedback video in each video pair through a second neural network;

calculating a first similarity between the characteristics of the positive feedback video after weighted summation and the characteristics of the user after weighted summation in each video pair, and a second similarity between the characteristics of the negative feedback video after weighted summation and the characteristics of the user after weighted summation;

and calculating a loss function value according to the first similarity and the second similarity corresponding to each video pair, and determining the video recommendation model to be trained with the minimum loss function value as the video recommendation model.

In another embodiment of the present disclosure, establishing a plurality of video pairs corresponding to each user history session includes:

and randomly selecting a preset number of positive feedback videos from a plurality of positive feedback videos corresponding to each user historical conversation, and sequentially establishing video pairs with each negative feedback video corresponding to each user historical conversation to obtain a plurality of video pairs.

In another embodiment of the present disclosure, the user history session is a history session that contains negatively fed back video that is filtered out of the original history session.

According to a second aspect of the embodiments of the present disclosure, there is provided a video recommendation method, including:

acquiring user characteristics and characteristics of a plurality of candidate recommended videos;

inputting the user characteristics and the characteristics of a plurality of candidate recommended videos into the video recommendation model of any one of the first aspect, and outputting negative feedback target videos of the plurality of candidate recommended videos;

and recommending other videos except the negative feedback target video in the candidate recommended videos.

In another embodiment of the present disclosure, a video recommendation model includes a first neural network and a second neural network; inputting the user characteristics and the characteristics of a plurality of candidate recommended videos into a video recommendation model, and outputting a negative feedback target video in the plurality of candidate recommended videos, wherein the method comprises the following steps:

inputting the user characteristics into a first neural network to generate first characteristics;

inputting the features of the candidate recommended videos into a second neural network to generate a plurality of second features;

and determining a negative feedback target video in the plurality of candidate recommended videos according to the first characteristic and the plurality of second characteristics.

In another embodiment of the present disclosure, determining a negative feedback target video of a plurality of candidate recommended videos according to the first feature and the plurality of second features includes:

calculating the similarity between the first characteristic and each second characteristic;

and determining the candidate recommended video with the similarity smaller than the threshold value as a negative feedback target video in the plurality of candidate recommended videos.

According to a third aspect of the embodiments of the present disclosure, there is provided an apparatus for generating a video recommendation model, including:

a video extraction module configured to perform extraction of a plurality of positive feedback videos and a plurality of negative feedback videos from each user history session;

the video pair establishing module is configured to execute establishing of a plurality of video pairs corresponding to each user historical conversation, and each video pair comprises a positive feedback video and a negative feedback video;

and the model training module is configured to execute training of the video recommendation model to be trained according to the characteristics of the positive feedback video, the characteristics of the negative feedback video and the user characteristics in each video pair to obtain the video recommendation model.

In another embodiment of the present disclosure, a video recommendation model includes a first neural network and a second neural network; the model training module comprises:

a first feature weighting unit configured to perform weighted summation of user features by a first neural network;

a second feature weighting unit configured to perform weighted summation of the features of the positive feedback video and the features of the negative feedback video in each video pair through a second neural network;

a first similarity calculation unit configured to perform calculation of a first similarity of the feature of the weighted-summed positive feedback video and the weighted-summed user feature in each video pair, an

A second similarity calculation unit configured to perform calculation of a second similarity of the feature of the weighted-summed negative feedback video and the weighted-summed user feature;

and the model determining unit is configured to calculate a loss function value according to the first similarity and the second similarity corresponding to each video pair, and determine the video recommendation model to be trained with the minimum loss function value as the video recommendation model.

In another embodiment of the present disclosure, the video pair establishing module is configured to randomly select a preset number of positive feedback videos from a plurality of positive feedback videos corresponding to each user history session, and sequentially establish video pairs with negative feedback videos corresponding to each user history session to obtain a plurality of video pairs.

In another embodiment of the present disclosure, the user history session is a history session that contains negatively fed back video that is filtered out of the original history session.

According to a fourth aspect of the embodiments of the present disclosure, there is provided a video recommendation apparatus including:

the acquisition module is configured to acquire the characteristics of the user and the characteristics of the candidate recommended videos;

a negative feedback target video determination module configured to perform input of user characteristics and characteristics of a plurality of candidate recommended videos to the video recommendation model according to any one of the first aspect, and output a negative feedback target video of the plurality of candidate recommended videos;

and the video recommending module is configured to recommend other videos except the negative feedback possibility video in the candidate recommended videos.

In another embodiment of the present disclosure, a video recommendation model includes a first neural network and a second neural network; a negative feedback target video determination module comprising:

a first feature generation unit configured to perform inputting a user feature into a first neural network, generating a first feature;

a second feature generation unit configured to perform inputting features of the plurality of candidate recommended videos into a second neural network, generating a plurality of second features;

a negative feedback target video determination unit configured to perform determining a negative feedback target video among the plurality of candidate recommended videos according to the first feature and the plurality of second features.

In another embodiment of the present disclosure, a negative feedback target video determining unit configured to perform:

calculating the similarity between the first characteristic and each second characteristic;

and determining the candidate recommended video with the similarity smaller than the threshold value as a negative feedback target video in the plurality of candidate recommended videos.

According to a fifth aspect of embodiments of the present disclosure, there is provided an electronic apparatus including:

a processor; a memory for storing processor-executable instructions;

wherein the processor is configured to execute the instructions to implement the method as in any of the embodiments of the first or second aspect described above.

According to a sixth aspect of embodiments of the present disclosure, there is provided a storage medium, wherein instructions, when executed by a processor of an electronic device, enable the electronic device to perform the method as in any of the first or second aspects described above.

According to a seventh aspect of embodiments of the present disclosure, there is provided a computer program product, the program product comprising a computer program, the computer program being stored in a readable storage medium, from which at least one processor of a device reads and executes the computer program, causing the device to perform the method in any one of the first or second aspects.

The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:

according to the technical scheme, the video recommendation model is trained by using the video consisting of the positive feedback video and the negative feedback video in the same user history session, relevant information in the user history session is fully utilized, the actual requirements of the user can be better captured, the real intention of the user is known, therefore, a better filtering effect can be achieved on the negative feedback target video in the candidate recommended video, and the accuracy of video recommendation is improved.

It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.

FIG. 1 is a diagram illustrating an application environment for a method for generating a video recommendation model in accordance with an exemplary embodiment;

FIG. 2 is a flow diagram illustrating a method of generating a video recommendation model in accordance with an exemplary embodiment;

FIG. 3 is a flow diagram illustrating a training process for a video recommendation model in accordance with an exemplary embodiment;

FIG. 4 is a diagram illustrating a structure of a video recommendation model in a training process in accordance with an exemplary embodiment;

FIG. 5 is a flow diagram illustrating a method of video recommendation in accordance with an exemplary embodiment;

FIG. 6 is a flow diagram illustrating a method for obtaining negative feedback target video in accordance with an exemplary embodiment;

FIG. 7 is a diagram illustrating a structure of a video recommendation model in an application process in accordance with an illustrative embodiment;

FIG. 8 is a flow diagram illustrating a method of video recommendation in accordance with an exemplary embodiment;

FIG. 9 is a block diagram illustrating an apparatus for generating a video recommendation model in accordance with an exemplary embodiment;

FIG. 10 is a block diagram illustrating a video recommendation device in accordance with an exemplary embodiment;

FIG. 11 is a block diagram illustrating a server in accordance with an example embodiment.

Detailed Description

In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.

It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.

The generation method of the video recommendation model provided by the present disclosure can be applied to the application environment shown in fig. 1. The application environment includes a terminal 110 and a server 120. The terminal 110 communicates with the server 120 through a network. The terminal 110 is provided with an application program, and a user can browse a video, watch a live broadcast, and the like through the application program. When the user watches a video or a live broadcast, the watched content can be fed back by triggering the video feedback button, for example, the video content is interested by triggering the "like" button feedback, or the content of the video is not interested by triggering the "not interested" button feedback. And the related behavior information of the user is recorded in the session in real time and reported to the server. When the server trains the video recommendation model, the server can extract required information from the historical conversation of the user to train the video recommendation model to obtain the video recommendation model matched with each user, so that videos with negative feedback possibility can be accurately filtered for each user. Specifically, the server 120 extracts a plurality of positive feedback videos and a plurality of negative feedback videos from each user history session; establishing a plurality of video pairs corresponding to each user historical conversation, wherein each video pair comprises a positive feedback video and a negative feedback video; and training the video recommendation model to be trained according to the characteristics of the positive feedback video, the characteristics of the negative feedback video and the user characteristics in each video pair to obtain the video recommendation model. The terminal 110 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 120 may be implemented by an independent server or a server cluster composed of a plurality of servers.

Fig. 2 is a flowchart illustrating a method for generating a video recommendation model according to an exemplary embodiment, where the method for generating a video recommendation model is used in the server 120 in fig. 1, as shown in fig. 2, and includes the following steps.

In step S210, a plurality of positive feedback videos and a plurality of negative feedback videos are extracted from each user history session.

The negative feedback video refers to a video that a user clicks a negative feedback button, and the negative feedback button may refer to a mask button, a non-interested button, a bad comment button, and the like. The positive feedback video and the negative feedback video are a relative concept, and the positive feedback video can refer to all videos watched by a user except the negative feedback video; positive feedback videos can also be determined according to the behavior information of the user, for example, videos except the negative feedback videos which are watched by the user for a certain time; or the user clicks on a video of a "like" or the like button. The user forms a session (session) from the time of opening the application program to the time of closing the application program, and all browsing, clicking and negative feedback behaviors generated by the user in the session belong to behaviors in the session. All actions of the user in each session are recorded, including opening an application, clicking on a video for viewing, clicking on a negative feedback button, closing the application, etc. The client can report the user historical behavior information to the server at regular time, and the server records and stores the user historical behavior information in a log. Specifically, when the server needs to train the video recommendation model, a plurality of positive feedback videos and a plurality of negative feedback videos may be extracted from each historical session in units of sessions. By taking the conversation as a unit, various other behaviors which are performed before and after a certain specific video is generated by the user can be better considered, such as browsing and clicking behaviors performed on other videos, so that the real intention of the user can be more accurately understood, and the model training is more accurate. Further, in this implementation, a plurality of positive feedback videos and a plurality of negative feedback videos may also be extracted from historical behavior records in logs within a preset time period and a preset number of user historical sessions, which is not further described herein.

It is understood that the user history session in this embodiment is a history session that contains negative feedback video and is selected from the original history session. The original history session refers to all history sessions recorded by the server. Each time an application is opened, the system assigns a session id to the client. Since the records in the log usually exist in a single form, during data analysis, aggregation analysis can be performed according to the session id, a history session containing a negative feedback video is obtained from an original history session, and the history session containing the negative feedback video is used as the user history session in the embodiment.

In step S220, a plurality of video pairs corresponding to each user history session are established, where each video pair includes a positive feedback video and a negative feedback video.

Specifically, for each user history session, a plurality of corresponding positive and negative video pairs are generated according to a plurality of positive feedback videos and a plurality of negative feedback videos contained in each user history session, and each video pair contains one positive feedback video and one negative feedback video. For example, a video pair including a positive feedback video and a negative feedback video may be formed in a nested loop manner, or a video pair may be generated by randomly selecting the positive feedback video and the negative feedback video, which is not limited herein.

In step S230, training the video recommendation model to be trained according to the characteristics of the positive feedback video, the characteristics of the negative feedback video, and the user characteristics in each video pair, so as to obtain a video recommendation model.

Specifically, after a corresponding group of video pairs is generated for each user historical session, the video recommendation model can be trained by using the established groups of video pairs, so that the characteristics of the positive feedback video and the characteristics of the user are closer, and the characteristics of the negative feedback video and the characteristics of the user are more deviated. For example, a first distance between the feature of the positive feedback video in one video pair and the feature of the user and a second distance between the feature of the negative feedback video in the same video pair and the feature of the user are calculated, and the loss function value is controlled according to the first distance and the second distance, so that the required video recommendation model is obtained.

According to the generation method of the video recommendation model, the environment, the operation habit and even the mood of the user in the same historical session are stable. Therefore, by utilizing the context information in the same historical session, the actual needs of the user can be better captured, and the real intention of the user can be known. Under the condition, the two positive and negative feedback videos are respectively compared and analyzed, so that the real intentions of the user for video feedback can be more effectively identified, a better filtering effect can be achieved on negative feedback target videos in the candidate recommended videos, and the accuracy of video recommendation is improved.

FIG. 3 is a flow diagram illustrating a training process for a video recommendation model in accordance with an exemplary embodiment. The video recommendation model comprises a first neural network and a second neural network, and in step S230, the video recommendation model to be trained is trained according to the characteristics of the positive feedback video, the characteristics of the negative feedback video and the user characteristics in each video pair to obtain the video recommendation model.

In step S231, the user features are weighted and summed by the first neural network.

In step S232, the features of the positive feedback video and the features of the negative feedback video in each video pair are weighted and summed through the second neural network.

Specifically, as shown in fig. 4, a schematic structural diagram of a video recommendation model in a model training process in one embodiment is shown. The first neural network NeTU can be used for reducing dimensionality of user features, and the second neural network NetV can be used for reducing dimensionality of features of positive feedback videos and features of negative feedback videos. The first feature obtained by the first neural network NetU and the second neural network NetV may be a one-dimensional feature vector or a multidimensional feature vector, which is not limited herein. Vp denotes the characteristics of positive feedback video, Vn denotes the characteristics of negative feedback video, and U denotes the user characteristics. The first and second neural networks NetU and NetV may be comprised of fully connected layers. Specifically, the user features may be one hot encoding of category features such as gender, age, region, and the like, and the continuous value features are spliced by directly using original values; the positive feedback video and the negative feedback video can be characterized in that onehot coding is carried out on video category, keyword label and other category characteristics, and the continuous value characteristics are spliced by directly using original values. And carrying out weighted summation on the user characteristics through the first neural network NeTU, and carrying out weighted summation on the characteristics of the positive feedback video and the negative feedback video through the second neural network NeTV.

In step S233, a first similarity of the feature of the weighted and summed positive feedback video and the weighted and summed user feature and a second similarity of the feature of the weighted and summed negative feedback video and the weighted and summed user feature are calculated for each video pair.

In step S234, a loss function value is calculated according to the first similarity and the second similarity corresponding to each video pair, and the video recommendation model to be trained with the minimum loss function value is determined as the video recommendation model.

Specifically, the first similarity may be determined according to a cosine similarity between a feature of the positive feedback video and a user feature after the weighted sum is calculated; similarly, the second similarity may also be determined according to the cosine similarity between the feature of the negative feedback video and the user feature after the weighted sum is calculated.

Assume that the first similarity is sim1The second degree of similarity is sim2The loss function value loss can be defined by the following formula:

loss(U,Vp,Vn)=max(sim2-sim1,0)

the goal of model training is to minimize the overall loss, namely:

and finally, the video recommendation model corresponding to the minimum loss function value in the training process can be used as the finally used video recommendation model.

It is understood that the above process of training the video recommendation model may be performed in an offline situation, and by setting a fixed time duration as a unit (for example, day or hour), the model is trained periodically according to the historical behavior information of the user including the negative feedback video generated in the time duration, so that the accuracy of video filtering performed by the model can be improved.

In an exemplary embodiment, the establishing a plurality of video pairs corresponding to each user history session specifically includes: and randomly selecting a preset number of positive feedback videos from a plurality of positive feedback videos corresponding to each user historical conversation, and sequentially establishing video pairs with each negative feedback video corresponding to each user historical conversation to obtain a plurality of video pairs.

Specifically, assume that there are k negative feedback videos contained in a history session of a user, the k negative feedback videos are randomly ordered, and id n is generated1,n2,…,nk(ii) a The positive feedback videos are randomly sequenced to generate (id is p)1,p2,…,pt). K q (q is the number of samples needed for each video pair) can be sampled according to the following rule) And a group of video pairs generated by the historical conversation of the certain user is set as calls.

Pairs=[]

For i in(1,k):

Forj in(1,q):

That is, one of (p1, p2, …, pt) is randomly selected as p for each cyclecFor i in (1, k); for j in (1, q) represents (n)i,pc) And inserting pair. It will be appreciated that if there are s user history sessions, then s calls can be obtained.

In the embodiment, the actual requirements of the user can be better captured and the real intention of the user can be known by utilizing the context information in the same historical conversation. The video pair established by the two positive and negative feedback videos in the same historical conversation is used for model training, so that a trained video recommendation model can achieve a better negative feedback filtering effect, and the accuracy of video recommendation is improved.

Fig. 5 is a flowchart illustrating a video recommendation method according to an exemplary embodiment, where the video recommendation method is used in the server 120 in fig. 1, as shown in fig. 5, and includes the following steps.

In step S510, the user characteristics and the characteristics of a plurality of candidate recommended videos are obtained.

The candidate recommended video may be a video to be recommended, which is obtained by preliminarily screening a server from a large number of videos in the system, and there may be a video with negative feedback possibility in the candidate recommended video, so that the candidate recommended video needs to be further filtered. The candidate recommended videos can be videos obtained by the video recommendation system through recalling and sorting. Specifically, when the user uses the application program, the user usually needs to perform account registration, and when the user registers, the user needs to input basic information such as relevant gender, age, region, occupation, and the like, and the server platform may set user characteristics according to the collected basic information of the user, the model of the mobile phone used when the user watches the video, the operating system, browsing interest preference, and the like. Similarly, for the video features, the features of each video can be set according to the video author, the video category, the keyword tag, the cover image feature, the historical click rate of the video, and the like.

In step S520, the user characteristics and the characteristics of the plurality of candidate recommended videos are input to the video recommendation model according to any one of the first aspect, and a negative feedback target video of the plurality of candidate recommended videos is output.

Wherein the negative feedback target video is a video having a negative feedback possibility. Specifically, the server filters videos with negative feedback possibility in a plurality of candidate recommended videos through a pre-trained video recommendation model. Different from the training of the model only by using negative feedback videos in the related art, the video recommendation model is obtained by training according to the characteristics of a plurality of positive feedback videos and a plurality of negative feedback videos extracted from user historical conversations and the user characteristics. Meanwhile, the positive feedback video and the negative feedback video are used for training the video recommendation model, so that the characteristics of the positive feedback video and the characteristics of the user are closer, and the characteristics of the negative feedback video and the characteristics of the user are more deviated.

In step S530, videos other than the negative feedback target video among the plurality of candidate recommended videos are recommended.

Specifically, after obtaining the negative feedback target video from the multiple candidate recommended videos through the video recommendation model, the server filters the negative feedback target video in the candidate recommended videos, that is, recommends other videos than the negative feedback target video in the multiple candidate recommended videos to the user.

In the embodiment, before video recommendation, the video recommendation model is trained by using the characteristics of the plurality of positive feedback videos and the plurality of negative feedback videos in the user history session, so that the global information in the user history session is fully utilized, the actual requirements of the user can be better captured, the real intention of the user can be known, a better filtering effect can be achieved on the negative feedback target video in the candidate recommendation video, and the accuracy of video recommendation is improved.

Fig. 6 is a flow diagram illustrating derivation of negative feedback target video via a video recommendation model according to an exemplary embodiment. The video recommendation model comprises a first neural network and a second neural network; in step S520, inputting the user characteristics and the characteristics of the plurality of candidate recommended videos into the video recommendation model, and outputting a negative feedback target video of the plurality of candidate recommended videos, including the following steps.

In step S521, the user characteristics are input into a first neural network in the video recommendation model, and a first characteristic is generated.

Specifically, as shown in fig. 7, a schematic structural diagram of a video recommendation model in an application process in one embodiment is shown. Wherein, U represents the user characteristic, and V represents the candidate recommended video characteristic. The video recommendation model includes a first neural network NetU and a second neural network NetV. The first and second neural networks NetU and NetV may be comprised of fully connected layers. The user characteristics can be directly determined according to the basic information of the user, the mobile phone model used when the user watches the video, the operating system, browsing interest preference and the like, for example, onehot coding (one-hot coding) is performed on the category characteristics of gender, age, region and the like, and the original values are directly used for the continuous value characteristics to be spliced into the user characteristics.

In step S422, the features of the candidate recommended videos are input to a second neural network in the video recommendation model to generate a plurality of second features.

Specifically, the features of the candidate recommended videos may be directly determined according to the video category, the keyword tag, and the like, for example, onehot encoding is performed on the category features of the video category, the keyword tag, and the like, and the continuous value features are spliced into the features of each candidate recommended video by directly using the original values.

In step S223, a negative feedback target video of the plurality of candidate recommended videos is determined according to the first feature and the plurality of second features.

Specifically, after determining a first feature corresponding to the user feature and a second feature corresponding to each candidate video through the video recommendation model, a distance between the obtained first feature and each second feature may be calculated, and a similarity between the user feature and the feature of the candidate feature video may be determined through the distance. The distance may be calculated by, but not limited to, euclidean distance, cosine similarity, and the like. Taking the distance as the cosine similarity as an example, the cosine similarity can be calculated by adopting the following formula:

sim=cos(NetU(U),NetV(V)

where sim represents the similarity between the user feature and the candidate recommended video feature, netu (u) represents the first feature vector, and netv (v) represents the second feature. And determining the candidate characteristic video with the similarity smaller than the threshold value as the video with negative feedback possibility.

In the embodiment, the video with negative feedback possibility is determined according to the distance between the first feature corresponding to the generated user feature and the second feature corresponding to the candidate recommended video feature, and the calculation process is simple, so that the video recommendation efficiency can be improved.

Fig. 8 is a flow chart illustrating a video recommendation method according to an example embodiment. As shown in fig. 8, the following steps are included.

In step 801, a plurality of positive feedback videos and a plurality of negative feedback videos are extracted from each user history session. The user history session is a history session which is screened from an original history session and contains negative feedback video. The original history session may be all sessions generated within a certain period of time.

In step 802, a set of video pairs corresponding to each user history session is established, wherein each video pair comprises a positive feedback video and a negative feedback video. If there are S historical sessions containing negative feedback video, S sets of video pairs can be generated.

In step 803, user features and features of each video are defined.

Specifically, the server can collect characteristics of the user, including user gender, age, region, mobile phone model, operating system, browsing interest preference and the like, and the user characteristic is set as U; the video characteristics comprise video authors, video categories, keyword labels, cover image characteristics, historical video click rate and the like, and the video characteristics are set as V.

In step 804, the user features are weighted and summed by the first neural network.

In step 805, the features of the positive feedback video and the features of the negative feedback video in each video pair are weighted and summed by a second neural network. The first neural network and the second neural network may be comprised of fully connected layers.

In step 806, a first similarity of the weighted summed positive feedback video features to the weighted summed user features is calculated.

In step 807, a second similarity of the weighted summed characteristics of the negative feedback video to the weighted summed characteristics of the user is calculated. Wherein the first similarity and the second similarity may be cosine similarities.

In step 808, a loss function value is calculated according to the first similarity and the second similarity corresponding to each video pair, and the video recommendation model to be trained with the minimum loss function value is determined as the video recommendation model.

loss(U,Vp,Vn)=max(sim2-sim1,0)

Wherein loss (U, V)p,Vn) Represents the value of the loss function, sim1Represents the first degree of similarity, sim2Representing the second degree of similarity.

The goal of model training is to minimize the overall loss, namely:

in step 809, a plurality of candidate recommended videos are obtained. The plurality of candidate recommended videos may be determined by the video recommendation system based on a recall ranking principle.

In step 810, a user characteristic is input into a first neural network in a video recommendation model, generating a first characteristic.

In step 811, features of the plurality of candidate recommended videos are input into a second neural network in the video recommendation model to generate a plurality of second features.

In step 812, a similarity between the first feature and each of the second features is calculated. The similarity may be a cosine similarity.

In step 813, the candidate recommended video with similarity less than the threshold is determined as the negative feedback possibility video of the plurality of candidate recommended videos.

In step 814, other videos than the negative feedback possibility video in the plurality of candidate recommended videos are recommended to the client.

Fig. 9 is a block diagram illustrating an apparatus 900 for generating a video recommendation model according to an example embodiment. Referring to fig. 9, the apparatus includes a video extraction module 901, a video pair creation module 902, and a model training module 903.

A video extraction module 901 configured to perform extraction of a plurality of positive feedback videos and a plurality of negative feedback videos from each user history session;

a video pair establishing module 902 configured to perform establishing a plurality of video pairs corresponding to each user history session, each video pair including a positive feedback video and a negative feedback video;

and the model training module 903 is configured to perform training on the video recommendation model to be trained according to the characteristics of the positive feedback video, the characteristics of the negative feedback video and the user characteristics in each video pair to obtain a video recommendation model.

In one exemplary embodiment, the video recommendation model includes a first neural network and a second neural network; the model training module 903 comprises:

a first feature weighting unit configured to perform weighted summation of user features by a first neural network;

a second feature weighting unit configured to perform weighted summation of the features of the positive feedback video and the features of the negative feedback video in each video pair through a second neural network;

a first similarity calculation unit configured to perform calculation of a first similarity of the feature of the weighted-summed positive feedback video and the weighted-summed user feature in each video pair, an

A second similarity calculation unit configured to perform calculation of a second similarity of the feature of the weighted-summed negative feedback video and the weighted-summed user feature;

and the model determining unit is configured to calculate a loss function value according to the first similarity and the second similarity corresponding to each video pair, and determine the video recommendation model to be trained with the minimum loss function value as the video recommendation model.

In an exemplary embodiment, the video pair establishing module 903 is configured to perform, from a plurality of positive feedback videos corresponding to each user history session, randomly selecting a preset number of positive feedback videos, and sequentially establishing video pairs with negative feedback videos corresponding to each user history session, so as to obtain a plurality of video pairs.

In one exemplary embodiment, the user history session is a history session that contains negatively fed back video that is filtered out of the original history session.

Fig. 10 is a block diagram illustrating a video recommendation device 1000 according to an example embodiment. Referring to fig. 10, the apparatus includes an acquisition module 1001, a negative feedback target video determination module 1002, and a video recommendation module 1003.

An obtaining module 1001 configured to perform obtaining of a user feature and features of a plurality of candidate recommended videos;

a negative feedback target video determining module 1002, configured to perform input of the user characteristics and the characteristics of the plurality of candidate recommended videos into the video recommendation model according to any one of the first aspect, and output a negative feedback target video of the plurality of candidate recommended videos;

a video recommending module 1003 configured to recommend other videos than the negative feedback possibility video from the plurality of candidate recommended videos.

In one exemplary embodiment, the video recommendation model includes a first neural network and a second neural network; a negative feedback target video determination module 1002, comprising:

a first feature generation unit configured to perform inputting a user feature into a first neural network, generating a first feature;

a second feature generation unit configured to perform inputting features of the plurality of candidate recommended videos into a second neural network, generating a plurality of second features;

a negative feedback target video determination unit configured to perform determining a negative feedback target video among the plurality of candidate recommended videos according to the first feature and the plurality of second features.

In one exemplary embodiment, the negative feedback target video determining unit is configured to perform:

calculating the similarity between the first characteristic and each second characteristic;

and determining the candidate recommended video with the similarity smaller than the threshold value as a negative feedback target video in the plurality of candidate recommended videos.

With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Fig. 11 is a block diagram illustrating an apparatus 1100 for recommending with video according to an example embodiment. For example, the apparatus 1100 may be provided as a server. Referring to fig. 11, the apparatus 1100 includes a processing component 1122 that further includes one or more processors and memory resources, represented by memory 1132, for storing instructions, such as application programs, executable by the processing component 1122. The application programs stored in memory 1132 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1122 is configured to execute instructions to perform the version deployment method of applets described above.

The apparatus 1100 may also include a power component 1126 configured to perform power management of the apparatus 1100, a wired or wireless network interface 1150 configured to connect the apparatus 1100 to a network, and an input/output (I/O) interface 1158. The apparatus 1100 may operate based on an operating system stored in the memory 1132, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.

In an exemplary embodiment, a storage medium comprising instructions, such as a memory comprising instructions, executable by a processor of the apparatus 1100 to perform the method described above is also provided. Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.

Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:一种短视频智能推荐方法、系统、电子设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!