Video recall method, device and electronic equipment
By obtaining multi-user and video features and training the factorization machine model, the problem of poor recall effect for new users is solved and the accuracy of the recall model is improved.
Patent Information
- Application Number
- CN202110202148.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-23
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2041-02-23
AI Technical Summary
Existing personalized recall models have poor recall effects on new users, mainly due to the lack of valid user identification (UID) features and sparse behavioral features of new users, resulting in low prediction accuracy.
By obtaining multi-user ID class features and video ID class features, counting the frequency of these features to generate multi-user statistical features and video statistical features, and inputting them into the factorization machine (FM) model for training to generate a model for recalling videos .
It removes the invalid effects of single-user ID features and behavioral statistical features, improves the recall effect of new user recommendations, and improves the accuracy of the recall model.
Smart Images

Figure CN112949703B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a video recall method, device and electronic equipment. Background Art
[0002] The personalized recall model in the recommendation system of current products usually adopts a dual-tower deep neural network (DNN) recall or a factorization machine (FM) recall model. The above-mentioned personalized recall model is generally built on the training data set of all users. In the trained model, user identification (UID) embedding (a way to convert discrete variables into continuous vector representation) features and statistical behavior features are dominant. However, when such a model faces new user samples, due to the lack of valid UIDs and rare behavioral characteristics of new users, these dominant features will become invalid or produce large deviations, such as: the predicted area under the receiver operating characteristic curve (ROC) curve (Area Under Curve, AUC) is low, which affects the recommendation effect for new users. Summary of the invention
[0003] The present invention provides a video recall method, device and electronic device, so as to solve the problem that the recall effect of the existing recall model on new users is poor to a certain extent.
[0004] In a first aspect of the present invention, a video recall method is provided, the method comprising:
[0005] Obtain multi-user ID features and multi-user statistical features, as well as video ID features and video statistical features about the target user in the sample; wherein the multi-user ID features are ID features in which multiple users share the same ID, and the multi-user statistical features are obtained based on the frequency statistics of the multi-user ID features in the sample;
[0006] Inputting the multi-user ID-type features, the multi-user statistical features, the video ID-type features and the video statistical features into a first factorization machine FM model for training to obtain a trained second FM model;
[0007] The recalled videos of the target user are determined from the video database through the second FM model.
[0008] In a second aspect of the present invention, a video recall device is provided, the device comprising:
[0009] The first acquisition module is used to acquire multi-user ID-like features and multi-user statistical features, as well as video ID-like features and video statistical features about the target user in the sample; wherein the multi-user ID-like features are ID-like features in which multiple users share the same ID, and the multi-user statistical features are obtained based on the frequency statistics of the multi-user ID-like features appearing in the sample;
[0010] A first training module, used for inputting the multi-user ID-type features, the multi-user statistical features, the video ID-type features and the video statistical features into a first factor decomposition machine FM model for training to obtain a trained second FM model;
[0011] The first determination module is used to determine the recalled videos of the target user from the video database by using the second FM model.
[0012] In a third aspect of the present invention, there is also provided an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0013] Memory, used to store computer programs;
[0014] The processor is used to implement the steps in the video recall method as described above when executing the program stored in the memory.
[0015] In a fourth aspect of the implementation of the present invention, a computer-readable storage medium is further provided, on which a computer program is stored, and when the program is executed by a processor, the video recall method as described above is implemented.
[0016] In a fifth aspect of the embodiments of the present invention, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute the video recall method as described above.
[0017] Compared with the prior art, the present invention has the following advantages:
[0018] In an embodiment of the present invention, multi-user ID-like features and multi-user statistical features, as well as video ID-like features and video statistical features about a target user in a sample are obtained, wherein the multi-user ID-like features are ID-like features in which multiple users share the same ID, and the multi-user statistical features are obtained based on the frequency statistics of the multi-user ID-like features in the sample, which is equivalent to removing invalid features such as single-user ID-like features and single-user behavior statistical features in the sample; and the multi-user ID-like features, the multi-user statistical features, the video ID-like features and the video statistical features are input into a first factor decomposition machine FM model for training to obtain a trained second FM model, and through the second FM model, the recalled video of the target user is determined from the video database, and since the invalid features are removed, the recall effect of the recall model on new users is improved in the new user recommendation scenario.
[0019] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for describing the embodiments are briefly introduced below.
[0021] Figure 1 A flowchart of a video recall method provided by an embodiment of the present invention;
[0022] Figure 2 FM model training flow chart provided by an embodiment of the present invention;
[0023] Figure 3 A specific flow chart of the video recall method provided by an embodiment of the present invention;
[0024] Figure 4 A structural block diagram of a video recall device provided by an embodiment of the present invention;
[0025] Figure 5 This is a structural block diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0027] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0028] Specifically, Figures 1 to 3 As shown, an embodiment of the present invention provides a video recall method, which can be applied to a recall model. The method specifically includes the following steps:
[0029] Step 101, obtaining multi-user ID class features and multi-user statistical features, as well as video ID class features and video statistical features about the target user in the sample; wherein the multi-user ID class features are ID class features in which multiple users share the same ID, and the multi-user statistical features are obtained based on the frequency statistics of the multi-user ID class features appearing in the sample.
[0030] In the above step 101, the training data in the sample is obtained, namely, multi-user ID class features and multi-user statistical features of the target user, as well as video ID class features and video statistical features; wherein, the ID class features on the user side include: multi-user ID class features and single-user ID class features, wherein the multi-user ID class features are ID class features that multiple users share the same ID, such as: user city feature, user acquisition channel ad_id feature, etc.; the single-user ID class features are that each user has an individual ID, such as: single-user ID feature uid emb, etc.; in the above recall model, only the multi-user ID class features of the target user are obtained, which is equivalent to removing invalid features such as single-user ID class features in the sample. Moreover, item_emb1~item_emb m represent video ID features of m different attributes on the video item side. The ID features on the user side and the video ID features on the item side are both called discrete ID features, sparse embedding features. Each ID in these ID features corresponds to a sparse embedding of a fixed dimension. Then, during the recall model training process, these vectors are trained through gradient training so that these vectors can correctly express the role of these IDs. The multi-user statistical features on the user side and the video statistical features on the item side are statistical features obtained based on the frequency of these IDs appearing in the sample, such as the number of likes for a video and the like rate.
[0031] Among them, embedding is also abbreviated as emb in the expression. It is a way to convert (sparse) discrete variables into continuous vector representation. Specifically in the recommendation system scenario, it is a low-dimensional vector representation of ID-type features (such as: user ID (user_id), video ID (video_id), user age, gender, mobile phone model, video tags, etc.).
[0032] Step 102: Input the multi-user ID-type features, the multi-user statistical features, the video ID-type features and the video statistical features into a first factorization machine FM model for training to obtain a trained second FM model.
[0033] In the above step 102, the model training is based on the open source deep learning framework (X-Deep Learning, XDL) framework. The model training uses the quasi-real-time training data produced by the online dot log and the feature log as input data, namely, the multi-user ID class features, the multi-user statistical features, the video ID class features and the video statistical features. The model checkpoints produced in the last hour are used as the input model, namely, the first FM model, and a new round of iterative training is carried out to produce the latest model checkpoint, namely, the second FM model. The entire process of this step is periodically called by the automatic offline calling framework.
[0034] Among them, the above FM algorithm is an algorithm for solving the feature combination problem under sparse data, and has the characteristic of linear computational complexity.
[0035] Step 103: Determine the recalled videos of the target user from a video database using the second FM model.
[0036] In the above step 103, at least one recalled video is selected from the video database through the trained second FM model, and the at least one recalled video is used as the recalled video of the target user.
[0037] Among them, the video database is a library-building video obtained offline. Specifically, it filters the videos produced recently (such as within one month) in each region according to certain conditions (such as video views, number of likes, etc.), and arranges them according to the number of completed plays, number of likes, and number of shares (such as reverse order), thereby establishing a collection of popular videos of different dimensions and types as the video library for KNN recall of the FM model.
[0038] In the above embodiment of the present invention, multi-user ID-like features and multi-user statistical features, as well as video ID-like features and video statistical features about the target user in the sample are obtained, wherein the multi-user ID-like features are ID-like features in which multiple users share the same ID, and the multi-user statistical features are obtained based on the frequency statistics of the multi-user ID-like features in the sample, which is equivalent to removing invalid features such as single-user ID-like features and single-user behavior statistical features in the sample; and the multi-user ID-like features, the multi-user statistical features, the video ID-like features and the video statistical features are input into the first factor decomposition machine FM model for training to obtain a trained second FM model, and through the second FM model, the recalled video of the target user is determined from the video database. Since the invalid features are removed, the recall effect of the recall model on new users is improved in the new user recommendation scenario.
[0039] Optionally, the step 102 inputs the multi-user ID-type features, the multi-user statistical features, the video ID-type features, and the video statistical features into a first factor decomposition machine FM model for training to obtain a trained second FM model, which may specifically include the following steps:
[0040] Step A1, performing preset processing on the multi-user ID class features and the multi-user statistical features to obtain a first user vector;
[0041] Step A2, performing the preset processing on the video ID feature and the video statistical feature to obtain a first video vector;
[0042] Step A3, performing a first splicing process on the first user vector and the first video vector to obtain a prediction result;
[0043] Step A4: adjust the first FM model according to the prediction result to obtain a second FM model.
[0044] As an optional embodiment, the multi-user ID features and the multi-user statistical features are processed in a preset manner to obtain a first user vector on the user side; and the video ID features and the video statistical features are processed in the preset manner to obtain a first video vector on the video side. The first user vector and the first video vector are then processed in a first splicing manner to obtain a prediction result after the splicing process; the first FM model can be adjusted according to the obtained prediction result to obtain an adjusted second FM model.
[0045] It should be noted that there is no specific order between step A1 and step A2. Step A1 can be performed first, or step A2 can be performed first, or both steps can be performed simultaneously. This is not limited here.
[0046] Optionally, the preset processing may include the following contents:
[0047] Convert each ID-class feature in the target ID-class feature into a first-dimensional vector;
[0048] The first dimensional vector is subjected to average pooling processing to obtain a second dimensional vector;
[0049] The target statistical features are processed by a multi-layer neural network MLP to obtain a third-dimensional vector;
[0050] Performing a second concatenation process on the second dimensional vector and the third dimensional vector to obtain a target vector;
[0051] Among them, the target ID class feature is a multi-user ID class feature or a video ID class feature. When the target ID class feature is a multi-user ID class feature, the target statistical feature is a multi-user statistical feature, and the target vector is a first user vector; when the target ID class feature is a video ID class feature, the target statistical feature is a video statistical feature, and the target vector is a first video vector.
[0052] As an optional embodiment, Figure 2 As shown, step B1, when the target ID class feature is a multi-user ID class feature, obtain the multi-user ID class feature; and convert each ID class feature in the multi-user ID class feature into a first dimensional vector (such as a 13-dimensional vector or a 16-dimensional vector);
[0053] Step B2, obtaining multi-user statistical features obtained by counting the frequency of occurrence of multi-user ID-type features in the sample;
[0054] Step B3, the multiple first-dimensional vectors obtained in step B1 are average-pooled to obtain a second-dimensional vector (e.g., a 16-dimensional vector) on the user side;
[0055] Step B4, multi-user statistical features are processed by a multi-layer neural network (Multi-Layer Perceptron, MLP) to obtain a third dimensional vector (eg, a 16-dimensional statistical vector) on the user side.
[0056] After step B3 and step B4, the second dimensional vector obtained in step B3 and the third dimensional vector obtained in step B4 are subjected to a second concatenation process, thereby obtaining a first user vector (e.g., a 16-dimensional user vector). The number of neural network layers and vector dimensions are not limited, and the MLP can preferably be a 3-layer neural network.
[0057] It should be noted that there is no limitation on the order of step B1 and step B2. Similarly, there is no limitation on the order of step B3 and step B4.
[0058] As another optional embodiment, Figure 2 As shown, step B5, when the target ID type feature is a video ID type feature, obtain the video ID type feature;
[0059] Step B6, obtaining video statistical features obtained by counting the frequency of occurrence of video ID-type features in the sample;
[0060] Step B7, the multiple first-dimensional vectors obtained in step B5 are average-pooled to obtain a second-dimensional vector (e.g., a 16-dimensional vector) on the video side;
[0061] Step B8, multi-user statistical features are processed by MLP to obtain a third dimensional vector (eg, a 16-dimensional statistical vector) on the video side.
[0062] After step B7 and step B8, the second dimensional vector obtained in step B7 and the third dimensional vector obtained in step B8 are subjected to a second concatenation process, thereby obtaining a first video vector (e.g., a 16-dimensional video vector). The number of neural network layers and vector dimensions are not limited, and the MLP can preferably be a 3-layer neural network.
[0063] Optionally, the second concatenation process of the second dimensional vector and the third dimensional vector to obtain the target vector may specifically include the following contents:
[0064] Performing a second splicing process on the second dimensional vector and the third dimensional vector to obtain a splicing vector;
[0065] The concatenated vector is input into the first fully connected layer to obtain a target vector.
[0066] As an optional embodiment, Figure 2 As shown, step B9, when the target ID class feature is a multi-user ID class feature, the second dimensional vector obtained in step B3 and the third dimensional vector obtained in step B4 are subjected to a second splicing process, thereby obtaining a spliced splicing vector, and the splicing vector is passed through a first fully connected layer dense to obtain a first user vector (e.g., a 16-dimensional user vector).
[0067] As another optional embodiment, Figure 2 As shown, in step B10, when the target ID class feature is a video ID class feature, the second dimensional vector obtained in step B7 and the third dimensional vector obtained in step B8 are subjected to a second splicing process, thereby obtaining a spliced splicing vector, and the splicing vector is passed through a first fully connected layer dense to obtain a first video vector (e.g., a 16-dimensional video vector).
[0068] Optionally, the step A3 performs a first splicing process on the first user vector and the first video vector to obtain a prediction result, which specifically includes the following contents:
[0069] Performing cosine calculation on the first user vector to obtain a first cosine value;
[0070] Performing cosine calculation on the first video vector to obtain a second cosine value;
[0071] Performing a first splicing process on the first cosine value, the second cosine value, and the bias feature in the sample to obtain a splicing feature;
[0072] The concatenated features are input into the second fully connected layer to obtain a prediction result.
[0073] As an optional embodiment, Figure 2 As shown, in step B11, cosine calculation is performed on the first user vector to obtain a first cosine value, and cosine calculation is performed on the first video vector to obtain a second cosine value. The above two calculation processes do not limit the order of the two calculation processes.
[0074] Step B12, obtaining bias features in the sample; such as the position where the video appears on the screen, etc.;
[0075] Step B13: Perform a first concatenation process on the first cosine value, the second cosine value, and the bias feature in the sample to obtain a concatenated feature, and input the concatenated feature into a second fully connected layer to obtain a prediction result.
[0076] It should be noted that the process of obtaining the bias feature in step B12 is not limited to being completed after step B11, but only needs to be completed before step B13.
[0077] In the implementation process of the above embodiment, the different feature vectors on the user side and the video side are respectively processed by average pooling, and then the cosine calculation is performed, which is equivalent to only seeking the inner product of the auxiliary vector on the user side and the auxiliary vector on the video side in the FM model, while the inner product between different user ID class features, the inner product between different video ID class features, as well as the constant term and the linear term are cancelled. It can be considered as a more reasonable variant implementation of the FM model. In addition, since the single user ID class features in the traditional FM model are very important and have strong expressive power, the model works better on old users. When facing samples of new users that basically lack single user ID class features, the predicted results and the actual effects will have a relatively large deviation. If the old user data in the training data is removed and the model is retrained with only the new user data, the training data will be very scarce, affecting the final effect. If the single-user ID features and / or single-user device ID features on the user side are removed, and the statistical features for these two ID features are canceled, this will not only allow other generalized attribute features that do not depend on specific user IDs to be more fully expressed, but also make full use of existing old user data to achieve an effect similar to transfer learning.
[0078] Optionally, the step 103 determines the recalled videos of the target user from the video database by using the second FM model, and specifically includes the following steps:
[0079] Convert the second FM model into a neural network model TensorFlow model;
[0080] Processing the TensorFlow model to obtain a user vector prediction model and a video vector prediction model;
[0081] According to the user vector prediction model and the video vector prediction model, the recalled videos of the target user are determined from the video database.
[0082] As an optional embodiment, Figure 3 As shown, step C1 is to convert and publish the model. Specifically, since the second FM model will have two parts, namely the predicted user vector and the predicted video vector, the model for predicting the user side vector and the model for predicting the video side vector in the second FM model are converted into a TensorFlow model that supports online real-time prediction, and produce models of two prediction vectors, namely the user prediction vector user_vec and the video prediction vector item_vec, namely the user vector prediction model and the video vector prediction model.
[0083] After step C1, the recalled videos of the target user may be determined from the video database according to the user vector prediction model, the video vector prediction model, the feature data on the user side, and the feature data on the video side.
[0084] Optionally, the determining of the recalled videos of the target user from the video database according to the user vector prediction model and the video vector prediction model may specifically include the following contents:
[0085] Inputting the video ID class features and the video statistical features into the video vector prediction model to obtain a predicted video vector;
[0086] According to the video database and the predicted video vector, a K-Nearest Neighbours (KNN) open source algorithm library is established;
[0087] Upon receiving the first information requesting to obtain the recalled video of the target user, obtaining the online user features of the target user;
[0088] Inputting the user online features into the user vector prediction model to obtain a predicted user vector;
[0089] According to the similarity between each predicted video vector in the KNN library and the predicted user vector, the recalled video of the target user is determined.
[0090] As an optional embodiment, Figure 3 As shown, in step C2, the video for building a library, namely, the video database, is obtained in an offline state.
[0091] Step C3, after step C1 and step C2, the method further includes: predicting the video vector and establishing a KNN library; specifically, inputting the item features (i.e., video ID-like features and video statistical features) into the video vector prediction model to obtain the predicted video vector, and storing these item features and predicted video vectors in the form of key-value pairs kv pairs in the KNN library through large-scale vector similarity calculation hnswlib. Among them, KNN is a common algorithm in machine learning, that is, it returns the K vectors most similar to the target vector by calculating the distance in the vector space and then arranging them. Due to the complexity of the calculation, it is not feasible to directly apply the nearest neighbor method. The best practice is to use the approximate nearest neighbor (ANN) algorithm.
[0092] Step C4, when the target user sends a request to obtain the first information of the recalled video of the target user, and when the first information is received, the user online features about the target user are obtained, and the user online features are input into the user vector prediction model to obtain the predicted user vector.
[0093] Step C5, after step C3 and step C4, use the predicted user vector to query the KNN library. Specifically, use the predicted user vector as the query vector query vec to query and obtain the video closest to the target user vector.
[0094] Step C6, taking top N (eg, the value of N may be 5000, 1000, etc.) as the recall videos of the target user recall channel.
[0095] To sum up, in the new user recommendation scenario, the embodiments of the present invention remove invalid features such as single-user ID features and single-user statistical features through targeted feature engineering, highlight the importance of features such as new user population attributes, optimize the expression effect of generalized attribute features in the model and the recall effect of the traditional DNN / FM recall model on new users, and improve new user retention and interaction indicators.
[0096] like Figure 4 As shown, an embodiment of the present invention provides a video recall device 400, the device comprising:
[0097] The first acquisition module 401 is used to acquire multi-user ID-like features and multi-user statistical features, as well as video ID-like features and video statistical features about the target user in the sample; wherein the multi-user ID-like features are ID-like features in which multiple users share the same ID, and the multi-user statistical features are obtained based on the frequency statistics of the multi-user ID-like features appearing in the sample;
[0098] A first training module 402 is used to input the multi-user ID-type features, the multi-user statistical features, the video ID-type features and the video statistical features into a first factorization machine FM model for training to obtain a trained second FM model;
[0099] The first determination module 403 is used to determine the recalled videos of the target user from the video database by using the second FM model.
[0100] In the above embodiment of the present invention, multi-user ID-like features and multi-user statistical features, as well as video ID-like features and video statistical features about the target user in the sample are obtained, wherein the multi-user ID-like features are ID-like features in which multiple users share the same ID, and the multi-user statistical features are obtained based on the frequency statistics of the multi-user ID-like features in the sample, which is equivalent to removing invalid features such as single-user ID-like features and single-user behavior statistical features in the sample; and the multi-user ID-like features, the multi-user statistical features, the video ID-like features and the video statistical features are input into the first factor decomposition machine FM model for training to obtain a trained second FM model, and through the second FM model, the recalled video of the target user is determined from the video database. Since the invalid features are removed, the recall effect of the recall model on new users is improved in the new user recommendation scenario.
[0101] Optionally, the first training module 402 includes:
[0102] A first processing unit, configured to perform preset processing on the multi-user ID-type features and the multi-user statistical features to obtain a first user vector;
[0103] A second processing unit is used to perform the preset processing on the video ID type feature and the video statistical feature to obtain a first video vector;
[0104] A third processing unit, configured to perform a first splicing process on the first user vector and the first video vector to obtain a prediction result;
[0105] The first adjustment unit is used to adjust the first FM model according to the prediction result to obtain a second FM model.
[0106] Optionally, the preset processing includes:
[0107] Convert each ID-class feature in the target ID-class feature into a first-dimensional vector;
[0108] The first dimensional vector is subjected to average pooling processing to obtain a second dimensional vector;
[0109] The target statistical features are processed by a multi-layer neural network MLP to obtain a third-dimensional vector;
[0110] Performing a second concatenation process on the second dimensional vector and the third dimensional vector to obtain a target vector;
[0111] Among them, the target ID class feature is a multi-user ID class feature or a video ID class feature. When the target ID class feature is a multi-user ID class feature, the target statistical feature is a multi-user statistical feature, and the target vector is a first user vector; when the target ID class feature is a video ID class feature, the target statistical feature is a video statistical feature, and the target vector is a first video vector.
[0112] Optionally, performing a second concatenation process on the second dimensional vector and the third dimensional vector to obtain a target vector includes:
[0113] Performing a second splicing process on the second dimensional vector and the third dimensional vector to obtain a splicing vector;
[0114] The concatenated vector is input into the first fully connected layer to obtain a target vector.
[0115] Optionally, the third processing unit includes:
[0116] A first calculation subunit, configured to perform cosine calculation on the first user vector to obtain a first cosine value;
[0117] A second calculation subunit, configured to perform cosine calculation on the first video vector to obtain a second cosine value;
[0118] A first processing subunit, configured to perform a first splicing process on the first cosine value, the second cosine value, and a bias feature in the sample to obtain a splicing feature;
[0119] The second processing subunit is used to input the concatenated features into the second fully connected layer to obtain a prediction result.
[0120] Optionally, the first determining module 403 includes:
[0121] A first conversion unit, used for converting the second FM model into a neural network model TensorFlow model;
[0122] A fourth processing unit, used to process the TensorFlow model to obtain a user vector prediction model and a video vector prediction model;
[0123] The first determining unit is used to determine the recalled videos of the target user from the video database according to the user vector prediction model and the video vector prediction model.
[0124] Optionally, the first determining unit includes:
[0125] A first acquisition subunit, configured to input the video ID class feature and the video statistical feature into the video vector prediction model to obtain a predicted video vector;
[0126] A first establishing subunit is used to establish an approximate nearest neighbor ANN open source algorithm library KNN library according to the video database and the predicted video vector;
[0127] A second acquisition subunit is configured to acquire online user features of the target user upon receiving first information requesting to acquire the recalled video of the target user;
[0128] A third acquisition subunit, configured to input the user online feature into the user vector prediction model to obtain a predicted user vector;
[0129] The first determination subunit is used to determine the recalled video of the target user according to the similarity between each predicted video vector in the KNN library and the predicted user vector.
[0130] It should be noted that the video recall device embodiment is a device corresponding to the above-mentioned video recall method. All implementation methods of the above-mentioned embodiments are applicable to the device embodiment and can achieve the same technical effects, which will not be elaborated here.
[0131] To sum up, in the new user recommendation scenario, the embodiments of the present invention remove invalid features such as single-user ID features and single-user statistical features through targeted feature engineering, highlight the importance of features such as new user population attributes, optimize the expression effect of generalized attribute features in the model and the recall effect of the traditional DNN / FM recall model on new users, and improve new user retention and interaction indicators.
[0132] The embodiment of the present invention also provides an electronic device. Figure 5 As shown, it includes a processor 501 , a communication interface 502 , a memory 503 and a communication bus 504 , wherein the processor 501 , the communication interface 502 , and the memory 503 communicate with each other via the communication bus 504 .
[0133] The memory 503 is used to store computer programs.
[0134] When the processor 501 is used to execute the program stored in the memory 503, part or all of the steps in a video recall method provided in an embodiment of the present invention are implemented.
[0135] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0136] The communication interface is used for communication between the above terminal and other devices.
[0137] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0138] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0139] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the video recall method described in the above embodiment.
[0140] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes the video recall method described in the above embodiment.
[0141] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0142] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A video recall method, characterized in that: The method comprises: Obtain multi-user ID features and multi-user statistical features, as well as video ID features and video statistical features about the target user in the sample; wherein the multi-user ID features are ID features in which multiple users share the same ID, and the multi-user statistical features are obtained based on the frequency statistics of the multi-user ID features in the sample; Inputting the multi-user ID-type features, the multi-user statistical features, the video ID-type features and the video statistical features into a first factorization machine FM model for training to obtain a trained second FM model; In a new user recommendation scenario, the recalled videos of the target user are determined from a video database by using the second FM model; The step of inputting the multi-user ID-type features, the multi-user statistical features, the video ID-type features, and the video statistical features into a first factor decomposition machine FM model for training to obtain a trained second FM model includes: The multi-user ID class features and the multi-user statistical features are processed in a preset manner to obtain a first user vector; The video ID feature and the video statistical feature are subjected to the preset processing to obtain a first video vector; Performing cosine calculation on the first user vector to obtain a first cosine value; Performing cosine calculation on the first video vector to obtain a second cosine value; Performing a first splicing process on the first cosine value, the second cosine value, and the bias feature in the sample to obtain a splicing feature; Inputting the concatenated features into the second fully connected layer to obtain a prediction result; The first FM model is adjusted according to the prediction result to obtain a second FM model.
2. The method according to claim 1, characterized in that The preset processing includes: Convert each ID-class feature in the target ID-class feature into a first-dimensional vector; The first dimensional vector is subjected to average pooling processing to obtain a second dimensional vector; The target statistical features are processed by a multi-layer neural network MLP to obtain a third-dimensional vector; Performing a second concatenation process on the second dimensional vector and the third dimensional vector to obtain a target vector; Among them, the target ID class feature is a multi-user ID class feature or a video ID class feature. When the target ID class feature is a multi-user ID class feature, the target statistical feature is a multi-user statistical feature, and the target vector is a first user vector; when the target ID class feature is a video ID class feature, the target statistical feature is a video statistical feature, and the target vector is a first video vector.
3. The method according to claim 2, characterized in that The step of performing a second concatenation process on the second dimensional vector and the third dimensional vector to obtain a target vector includes: Performing a second splicing process on the second dimensional vector and the third dimensional vector to obtain a splicing vector; The concatenated vector is input into the first fully connected layer to obtain a target vector.
4. The method according to claim 1, characterized in that: Determining the recalled videos of the target user from a video database by using the second FM model includes: Convert the second FM model into a neural network model TensorFlow model; Processing the TensorFlow model to obtain a user vector prediction model and a video vector prediction model; According to the user vector prediction model and the video vector prediction model, the recalled videos of the target user are determined from the video database.
5. The method according to claim 4, characterized in that The determining, from the video database, the recalled videos of the target user according to the user vector prediction model and the video vector prediction model comprises: Inputting the video ID class features and the video statistical features into the video vector prediction model to obtain a predicted video vector; According to the video database and the predicted video vector, an approximate nearest neighbor ANN open source algorithm library KNN library is established; Upon receiving the first information requesting to obtain the recalled video of the target user, obtaining the online user features of the target user; Inputting the user online features into the user vector prediction model to obtain a predicted user vector; According to the similarity between each predicted video vector in the KNN library and the predicted user vector, the recalled video of the target user is determined.
6. A video recall device, characterized in that: The device comprises: The first acquisition module is used to acquire multi-user ID-like features and multi-user statistical features, as well as video ID-like features and video statistical features about the target user in the sample; wherein the multi-user ID-like features are ID-like features in which multiple users share the same ID, and the multi-user statistical features are obtained based on the frequency statistics of the multi-user ID-like features appearing in the sample; A first training module, used for inputting the multi-user ID-type features, the multi-user statistical features, the video ID-type features and the video statistical features into a first factor decomposition machine FM model for training to obtain a trained second FM model; A first determination module is used to determine the recalled videos of the target user from the video database by using the second FM model in a new user recommendation scenario; Wherein, the first training module includes: A first processing unit, configured to perform preset processing on the multi-user ID-type features and the multi-user statistical features to obtain a first user vector; A second processing unit is used to perform the preset processing on the video ID type feature and the video statistical feature to obtain a first video vector; A third processing unit, configured to perform a first splicing process on the first user vector and the first video vector to obtain a prediction result; A first adjustment unit, configured to adjust the first FM model according to the prediction result to obtain a second FM model; The third processing unit comprises: A first calculation subunit, configured to perform cosine calculation on the first user vector to obtain a first cosine value; A second calculation subunit, configured to perform cosine calculation on the first video vector to obtain a second cosine value; A first processing subunit, configured to perform a first splicing process on the first cosine value, the second cosine value, and a bias feature in the sample to obtain a splicing feature; The second processing subunit is used to input the concatenated features into the second fully connected layer to obtain a prediction result.
7. An electronic device, characterized in that: include: A processor, a communication interface, a memory and a communication bus; wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; The processor is used to implement the steps in the video recall method as described in any one of claims 1 to 5 when executing the program stored in the memory.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the video recall method as described in any one of claims 1 to 5 is implemented.
